Agent skill

Codebase Cost Estimate

by jbarbier in jbarbier/claude-code-cost-estimate

Estimates what a codebase would cost a traditional human team to rebuild, with P10, P50 and P90 ranges cross-checked by COCOMO II, Function Points and LOCOMO.

No licenceAuto-check passedDevelopment

Install Codebase Cost Estimate

skills CLI
$ npx skills add jbarbier/claude-code-cost-estimate --skill cost-estimate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jbarbier/claude-code-cost-estimate cost-estimate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jbarbier/claude-code-cost-estimate.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/cost-estimate .claude/skills/cost-estimate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cost-estimate
GitHub stars
111
Token cost
~5k tokens
SKILL.md length
2,294 words
Files
18 (incl. scripts, references, assets)
Skills in repo
1
Repo updated
First seen
Licence
None found

At a glance

Estimates what a codebase would cost a traditional human team to rebuild, with P10, P50 and P90 ranges cross-checked by COCOMO II, Function Points and LOCOMO.

  • Works in 12 steps: Pick a strategy (size-aware) → Measure the codebase (code signals) → Gather process signals (git) → …
  • Estimating how much a codebase would have cost to build with a human team
  • SKILL.md covers Philosophy (read first, do not…, Core invariants (read and…, Bundled resources (progressive… and Workflow — 12 steps, plus 10 more sections
  • Runs Python and Shell scripts from its folder; calls python3, bash and git

What it does

The skill estimates replacement cost, meaning what a traditional team would spend to recreate the codebase from scratch with specs in hand. It is not market value or a quote, and the report says so up front. Generated code, vendored dependencies, minified bundles, lockfiles and binaries are filtered out before counting, because lines of code are only a proxy and get cross-checked against git history signals.

Every figure carries a range, with P10 optimistic, P50 the median and P90 pessimistic, and precision is kept to two significant figures. A four-way cross-check combines a bottom-up estimate with COCOMO II, Function Points and LOCOMO, and overheads for architecture, debugging, review and docs are compounded, not added. The skill also works out real Claude-session token costs for an ROI view, researches market rates and writes a machine-readable artifact. Bundled scripts count lines, read git signals and cluster sessions.

When your agent uses it

  • Estimating how much a codebase would have cost to build with a human team
  • Working out the ROI of Claude or Copilot on a repository
  • Producing a ranged effort estimate with COCOMO II or Function Points

Example prompts

  • “How much would it have cost a human team to build this repo?”
  • “What is the ROI of using Claude on this codebase, going by the git history?”
  • “Estimate this project with COCOMO and Function Points and give me P10, P50 and P90 ranges.”

Requirements

  • A git repository to analyze
  • Python and a shell for the bundled scripts

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Pick a strategy (size-aware)
  2. Measure the codebase (code signals)
  3. Gather process signals (git)
  4. Categorize & calculate base hours (with ranges)
  5. Cross-checks (three independent sanity checks)
  6. Overhead multipliers (compounding, no double-count)
  7. Market rates
  8. Organizational overhead → calendar time
  9. Full team cost
  10. Claude ROI (session-aware, churn-aware, reviewer-aware, concurrency-aware)
  11. Sensitivity & cross-validation
  12. Generate the report

What it can do on your machine

Read from SKILL.md and the folder at commit d8a28a1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python and Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • bash
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codebase Cost Estimate loads about 5k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 144 tokens; SKILL.md has 2,294 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~144
When it runs · the whole SKILL.md, loaded when a task matches
~5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 2,294 words (~5,031 tokens).

“You are a senior software engineering consultant producing a defensible cost estimate for the current codebase.”

— opening of SKILL.md by jbarbier
name
cost-estimate

Read the full SKILL.md on GitHub

Files

SKILL.md and 17 other files (scripts, references, assets) in .claude/skills/cost-estimate of jbarbier/claude-code-cost-estimate.

  • SKILL.md
  • assets/artifact-schema.json
  • assets/report-template.md
  • references/category-rates.md
  • references/claude-roi.md
  • references/cocomo-ii.md
  • references/cross-validation.md
  • references/function-points.md
  • references/locomo.md
  • references/market-rates.md
  • references/overhead-multipliers.md
  • references/team-cost.md
  • scripts/claude_token_cost.py
  • scripts/compute_dryness.py
  • scripts/count_loc.sh
  • scripts/git_session_clustering.py
  • scripts/git_signals.sh
  • scripts/resolve_outdir.py

Open the folder on GitHubat commit d8a28a1

Compare with similar skills

Codebase Cost Estimate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codebase Cost Estimate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codebase Cost Estimate this skilljbarbier/claude-code-cost-estimate111—~5kAutomated safety check: PassNone
Levyra Context EfficiencyLUC4N3X/Levyra-deepsound533—~1.3kAutomated safety check: NotesGPL-3.0
Review Deltatirth8205/code-review-graph32k—~325Automated safety check: PassMIT
Update Milvus SDK Docsmilvus-io/web-content138—~13kAutomated safety check: PassApache-2.0
Agentsop Aideragentsope/SkillAlchemy466—~3.5kAutomated safety check: PassMIT
Vibepcx-wave/vibe-skill120—~7.2kAutomated safety check: NotesMIT

Similar skills

  • Levyra Context Efficiency

    LUC4N3X/Levyra-deepsound

    A skill your agent uses for genuinely high-volume Levyra work such as builds, tests, lint, logs, broad searches, dependency output, Git/GitHub or CodeRabbit inspection, CI diagnostics, agent setup…

    533 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check: notes
  • Review Delta

    tirth8205/code-review-graph

    Reviews only the code changed since the last commit, using a code-graph MCP server to find risk-scored changes, test gaps and the blast radius, then writes a short report.

    32k GitHub stars~325 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Update Milvus SDK Docs

    milvus-io/web-content

    Update the Milvus SDK API reference documentation under APIReference/ in the web-content repository so it reflects a new SDK release, using the SDK repository's git tags as ground truth.

    138 GitHub stars~13k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Agentsop Aider

    agentsope/SkillAlchemy

    SOP for terminal-based, git-native AI pair programming with Aider (git work-tree + tree-sitter repo-map + edit-format + human-in-loop REPL).

    466 GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Vibe

    pcx-wave/vibe-skill

    Delegate a coding task to Mistral Vibe and supervise the result via git diff.

    120 GitHub stars~7.2k tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check: notes
  • Handover

    k1ein-chen/Harness-Starter

    将当前会话中的技术决策、运维流程或阶段性研发进展,归档为标准工程文档(ADR / SOP / Handover),并自动更新模块内的 README 归档索引。

    119 GitHub stars~752 tokensUpdated 15 days ago
    DevelopmentAuto-check passed

Works with

Questions about Codebase Cost Estimate

What does Codebase Cost Estimate do?

Estimates what a codebase would cost a traditional human team to rebuild, with P10, P50 and P90 ranges cross-checked by COCOMO II, Function Points and LOCOMO. The skill estimates replacement cost, meaning what a traditional team would spend to recreate the codebase from scratch with specs in hand. It is not market value or a quote, and the report says so up front.

When should I use Codebase Cost Estimate?

Codebase Cost Estimate fits situations like: estimating how much a codebase would have cost to build with a human team; working out the ROI of Claude or Copilot on a repository; producing a ranged effort estimate with COCOMO II or Function Points.

How do I install Codebase Cost Estimate in Claude Code?

Run `npx skills add jbarbier/claude-code-cost-estimate --skill cost-estimate -a claude-code`. Or copy the skill folder (.claude/skills/cost-estimate in jbarbier/claude-code-cost-estimate) into .claude/skills/cost-estimate in your project. Claude Code loads it when a task matches its description.

How do I install Codebase Cost Estimate in Codex?

Run `npx skills add jbarbier/claude-code-cost-estimate --skill cost-estimate -a codex`. Or copy the skill folder (.claude/skills/cost-estimate in jbarbier/claude-code-cost-estimate) into .agents/skills/cost-estimate in your project. Codex loads it when a task matches its description.

Can I use Codebase Cost Estimate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jbarbier/claude-code-cost-estimate --skill cost-estimate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cost-estimate, .gemini/skills/cost-estimate, .github/skills/cost-estimate and .opencode/skills/cost-estimate in your project.

What does Codebase Cost Estimate need to run?

Going by SKILL.md and its folder, Codebase Cost Estimate needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (python3, bash and git). Our summary lists: A git repository to analyze; Python and a shell for the bundled scripts.

Does Codebase Cost Estimate access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Codebase Cost Estimate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Codebase Cost Estimate use?

No licence was found for Codebase Cost Estimate or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Codebase Cost Estimate use?

About 5k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.3k tokens, read only when the agent opens those files.

What are the alternatives to Codebase Cost Estimate?

Skills that share tags, products or a category with Codebase Cost Estimate: Levyra Context Efficiency (LUC4N3X/Levyra-deepsound, 533 stars), Review Delta (tirth8205/code-review-graph, 32k stars), Update Milvus SDK Docs (milvus-io/web-content, 138 stars) and Agentsop Aider (agentsope/SkillAlchemy, 466 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codebase Cost Estimate?

jbarbier (a GitHub user) maintains it in jbarbier/claude-code-cost-estimate, which has 111 GitHub stars. The repository was last updated on April 20, 2026.

Source: jbarbier/claude-code-cost-estimate on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.