ccc-cost

ccc-cost is a command for Claude Code from KevinZai/commander. It costs 41 tokens per session (799 once invoked), scanned A, original, MIT.

A dashboard that reads spending and token-use data from an Agent HQ service and groups it by day, agent, or model.

In plain words
What is it for?
Use it to check recent and total costs, compare agents or models, view message counts, and configure a budget alert.
Why use it?
It makes the cost of running multiple AI coding sessions visible so you can monitor spending and set a daily warning threshold.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads .claude/ paths; names the AskUserQuestion tool; positional $N argument.

Good fit Use it to check recent and total costs, compare agents or models, view message counts, and configure a budget alert.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kevinzai/commander/ccc-cost
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.

Clone the repo
git clone --depth 1 https://github.com/KevinZai/commander

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-cost"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-cost.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 799 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00041 $0.00799
Opus 5.5 $0.00016 $0.00320
Sonnet 5.5 $0.00008 $0.00160
Haiku 4.5 $0.00004 $0.00080

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

Security

Grade A, and why

ccc-cost scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s --max-time 3 "$COST_API_URL/api/costs"
commands/ccc-cost.md · 76 lines

How it starts

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

/ccc-cost — what sessions are costing

CC Commander · /ccc-cost · a spend dashboard from the first cost source this machine has.

Every figure here is an estimate computed from token counts and per-model rates, not a bill. Say so whenever you quote a number; point to the provider's billing page for the invoice.

What happens

  1. Find a cost source, in this order, and use the first that answers:

    1. A cost API the user runs, when COST_API_URL is set (opt-in):

      curl -s --max-time 3 "$COST_API_URL/api/costs"
      

      Expected JSON fields: today, todayTokens, yesterday, yesterdayTokens, total, totalTokens, and a per-agent list with cost and messages.

    2. ccusage, when installed (opt-in, absent by default; check with command -v ccusage):

      ccusage daily --json
      
    3. Commander's local log ~/.claude/commander/mission-control/metrics.jsonl (cost per app per day), read with the Read tool.

    If none answers, say "No cost source found. Set COST_API_URL, install ccusage, or run /ccc-usage for Commander's estimates." and stop. That is not an error.

  2. Print the dashboard from the parsed data:

    Cost dashboard (estimates)
    Today:     $<today>      (<todayTokens> tokens)
    Yesterday: $<yesterday>  (<yesterdayTokens> tokens)
    Total:     $<total>      (<totalTokens> tokens)
    
    By agent:
      <agent>  $<cost>  <bar scaled to the top agent>  <messages> msgs
    

    Omit a row or section the source does not provide rather than filling it with zeros.

  3. Budget alert. Read the daily threshold from ~/.claude/commander/cost-budget.json ({"dailyUsd": <number>}); default to $5.00 when the file is absent. If today's spend exceeds it, print:

    ⚠️ Daily spend: $<amount> (threshold: $<threshold>)
    
  4. Ask with AskUserQuestion (Codex: a plain-text question):

    • 🟢 Daily breakdown — cost per day for the last 7 days
    • By agent — cost and message count per agent
    • By model — costs grouped by the model ids the source reports (ccusage daily --breakdown when ccusage is the source)
    • Set budget alert — asks for a daily threshold and saves it

Read the full file on GitHub · 76 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. 1mo ago Changed d111c949a03b
  2. 1mo ago Changed · +31 lines · +33 tokens per session 98e3829aacf3
  3. 2mo ago First seen · 45 lines · 8 tokens per session scan A 9b1ab8e80783

Subscribe to this mod's changes

ccc-cost is a command published in the GitHub repository KevinZai/commander (6 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 799 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

ccc-cost compared with commands from other repositories

ccc-cost next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ccc-costKevinZai/commanderCommand6yesterdayMITA41Claude Code
loopskullninja/coco-workflowCommand71mo agoMITA28Claude Code
phaseskullninja/coco-workflowCommand71mo agoMITA21Claude Code
statusskullninja/coco-workflowCommand71mo agoMITA17Claude Code
justone-publishGodsB1025/justoneCommand26mo agoMITA22Claude Code
checklistgithub/spec-kitCommand153ktodayMITA13Claude Code
clarifygithub/spec-kitCommand153ktodayMITA27Claude Code