Cost Guardian
Real-time cost tracking and budget management for Claude Code. Zero setup. No Docker. No Grafana. Just install and go.
Install: claude plugin install cost-guardian
Works with Claude Code · 40 GitHub stars
Install
claude plugin install cost-guardianInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →Cost Guardian
The only Claude Code cost tool that tells you WHERE you're wasting money and HOW to stop.
Other tools show what you spent. Cost Guardian shows what you wasted, what you got for it, and what you could have saved — with an efficiency score, ROI metrics, and model savings calculator that no other tool has.
Zero setup. No Docker. No Grafana. Just install and go.
What Makes This Different
Every cost tracking tool shows you a number. Cost Guardian gives you intelligence:
| Feature | Cost Guardian | ccusage | claude-code-otel | Built-in /cost |
|---|---|---|---|---|
| Real-time tracking | ✅ | ❌ (post-hoc) | ✅ | ✅ |
| Budget guardrails | ✅ | ❌ | ❌ | ❌ |
| Waste detection | ✅ | ❌ | ❌ | ❌ |
| Efficiency score | ✅ | ❌ | ❌ | ❌ |
| Cost-per-line ROI | ✅ | ❌ | ❌ | ❌ |
| Model savings calculator | ✅ | ❌ | ❌ | ❌ |
| Anomaly detection | ✅ | ❌ | ❌ | ❌ |
| GitHub badge | ✅ | ❌ | ❌ | ❌ |
| Per-branch costs | ✅ | ❌ | ❌ | ❌ |
| Multi-model comparison | ✅ | ❌ | ❌ | ❌ |
| CSV/JSON export | ✅ | ✅ | ✅ | ❌ |
| Zero setup | ✅ | ✅ | ❌ (Docker) | ✅ |
Insights Engine (No Other Tool Has This)
Efficiency Score
Every session gets a score from 0-100 showing how efficiently you're spending:
Efficiency Score: 68/100
██████████████░░░░░░ Good
Wasted: $1.43 of $4.71 (30%)
14 redundant file reads ($0.82)
3 failed/empty bash commands ($0.34)
2 calls were 3x+ more expensive than average ($0.27)
Cost-Per-Line ROI
Know what you're getting for your money:
Cost per line: $0.03/line
Lines added: +247
Lines removed: -89
Cost per commit: $1.18/commit
Model Savings Calculator
See how much you could save with different models:
Current spend: $4.71
Cheapest option: $1.02 (Claude Haiku 4.5)
Potential saving: $3.69 (78% cheaper)
Anomaly Detection
Catches runaway sessions before they drain your limits:
ANOMALY: 3.2x your average session cost
This session: $14.20 | Average: $4.40
Top driver: Agent ($9.80, 4x)
GitHub Badge
Add your AI development cost to your README:
The Problem
Every Claude Code user has been there:
- "Why did my session use 80% of my daily limit in 20 minutes?"
- "How much did that refactor actually cost me?"
- "I wish I knew this feature would cost $15 before I started"
There's no built-in way to see what you're spending as you spend it. Existing solutions require Docker, Grafana, or OpenTelemetry infrastructure. Most developers just... guess.
The Solution
Cost Guardian is a Claude Code plugin that gives you full cost visibility with zero setup:
Similar plugs
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code, like 「agent harness」, built from 0 to 1
Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro…
Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…