cost

cost is a command for Claude Code from closedloop-ai/claude-plugins. It costs 51 tokens per session (1,080 once invoked), scanned A, original, Apache-2.0.

A cost-reporting command that measures token usage from code-review session records. Tokens are the units used to process and generate text.

In plain words
What is it for?
Use it to compare total and typical review costs, main-agent versus subagent spending, token types, depth levels, and reviewer roles.
Why use it?
It shows where a review spends its model-processing budget, which can reveal expensive reviewer roles, review depths, or cache traffic.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the code-review plugin — 5 skills, 4 commands, 2 agents shipped together

Good fit Use it to compare total and typical review costs, main-agent versus subagent spending, token types, depth levels, and reviewer roles.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add closedloop-ai/claude-plugins
Claude Code
/plugin install code-review

Made for: Claude Code.

Or install code-review, the plugin that ships this one along with the rest of its 5 skills, 4 commands, 2 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/cost/github.svg)](https://agentmods.dev/commands/closedloop-ai/claude-plugins/cost)
Your own site
<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/cost"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/cost/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

Your own site · 80×15
<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/cost"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/cost.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,080 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.00051 $0.01080
Opus 5.5 $0.00020 $0.00432
Sonnet 5.5 $0.00010 $0.00216
Haiku 4.5 $0.00005 $0.00108

Measured 3mo ago against content hash a4051e246ca8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cost 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 3mo 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.

plugins/code-review/commands/cost.md · 60 lines

How it starts

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

Code-Review Cost Report

review_result.json's telemetry block carries no token data — the Python review pipeline never sees usage. The real numbers live only in the Claude Code session transcripts (~/.claude/projects/<encoded-cwd>/<session>.jsonl plus the per-session subagents/agent-*.jsonl fleet). This command runs a bundled analyzer over those transcripts and attributes spend.

What it reports

  • Total / mean / median / p90 cost across the matched sessions.
  • Main orchestrator vs subagent fleet split (the walker is typically ~65% of spend).
  • Cost by token kind — cache read, 1h/5m cache write, output, input. Cache traffic dominates a long walker loop.
  • Cost by depth tier — deep / standard / shallow, each with mean/median cost, main% split, mean turns, and mean agent count. Depth is resolved from the command variant and --depth args (a bare /code-review:start is standard; :deep/:shallow bind their tier), so this is the like-for-like axis. Pooling depths together makes the headline mean meaningless when the mix of tiers shifts.
  • Cost by reviewer role — bug_hunter, domain_critic, premise, impact_analyzer, auditor, verifier, etc., with $/run so you can see ROI per agent type.
  • Top sessions by cost, with turn count and agent count.

Costs are ESTIMATES: raw transcript token counts × public Anthropic list prices, no 1M-context premium or committed-use discount applied. The value is a consistent yardstick for measuring relative cost and the delta from a change.

Run it

The tool is a self-contained Node bundle (Node 18+, no install):

# Scan every code-review session under ~/.claude/projects and print the report
node ${CLAUDE_PLUGIN_ROOT}/scripts/dist/cost-report.mjs --scan

# One specific session
node ${CLAUDE_PLUGIN_ROOT}/scripts/dist/cost-report.mjs --session ~/.claude/projects/<proj>/<session>.jsonl

# Every code-review session in one project directory
node ${CLAUDE_PLUGIN_ROOT}/scripts/dist/cost-report.mjs --project ~/.claude/projects/<proj>

Read the full file on GitHub · 60 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. 3mo ago First seen · 60 lines · 51 tokens per session scan A a4051e246ca8

Subscribe to this mod's changes

cost is a command published in the GitHub repository closedloop-ai/claude-plugins (122 stars, last pushed today), licensed Apache-2.0. It adds 51 tokens to every session and 1,080 once invoked, about $0.0002 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-30.

Related

cost compared with commands from other repositories

cost next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
costclosedloop-ai/claude-pluginsCommand122todayApache-2.0A51Claude Code
spreadsheet-auditintellegix/intellegix-code-agent-toolkitCommand578d agoMITA0Claude Code
custom-briefhoangsonww/AI-News-BriefingCommand458d agoMITA26Claude Code
growth-emailchristopherlouet/claude-baseCommand5yesterdayMITA0Claude Code
fd-introspectRapierCraftStudios/ForgeDockCommand117todayAGPL-3.0A20Claude Code
cwb-relaxjaychempan/coding-with-beatCommand1125mo agoMITA37Claude Code
digestjaroslavsoucek-art/GiovanniCommand210d agoMITA0Claude Code