TC
Token Cost
🔵 Stable🕐 updated 2026-07-19
🔷 SkillSpec L3
⚙ ships an executable helper
pm-tokens
Measure before optimizing — estimate token counts locally with stated heuristics, price them at your model's rates, and quantify before/after savings, because token optimization without measurement is vibes. Use when asked how many tokens is this, what does this context cost per call, is this optimization worth it, or compare these two versions' cost. Produces the estimate with both heuristics shown, the cost math at your prices across your call volume, and the before/after comparison that decides whether an optimization earned its complexity.
What to give it
▸The content — file or text to measure; for comparisons, both versions
▸The prices — the model's $/M input (and output if relevant) — from the user's provider page, today's, because baked-in prices are stale prices
▸The volume — how many calls this content rides along on (a system prompt rides *every* call; a one-shot report rides one) — the multiplier that decides everything
✅ The bar it holds itself to
Every skill in this library self-verifies — these are this skill's own quality checks, straight from its definition.
✓Both heuristics shown, average labeled as an estimate
✓Prices came from the user, never from memory
✓The call-volume assumption is explicit in every cost figure
✓Comparisons subtract the optimization's own cost
✓The measurement ends in a worth-it sentence
⚠️ What it refuses to do
Do not recite model prices from memory — they change; ask for today's
Do not present heuristic counts as tokenizer truth — the ±15% label is load-bearing
Do not optimize unmeasured — "feels smaller" has shipped many complexity-positive savings
Do not ignore volume — the same 500 tokens is negligible once and structural at every-call
Do not end without the verdict — a measurement that doesn't decide anything measured nothing
Install
npx pm-claude-skills add --agent claude # or codex · cursor · gemini · hermes
# or one-line MCP (every skill, any client):
claude mcp add pm-skills -- npx -y pm-claude-skills-mcp
Related skills
🔌 Embed this skill
Drop this on your blog, docs, or site — it renders a "Run this skill" card:
<div data-pm-skill="token-cost"></div>
<script src="https://mohitagw15856.github.io/pm-claude-skills/embed.js" async></script>
💬 Discussion
Token Cost is one of 750 open-source professional AI agent skills — all SkillSpec L3.
Try them all in the browser · ⭐ Star on GitHub · Browse the full catalog