Individual skill
token-cost
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.
skills/token-cost/SKILL.md
Source commit f7c90bc09ee05dc25cf257bdb1826f2c2552c2cb
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 1,539
- Repository last updated
- Nov 10, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- product-management Repository topic
- productivity Repository topic
- skills Repository topic
- claude-skills Repository topic
- agent-skills Repository topic
- chatgpt Repository topic
- claude-code Repository topic
- cursor Repository topic
- gemini Repository topic
- prompt-engineering Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 5,435 bytesSKILL.mdcore · 5,435 bytesscripts/token_cost.pyruns · 3,303 bytes
Read excerpt
# Token Cost Skill
Every token optimization should start and end with the same question: *how many, at what price, how often?* — and most skip all three. This skill is the measurement layer: local token estimates (two stated heuristics, averaged, no tokenizer dependencies), cost math at *your* model's prices (supplied, never baked in — prices change faster than repos), and the before/after comparison that turns "this feels smaller" into "saves 4,200 tokens, $1.26 per hundred calls." The honest core: a 40% saving on something sent once is a rounding error; 8% on something sent every call is real money — the `--calls` flag is the whole insight.
## What This Skill Produces
- **The estimate** — chars/4 and words×4/3, both shown, averaged, with the ±15% honesty label
- **The cost math** — per call and across the stated call volume, at supplied prices
- **The comparison** — before vs. after any optimization: tokens saved, percent, dollars at volume
- **The verdict frame** — worth-it / not-worth-it, decided by volume × savings vs. the optimization's own complexity
## Required Inputs
Ask for these if not provided: