From pm-tokens
Estimates token counts and costs for LLM content using local heuristics, with before/after comparisons to quantify optimization savings and decide if an optimization is worthwhile.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pm-tokens:token-costThe summary Claude sees in its skill listing — used to decide when to auto-load this 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 "...
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.
Ask for these if not provided:
python3 scripts/token_cost.py --file context.md --price-in 3 --calls 200
python3 scripts/token_cost.py --file original.json --compare crushed.json --price-in 3 --calls 200
Deterministic, stdlib-only. Two heuristics (≈4 chars/token, ≈0.75 words/token) averaged and labeled as estimates — real tokenizers vary by model and content type, and the script says so on every run rather than cosplaying as one.
[Script output: both heuristics, the estimate, the cost lines]
[Comparison mode: the before/after with savings at volume]
The verdict: [worth-it / not-worth-it, in one sentence with the reasoning] Estimates ±15%; prices supplied by you, dated today; exact counts need the provider's tokenizer.
npx claudepluginhub mohitagw15856/pm-claude-skills --plugin pm-tokensEstimates token usage and USD cost of running the architect pipeline on a codebase. Combines a-priori model from lines-of-code with measured actuals. Invoke with /architect:estimate-token-cost [target_path].
Estimates token usage, costs across Haiku/Sonnet/Opus, complexity levels, and time for features by analyzing codebase files/lines via Glob/Read/Grep. Use for pre-implementation planning.
Estimates LLM call costs and projects monthly spending with a runnable Python calculator. Use it to compare model pricing before shipping.