sethgammon/citadel/cost
Claude Code and agent skill by sethgammon/citadel
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install sethgammon/citadel/costSKILL.md
The same SKILL.md was published earlier as sethgammon/citadel/cost.
/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:
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):
Today / Week / All (`/cost today`, `/cost week`, `/cost all`):
Campaign (`/cost campaign {slug}`):
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:
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:
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.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cost/SKILL.md
Popularity
- Repository stars
- 918
- Repository forks
- 82
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sethgammon/citadel/cost)