agentleFS
Manavarya09Manavarya09/cost-guardian/skills/cost-estimate/SKILL.md

cost-estimate

Skill35 starsChanged 7 months agoMITView on GitHub

Estimate the cost of a task before starting it. Analyzes task complexity, predicts token usage, and compares cost across all Claude models. Use when user says 'estimate cost', 'how much will this cost', 'cost estimate', or '/cost-estimate'.

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. jbarbier/claude-code-cost-estimate★ 110same name
    2. ulpi-io/browse★ 15same name
    3. mattprusak/cost-estimate★ 2same name
    4. Goodnessmbakara/codex-skills★ 1same name
    5. Jinbae10/skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always include the model comparison table.

    line 79

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 TypeTypical Tool CallsEst. Tokens
Bug fix (single file)5-105K-15K
Bug fix (multi-file)10-2515K-40K
Small feature15-3025K-60K
Medium feature30-6060K-150K
Large feature60-120150K-400K
Refactor (small)10-2015K-30K
Refactor (large)40-8080K-200K
Code review5-1510K-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>

Always include the model comparison table. Be honest about uncertainty — these are estimates, not guarantees.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.