By aasadi1978
Two complementary cost views for Claude users plus a live statusline: /claude-spend pulls authoritative billed cost from the Anthropic Admin API; /claude-usage parses local ccusage logs for per-project / per-session / per-tool token + cost breakdowns plus an optional Streamlit dashboard; statusline.ps1 (Windows/PowerShell, opt-in) shows model + context bar + cache + per-session cost in every turn. Also /spend-overview consolidates billed spend across Anthropic, OpenAI, Tavily, Google Cloud (Gemini), Perplexity and Voyage AI into one USD-normalized table (ECB FX for EUR invoices).
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Use when the user wants to see actual Anthropic-billed cost — invoked as /claude-spend [days] or natural language like "show my Claude spend", "how much have I spent on Anthropic this month", "anthropic billing this week", "what's my Claude bill". Distinct from /claude-usage (client-side ccusage estimate).
Use when the user wants a token + cost breakdown of their LOCAL Claude Code activity (via ccusage parsing ~/.claude/projects/**/*.jsonl) — invoked as /claude-usage [daily|session|current|monthly|project|live|--live|--g|--graph|--report], or natural language like "show my Claude usage", "how many tokens have I used", "per-project Claude cost", "ccusage report". Distinct from /claude-spend (Anthropic Admin API billed cost).
Use when the user wants a single consolidated view of spend across ALL their AI/API providers — invoked as /spend-overview [months] or natural language like "show all my AI spend", "multi-provider billing overview", "how much across OpenAI, Gemini, Perplexity, Tavily, Voyage and Claude", "total API spend this quarter". Distinct from /claude-spend (Anthropic only) and /claude-usage (Claude ccusage estimate).
A Claude Code plugin with two complementary cost views for anyone working with Claude / the Anthropic API:
| Slash command | Source of numbers | Authority | Per-project breakdown |
|---|---|---|---|
/claude-spend | Anthropic Admin API cost_report | Billed | Per-model only |
/claude-usage | ccusage parsing ~/.claude/projects/**/*.jsonl | Estimate | Yes (rich) |
/claude-spend answers "what did Anthropic actually charge me?" /claude-usage answers "which of my projects/sessions/tools burned the most tokens?" Use the right one for the question.
There's also an opt-in statusline (statusline.ps1, Windows/PowerShell) that paints model + context-window % + cache stats + per-session cost into Claude Code's status bar every turn — see the Statusline section below.
/claude-spend 7:
Anthropic billed cost — last 7 days (since 2026-05-18 UTC)
================================================================
TOTAL: $42.71
By day:
2026-05-18 $ 3.21 ██████
2026-05-19 $ 5.04 █████████
...
By model:
$ 21.12 claude-opus-4-7
$ 14.06 claude-sonnet-4-6
$ 7.53 claude-haiku-4-5
/claude-usage project:
| Project | Cost-eq | Sessions | Tokens (M) | Cache % |
|----------------------------------|---------|----------|------------|---------|
| C:\Users\you\Projects\claude-spend| $34.18 | 12 | 8.3 | 87% |
| C:\Users\you\Projects\experiments | $18.42 | 7 | 4.9 | 82% |
| ... |
/plugin install https://github.com/aasadi1978/claude-spend.git
/plugin marketplace add aasadi1978/claude-spend
/plugin install claude-spend
Clone the repo, then:
/plugin install /absolute/path/to/claude-spend
After install, /help lists both /claude-spend and /claude-usage, and Claude will also invoke the skills on natural-language queries.
/claude-spend (Admin API key)Required only if you want the billed cost view.
~/.claude/.anthropic-admin-keyC:\Users\<you>\.claude\.anthropic-admin-keyThe script resolves the path via Path.home() — same plugin works on every OS.
/claude-usage (Python deps + ccusage)Required only if you want the local usage view.
# Python deps for the per-project / chart / report / dashboard subcommands
pip install pandas plotext plotly streamlit
# ccusage CLI (downloaded automatically by npx on first run — no manual install needed)
# Just make sure node/npx is on PATH: npx --version
The plain /claude-usage (daily summary) only needs npx — Python deps are only for project, --g, --graph, and --report subcommands. Each script catches ModuleNotFoundError and prints the install command, so you'll find out exactly when you need them.
/claude-spend — billed cost/claude-spend # last 30 days
/claude-spend 7 # last 7 days
/claude-spend 90 # last quarter
/claude-spend 365 # last year (the max)
Natural language: "what's my Anthropic spend this month?", "how much have I been charged for Claude this week?"
/claude-usage — local token + cost breakdown via ccusage/claude-usage # daily rollup (default)
/claude-usage daily # same as above
/claude-usage session # per-session breakdown
/claude-usage current # just this session (resolves the UUID for you)
/claude-usage monthly # monthly rollup
/claude-usage project # per-project Markdown table (needs pandas)
/claude-usage --g # terminal bar charts (needs pandas + plotext)
/claude-usage --graph # Streamlit dashboard (needs pandas + plotly + streamlit)
/claude-usage --report # CSV + Markdown report (needs pandas)
/claude-usage --live # printout: how to run the live 5h burn-rate TUI yourself
Natural language: "per-project cost", "how many tokens have I used", "show my ccusage report".
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimnpx claudepluginhub aasadi1978/claude-spend --plugin claude-spendHarness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Binary reverse engineering, malware analysis, firmware security, and software protection research for authorized security research, CTF competitions, and defensive security
v9.44.1 — Patch release for Gemini environment/version detection and qwen auth gating. Run /octo:setup.
Next.js development expertise with skills for App Router, Server Components, Route Handlers, Server Actions, and authentication patterns
Comprehensive .NET development skills for modern C#, ASP.NET, MAUI, Blazor, Aspire, EF Core, Native AOT, testing, security, performance optimization, CI/CD, and cloud-native applications