cost-estimate

cost-estimate is a skill for Claude Code from Manavarya09/cost-guardian. It costs 57 tokens per session (751 once invoked), scanned A, original, MIT.

A task-cost calculator that estimates the work involved in a coding request and compares the predicted token cost across Claude models.

In plain words
What is it for?
Estimating the cost of bug fixes, features, refactors, and code reviews using the task description and the project files involved.
Why use it?
It gives an early estimate of likely files, tool calls, and token usage before work begins, helping you choose a suitable model and budget.

Skill for Claude Code

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

Part of the cost-guardian plugin — 4 skills shipped together

Good fit Estimating the cost of bug fixes, features, refactors, and code reviews using the task description and the project files involved.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/manavarya09/cost-guardian/cost-estimate
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 Manavarya09/cost-guardian --skill cost-estimate
Clone the repo
git clone --depth 1 https://github.com/Manavarya09/cost-guardian

Made for: Claude Code.

Or install cost-guardian, the plugin that ships this one along with the rest of its 4 skills.

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 cost-estimate

README.md
[![agentmods](https://agentmods.dev/badge/skills/manavarya09/cost-guardian/cost-estimate/github.svg)](https://agentmods.dev/skills/manavarya09/cost-guardian/cost-estimate)
Your own site
<a href="https://agentmods.dev/skills/manavarya09/cost-guardian/cost-estimate"><img src="https://agentmods.dev/badge/skills/manavarya09/cost-guardian/cost-estimate/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 cost-estimate

Your own site · 80×15
<a href="https://agentmods.dev/skills/manavarya09/cost-guardian/cost-estimate"><img src="https://agentmods.dev/badge/skills/manavarya09/cost-guardian/cost-estimate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 751 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.00057 $0.00751
Opus 5 $0.00028 $0.00376
Sonnet 5 $0.00011 $0.00150
Haiku 4.5 $0.00006 $0.00075

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

Security

Grade A, and why

cost-estimate 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.

skills/cost-estimate/SKILL.md · 80 lines

How it starts

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

Cost Estimate

Estimate the cost of a coding task before execution, with multi-model comparison.

Process

  1. Analyze the task description from $ARGUMENTS
  2. Assess complexity by examining the codebase:
    • Count files that will likely need reading (use Glob to find relevant files)
    • Count files that will likely need editing
    • Estimate number of tool calls needed
  3. Calculate estimated cost using these heuristics:

Cost Heuristics by Task Type

Task Type Typical Tool Calls Est. Tokens
Bug fix (single file) 5-10 5K-15K
Bug fix (multi-file) 10-25 15K-40K
Small feature 15-30 25K-60K
Medium feature 30-60 60K-150K
Large feature 60-120 150K-400K
Refactor (small) 10-20 15K-30K
Refactor (large) 40-80 80K-200K
Code review 5-15 10K-30K
  1. Show multi-model comparison using the estimated tokens:
node "${CLAUDE_SKILL_DIR}/../../scripts/pricing.js" compare <est_input_tokens> <est_output_tokens> <current_model>
  1. Check historical data for context:
node -e "
  const store = require('${CLAUDE_SKILL_DIR}/../../scripts/store');
  store.initDb();
  const daily = store.getDailyBreakdown(30);
  if (daily.length > 0) {
    const avg = daily.reduce((s, d) => s + d.cost, 0) / daily.length;
    console.log('Your avg daily spend: \$' + avg.toFixed(2) + ' (' + daily.length + ' days tracked)');
  }
  const total = store.getTotalEntries();
  console.log('Total tracked tool calls: ' + total);
"

Output Format

Present the estimate clearly:

Cost Estimate: <task description>

Complexity:    <Low/Medium/High>
Est. Reads:    <N files>
Est. Edits:    <N files>
Est. Tools:    <N total tool calls>
Est. Tokens:   <N total tokens>

Model Comparison:
  Model                              Input    Output     Total
  ─────────────────────────────────────────────────────────────
  Claude Haiku 4.5                    $0.04    $0.20     $0.24
  Claude Sonnet 4.6                   $0.15    $0.75     $0.90  ← current
  Claude Opus 4.6                     $0.75    $3.75     $4.50

  💡 Claude Haiku 4.5 would be 73% cheaper

Based on: <reasoning>

Read the full file on GitHub · 80 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 · 80 lines · 57 tokens per session scan A 989b3cc00d8f

Subscribe to this mod's changes

cost-estimate is a skill published in the GitHub repository Manavarya09/cost-guardian (35 stars, last pushed 2mo ago), licensed MIT. It adds 57 tokens to every session and 751 once invoked, about $0.0003 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-30.