token-cost-estimator

token-cost-estimator is a skill for Claude Code from Abhillashjadhav/AI-PM-essential-skills. It costs 119 tokens per session (1,147 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 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,147 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.00119 $0.01147
Opus 5.5 $0.00048 $0.00459
Sonnet 5.5 $0.00024 $0.00229
Haiku 4.5 $0.00012 $0.00115

Measured 28d ago against content hash 87248b908763, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 28d 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 · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 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

Use the user's candidate models. If models are not specified, give a model-agnostic formula; name candidates only after checking their availability and rates in official documentation. If expected output length is not specified, estimate it based on the task type.

What you produce

Step 1: Token count

Use a tokenizer for the named model when available. Report its identifier, the counting tool, the exact text scope, and the measured count. Message wrappers, tool schemas, or hidden runtime context may add tokens; do not describe a raw-text count as total billed usage.

Without a matching tokenizer, label the count as an estimate, state the method and assumptions, and avoid claiming an exact count. If no defensible estimate is available, mark it unknown and use a symbolic cost formula.

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 official pricing with a source URL, retrieval date, currency, and billing unit. Distinguish input, output, cache, and other applicable charges. If rates cannot be verified, mark the numeric cost unknown. Label owner-supplied or hypothetical rates as such; do not present them as verified current prices.

For per-million-token rates, calculate token cost as (input_tokens * input_rate + output_tokens * output_rate) / 1_000_000. Mark any result derived from estimated counts or output lengths as projected. Include other applicable charges separately.

Read the full file on GitHub · 84 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. 28d ago Changed · +14 lines · +14 tokens per session 87248b908763
  2. 1mo 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 (9 stars, last pushed 4d ago), licensed MIT. It adds 119 tokens to every session and 1,147 once invoked, about $0.0005 per session on Opus 5.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

prompt-engineering

Use when one prompt must give the same right answer across reruns, models, and pasted-in hostile input: forcing a fixed schema, picking the few-shot set, ordering the prompt blocks, or the inline cases you run while tuning. NOT the agent loop, tools, or retrieval (that is building-agents), NOT a standing CI eval…

ericrisco/rsc-harness · 83 tokens

eval-llm-judge

Write LLM-as-judge evaluator prompts for AI products. Use this skill whenever you need to evaluate semantic properties of AI outputs that cannot be checked programmatically — output quality, tone, factual accuracy, edge case handling, reference alignment. Also use when auditing existing judge prompts for bias…

Calibre-Labs/reforge-ai-evals · 92 tokens

context-engineering-advisor

Diagnose context stuffing vs. context engineering. Use when an AI workflow feels bloated, brittle, or hard to steer reliably.

deanpeters/Product-Manager-Skills · 32 tokens

llm-cost-advisor

WHAT — Recommend the most cost-effective LLM provider for a given task type. Shows estimated cost per run across available providers and integrates with devcompanion llm-status to show what is actually available.

ulises-jeremias/agent-toolkit · 46 tokens

evals-design

Build an offline evaluation set so you can compare LLM prompts and models quantitatively. Invoke when building or iterating on any LLM-powered feature.

orlando-japan/claude-code-setting · 34 tokens