Data & analysis

token-cost-time

Try it

Estimate LLM task token usage, cost, and duration using rule-based classification and optional local profile data without external dependencies.

What it does

is a lightweight, dependency-free estimator for LLM task token usage, cost, and duration.

The skill document

token-cost-time

token-cost-time is a lightweight, dependency-free estimator for LLM task token usage, cost, and duration.

It uses rule-based task classification plus baseline priors and optional local profile data.

Features

  • Rule-based task classification (no LLM calls)
  • Cost + duration estimation by model
  • Confidence ramp from cold-start to learned profile data
  • Quality confidence adjusted by retry behavior
  • Local execution recording for continuous calibration

Install / Run

From this module directory:

npm test
node cli/index.js calibrate --objective "summarize this document" --model claude-haiku-3
node cli/index.js compare --objective "implement a React component" --models claude-haiku-3,claude-sonnet-4,gpt-4o
node cli/index.js record --model claude-haiku-3 --task-class summarization --input-tokens 1340 --output-tokens 290 --duration-ms 4100 --cost 0.00071

API

  • calibrate(objective, model, profilePath = null)
  • record(executionData, profilePath = null)
  • compare(objective, models, profilePath = null, sortBy = 'cost')

Library usage example:

import { calibrate } from './src/calibrate.js';

const result = calibrate('summarize this architecture memo', 'claude-haiku-3');
// result.taskClass => 'summarization'
// result.estimate.costUsd => estimated dollar cost
// result.confidence => 0.2 cold start, rises to 0.95 with 50+ recorded runs

If profilePath is omitted, profile defaults to:

  • ~/.token-cost-time/profile.json

Execution log defaults to:

  • ~/.token-cost-time/execution-log.jsonl

Task Classes

  • summarization
  • code_generation
  • code_audit
  • reasoning
  • creative
  • extraction
  • conversation (fallback)

Notes

  • ESM modules throughout.
  • Node built-ins only.
  • File paths are resolved with os.homedir() for cross-platform compatibility.

Related skills

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

More from highnoonoffice

Browse all skills

Publish, update, and audit Ghost CMS content from your AI workflow using the Admin API.

by highnoonoffice38 installs

Visualize how attention moves across your agent's projects. 13 named attention categories. Momentum-ready edges (recentCount/lifetimeCount). Directional flow encoding. Sorted by co-access score.

by highnoonoffice32 installs

Unload your cognitive baggage. Drop ideas anywhere, find the signal later.

by highnoonoffice22 installs

Your OpenClaw is the brain. Codex or Claude Code are the hands. The clipboard is the protocol.

by highnoonoffice9 installs

Bidirectional mathematical engine for Borges' Library of Babel. Finds the permanent hexagon address of any text, reads any page at any coordinate, and scores pages by Shannon entropy. No database, no randomness — same input always produces identical output. Use when asked to locate text in the Library of Babel, generate a page at given coordinates, explore Borges' infinite library concept, or analyze page entropy. Triggers on: find this in the Library of Babel, what is the address of, read a page at coordinates, entropy heatmap, Borges library.

by highnoonoffice13 installs

Web access privileges for your agent. So your agent stops hitting walls.

by highnoonoffice18 installs