cost
Skill4 starsChanged 4 months agoMITView on GitHub
Deep cost exploration and transparency. Shows real token usage, session costs, campaign spend, burn rates, and model breakdown. Reads Claude Code's native session data for exact numbers. Complements /dashboard with focused cost views.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- gaia-research/skill-costtheir own version, first seen Nov 6, 2026
- SethGammon/Citadelword for word, first seen Nov 4, 2026
- DaeSeokSong/oh-my-ouroborostheir own version, first seen Nov 1, 2026
- serithemage/serverless-openclawtheir own version, first seen Oct 8, 2026
- NotHarshhaa/devops-skillstheir own version, first seen Sep 19, 2026
- jamillazarev/opsinisttheir own version, first seen Jul 31, 2026
Used with
Projects with it also use status.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkillstatus
Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.
Also in 3 projects that use this
Other versions11 projects use a version of this.
Word for word · 1
- SethGammon/Citadel★ 927100% same
Edited · 0
None found.
Wrote their own version · 10
- H-mmer/pentest-agents★ 815same name
- serithemage/serverless-openclaw★ 196same name
- maxvaega/awesome-skills★ 40same name
- NotHarshhaa/devops-skills★ 8same name
- DaeSeokSong/oh-my-ouroboros★ 3same name
- gaia-research/skill-cost★ 2same name
- srafis/skills★ 2same name
- gioe/tusk★ 1same name
- jamillazarev/opsinist★ 1same name
- berch-t/Kopern-OS★ 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 repository50 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architectSkill
- archonSkill
- ascii-diagramSkill
- autopilotSkill
- create-appSkill
- create-skillSkill
- daemonSkill
- dashboardSkill
- decision-mapSkill
- deploy-stewardSkill
- designSkill
- doc-genSkill
- doSkill
- evolveSkill
- experimentSkill
- fleetSkill
- grillSkill
- housecleanSkill
- improveSkill
- infra-auditSkill
- learnSkill
- live-previewSkill
- loopSkill
- mapSkill
- marshalSkill
- merge-reviewSkill
- organizeSkill
- postmortemSkill
- prdSkill
- pr-watchSkill
- qaSkill
- refactorSkill
- research-fleetSkill
- researchSkill
- reviewSkill
- scaffoldSkill
- scheduleSkill
- session-handoffSkill
- setupSkill
- systematic-debuggingSkill
- telemetrySkill
- test-genSkill
- triageSkill
- unharnessSkill
- verifySkill
- watchSkill
- wikiSkill
- workspaceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 9 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
When /do routes "how much", "what's the cost", "spending", "tokens", "burn rate"
- Distinctive: line 39
No argument -- show current session
- Very specific: line 45
Run the session-tokens.js script to get real token data:
- Very specific: line 58
If session-tokens.js is not available or fails, fall back to session-costs.jsonl data and clearly mark output as "(estimated)".
- Distinctive: line 133
After the cost data, add one of these contextual lines based on the numbers:
- Distinctive: line 135
If burn rate > $2/min: "Burn rate is high.
- Distinctive: line 137
If cache hit rate < 50%: "Low cache hit rate.
- Distinctive: line 139
If no real data available: "Cost data is estimated.
- Very specific: line 155
Use hardcoded pricing in session-tokens.js.
- Distinctive: line 180
Always show real data when available, estimated when not
- Distinctive: line 181
Always label data source: (real) vs (est)
- Very specific: line 182
Never claim specific dollar savings from Citadel -- show raw hook facts instead
- Distinctive: line 190
After displaying the report, wait for the next user command.
“Common” is measured: kept by at least 6 in 10 of the 7 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.
Files
/cost -- Session & Campaign Cost Explorer
When to Use
/cost-- current session cost and burn rate/cost today-- today's total spend/cost week-- this week's spend/cost campaign {slug}-- total spend for a specific campaign/cost all-- lifetime cost summary- When /do routes "how much", "what's the cost", "spending", "tokens", "burn rate"
Inputs
Optional arguments parsed from user message:
today-- filter to today's sessionsweek-- filter to last 7 dayscampaign {slug}-- filter to a specific campaignall-- show all-time data- No argument -- show current session
Protocol
Step 1: READ REAL DATA
Run the session-tokens.js script to get real token data:
node scripts/session-tokens.js # current/latest session
node scripts/session-tokens.js --today # today's sessions
node scripts/session-tokens.js --all # all sessions (use for week/all/campaign)Also read:
.planning/telemetry/cost-tracker-state.jsonfor live burn rate.planning/telemetry/session-costs.jsonlfor campaign attributionscripts/pricing.jsonto show which pricing is being used
If session-tokens.js is not available or fails, fall back to session-costs.jsonl
data and clearly mark output as "(estimated)".
Step 2: RENDER BASED ON SCOPE
Current session (/cost with no args):
=== Session Cost Report ===
Session: {sessionId (first 8 chars)}
Started: {relative time} ({absolute time})
Duration: {minutes} min
Tokens:
Input: {N} tokens
Output: {N} tokens
Cache creation: {N} tokens
Cache read: {N} tokens
Total: {N} tokens
Cost: ${total}
Burn rate: ${rate}/min
Messages: {N} ({N} main + {N} across {N} subagents)
Model breakdown:
claude-opus-4-6: {N} messages (${cost}, {pct}% of spend)
claude-haiku-4-5: {N} messages (${cost}, {pct}% of spend)
Cache efficiency: {pct}% of input tokens served from cache
(Higher = more cost-efficient. Cache reads cost 10x less than fresh input.)
Pricing source: scripts/pricing.json (version {version})Today / Week / All (/cost today, /cost week, /cost all):
=== Cost Report: {Today / This Week / All Time} ===
Summary:
Sessions: {N}
Total cost: ${total}
Subagents spawned: {N}
Total messages: {N}
Top 5 sessions by cost:
${cost} {duration}min {agents} agents {msgs} msgs {date}
${cost} {duration}min {agents} agents {msgs} msgs {date}
...
By campaign (from session-costs.jsonl):
{slug}: ${cost} across {N} sessions
_unattached: ${cost} across {N} sessions
Average session: ${avg_cost} | ${avg_rate}/min | {avg_duration} min
For historical charts and billing-window views: npx ccusageCampaign (/cost campaign {slug}):
=== Campaign Cost: {slug} ===
Total: ${cost} across {N} sessions ({N} agents, {N} min)
Average session: ${avg}
Sessions:
{date}: ${cost} ({duration} min, {agents} agents, {msgs} msgs)
{date}: ${cost} ({duration} min, {agents} agents, {msgs} msgs)
...Step 3: ADD CONTEXT
After the cost data, add one of these contextual lines based on the numbers:
- If burn rate > $2/min: "Burn rate is high. Consider whether subagent-heavy work could be restructured into smaller focused sessions."
- If cache hit rate < 50%: "Low cache hit rate. Long conversations with many tool results tend to have lower cache efficiency."
- If no real data available: "Cost data is estimated. Real token data becomes available when sessions complete and Claude Code writes session JSONL files."
- Otherwise: no extra context needed.
Step 4: FRINGE CASES
If scripts/session-tokens.js does not exist: Fall back to session-costs.jsonl data. Show estimated costs with "(est)" marker.
If no session data exists:
No session data found. Cost tracking requires Claude Code session files
at ~/.claude/projects/. These are created automatically by Claude Code.If pricing.json is missing or unreadable: Use hardcoded pricing in session-tokens.js. Note: "Using built-in pricing (pricing.json not found)."
If user asks about Pro/Max subscription costs:
Note: Pro/Max subscribers pay a flat monthly fee, not per-token.
The token counts shown here represent your usage volume, not billing.
For rate limit awareness, token throughput matters more than dollar cost.Fringe Cases
- Telemetry directory missing:
.planning/telemetry/does not exist — output: "No telemetry data found. Run any skill first to generate session data, then re-run /cost." - Malformed telemetry JSON: a
session-*.jsonfile fails to parse — output: "Telemetry file is corrupted. Delete.planning/telemetry/session-*.jsonand re-run the skill that generated it." Skip the bad file and continue with the rest. - MCP cost API returns no data: Claude Code is not tracking this session — output: "Session cost unavailable from MCP. Check that Claude Code is running with cost tracking enabled. Showing telemetry file data only." Fall back to session-costs.jsonl.
- All session files are from a different project: project paths in the files do not match the current working directory — warn: "Session files found belong to a different project. You may be in the wrong directory." List the project paths found in the session files.
Contextual Gates
Disclosure: "Reading telemetry and session data. No files modified." Reversibility: green — read-only; no files modified Trust gates:
- Any: full cost report, session data, campaign attribution.
Quality Gates
- Always show real data when available, estimated when not
- Always label data source: (real) vs (est)
- Never claim specific dollar savings from Citadel -- show raw hook facts instead
- Suggest ccusage for features we don't replicate (charts, billing windows)
- Round costs to 2 decimal places, tokens to nearest K/M
- Total output must fit on one screen for current-session view
Exit Protocol
/cost does not produce a HANDOFF block. It is a read-only cost exploration tool. After displaying the report, wait for the next user command.
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
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.

