token-cost-estimator

token-cost-estimator is a skill for Claude Code from Abhillashjadhav/AI-PM-essential-skills. It costs 105 tokens per session (777 once invoked), scanned A, original, MIT.

A pre-flight estimate of the token usage, cost, and likely speed of an AI prompt. Tokens are small pieces of text that models process, and the estimate compares selected models before a request runs.

In plain words
What is it for?
Use it to count prompt tokens, estimate output length, compare model input and output costs, describe latency, and recommend a model when enough pricing information is available.
Why use it?
It lets teams consider inference economics before putting a prompt into production or sharing a workflow. It also makes unknown pricing or output assumptions explicit instead of inventing them.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: positional $N argument.

Good fit Use it to count prompt tokens, estimate output length, compare model input and output costs, describe latency, and recommend a model when enough pricing information is available.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abhillashjadhav/ai-pm-essential-skills/token-cost-estimator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Abhillashjadhav/AI-PM-essential-skills --skill token-cost-estimator
Clone the repo
git clone --depth 1 https://github.com/Abhillashjadhav/AI-PM-essential-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for token-cost-estimator

README.md
[![agentmods](https://agentmods.dev/badge/skills/abhillashjadhav/ai-pm-essential-skills/token-cost-estimator/github.svg)](https://agentmods.dev/skills/abhillashjadhav/ai-pm-essential-skills/token-cost-estimator)
Your own site
<a href="https://agentmods.dev/skills/abhillashjadhav/ai-pm-essential-skills/token-cost-estimator"><img src="https://agentmods.dev/badge/skills/abhillashjadhav/ai-pm-essential-skills/token-cost-estimator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for token-cost-estimator

Your own site · 80×15
<a href="https://agentmods.dev/skills/abhillashjadhav/ai-pm-essential-skills/token-cost-estimator"><img src="https://agentmods.dev/badge/skills/abhillashjadhav/ai-pm-essential-skills/token-cost-estimator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 777 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.00777
Opus 5 $0.00053 $0.00388
Sonnet 5 $0.00021 $0.00155
Haiku 4.5 $0.00011 $0.00078

Measured 12d ago against content hash 93a0bbc87c7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

token-cost-estimator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

token-cost-estimator/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Token Cost Estimator

You are a pre-flight inference economics tool for AI product managers. Your job is to estimate cost and latency BEFORE a prompt runs in production — not after.

What you receive

The user will paste:

  1. A prompt (system prompt, user message, or both)
  2. A list of models to compare (e.g. claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5)
  3. Optionally: expected output length in tokens

If models are not specified, default to comparing: claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5. If expected output length is not specified, estimate it based on the task type.

What you produce

Step 1: Token count

Count the input tokens in the prompt. State the count plainly.

Step 2: Output token estimate

Estimate output tokens based on the task. Label your reasoning (e.g. "summarisation task → ~200 tokens output").

Step 3: Cost table

Produce a markdown table with these columns: | Model | Input cost | Output cost | Total cost | Latency profile | Recommendation |

Use current publicly documented pricing. If pricing is not known, state that clearly — do not fabricate numbers.

Latency profile should be one of: Fast / Balanced / Thorough

Step 4: Recommendation

One sentence. Name the model and why — cost, capability, or latency reason. Make a real call. Do not hedge.

Step 5: Flags

If the prompt is likely to produce variable-length outputs (e.g. open-ended generation), flag it. If a smaller model is likely sufficient, say so plainly.

Hard rules

  • Never fabricate pricing. Use documented public rates. If unsure, say "verify current pricing at anthropic.com/pricing".
  • Never recommend a model without stating the tradeoff being accepted.
  • Output must be scannable in under 30 seconds. No padding.
  • If the user's prompt is confidential, process it without repeating it back in full.

Example output format

Input tokens: 847
Estimated output tokens: 320 (reasoning task, multi-step)

| Model | Input cost | Output cost | Total cost | Latency | Recommendation |
|---|---|---|---|---|---|
| claude-opus-4-6 | $0.025 | $0.048 | $0.073 | Thorough | Best accuracy |
| claude-sonnet-4-6 | $0.003 | $0.005 | $0.008 | Balanced | ✓ Recommended |
| claude-haiku-4-5 | $0.0003 | $0.0005 | $0.0008 | Fast | Sufficient if accuracy ≥80% |

Recommendation: claude-sonnet-4-6 — 9× cheaper than Opus with comparable output for this task type.

Flag: Output length will vary. Re-run this estimate if prompt changes significantly.

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 70 lines · 105 tokens per session scan A 93a0bbc87c7c

Subscribe to this mod's changes

token-cost-estimator is a skill published in the GitHub repository Abhillashjadhav/AI-PM-essential-skills (4 stars, last pushed 11d ago), licensed MIT. It adds 105 tokens to every session and 777 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ai-readiness

Scan the portfolio for the highest-leverage AI opportunities and rank where to deploy operating-partner time. Ingests quarterly updates and financials across multiple portfolio companies, identifies quick wins at each, and stacks them into a single ranked action list. Use during quarterly portfolio reviews, annual…

anthropics/financial-services · 112 tokens

implementing-llm-guardrails-for-security

Implements input and output validation guardrails for LLM-powered applications to prevent prompt injection, data leakage, toxic content generation, and hallucinated outputs. Builds a security validation pipeline using NVIDIA NeMo Guardrails Colang definitions, custom Python validators for PII detection and content…

xalgorix/xalgorix · 143 tokens

prompting

Guide for writing effective system prompts for LLM agents. Use when creating or editing system prompts for applications, agent configurations, or development tools.

saffron-health/libretto · 31 tokens

few-shot-examples

Curated few-shot examples for construction AI tasks: classification, extraction, analysis. Domain-specific examples for improved LLM performance.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 30 tokens

bim-cost-estimation-cwicr

Automated cost estimation from BIM models using DDC CWICR database (8 national bases, 78,228 positions). AI classification + vector search for accurate pricing.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 43 tokens

cost-prediction

Predict construction project costs using Machine Learning. Use Linear Regression, K-Nearest Neighbors, and Random Forest models on historical project data. Train, evaluate, and deploy cost prediction models.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 42 tokens