{
  "markdown": "# burn\n\nClaude Code plugin that estimates what your token usage would cost at Anthropic API rates. Adds cost breakdowns by project/model/time and what-if comparisons.\n\n> **Cheap to run.** `/burn` just calls a Python script — Claude reads the output and prints it. A single invocation costs \\~2-3K tokens (~$0.01 on Opus API rates). To skip Claude entirely, run the script directly:\n> ```bash\n> python3 ~/.claude/plugins/claude-money-burn/skills/burn/scripts/estimate_cost.py        # current session\n> python3 ~/.claude/plugins/claude-money-burn/skills/burn/scripts/estimate_cost.py --all   # all conversations\n> ```\n\n## Installation\n\n```bash\n/plugin install into-the-intraverse/claude-money-burn\n```\n\nOr manually:\n\n```bash\ngit clone https://github.com/into-the-intraverse/claude-money-burn ~/.claude/plugins/claude-money-burn\n```\n\n## Usage\n\n```\n/burn                          # Current session\n/burn --all                    # All conversations\n/burn --all --days 7           # Last 7 days\n/burn --all --top 5            # Top 5 by cost\n/burn --all --export csv       # Export to CSV\n```\n\nNatural language works too:\n\n```\n/burn 3d this project          # Last 3 days, current project\nhow much did i burn this week? # Last 7 days\nwhat's my burn rate?           # Current session cost\n```\n\n## What it does\n\nScans your local `~/.claude/` data and calculates what your usage would cost on the Anthropic API (pay-per-token). The dollar amounts are **not your actual bill** — they show the equivalent API cost so you can compare subscription vs pay-per-token.\n\n- **On a subscription?** See if your plan pays for itself vs API pricing.\n- **On the API?** See where your money goes — by project, model, and time period.\n- **Considering switching?** Compare what you'd pay on each plan.\n\n## How it works\n\nUses two data sources for accuracy:\n\n1. **`~/.claude/stats-cache.json`** — for headline token totals in `--all` mode. Same data source as `/stats`, merged with live JSONL via `max()` per field.\n2. **JSONL conversation files** — for per-conversation analysis, per-project breakdown, time-filtered views, and cost estimation. Applies the same filters as `/stats`: skips `isSidechain` messages (alternate branches) and `<synthetic>` model entries.\n\nTokens are tracked per-model per-message and priced with cache-aware rates. Fast mode messages (from `/fast` toggle) are detected and priced at 6x. Subagent files are excluded — their tokens are already reflected in the parent conversation's API usage.\n\nStdlib-only Python, no dependencies.\n\n### Precision\n\nEstimates are close but not exact — the two data sources have complementary blind spots:\n\n| Source | Freshness | Completeness |\n|--------|-----------|--------------|\n| `stats-cache.json` | Stale (recomputed daily) | Complete (retains deleted JSONL files' tokens) |\n| JSONL files | Live (includes current session) | Incomplete (old files may be pruned) |\n\n`/burn` merges both with `max(cache, JSONL)` per token field and adds the estimated cost of tokens present in cache but missing from JSONL.\n\n| Metric | vs `/stats` | Why |\n|--------|-------------|-----|\n| Headline tokens | ≥100% | `max(cache, JSONL)` — always ≥ `/stats`, slightly higher when cache is stale |\n| Cost estimate | ~99.9% | Deleted JSONL files' cost estimated at dominant model rate (~$0.80 on $1,500+) |\n| Per-model tokens | ~97-100% | JSONL only — may undercount if old conversation files were pruned |\n\n### What's included in the estimate\n\n| Pricing factor | Accounted for? | Notes |\n|---|---|---|\n| Per-model rates | Yes | Tokens tracked per-message, priced by actual model used |\n| Prompt caching | Yes | Cache reads at 0.10x, cache writes at 1.25x input rate |\n| Fast mode (6x) | Yes | Detected from `speed` field on each message |\n| Batch API (50% off) | N/A | Claude Code is interactive, not batch |\n| Long context (2x >200k) | N/A | Opus 4.6/Sonnet 4.6 have standard pricing at all lengths |\n| Data residency (1.1x) | No | Only applies if `inference_geo` is set to US-only |\n\n## Pricing\n\nRates from [platform.claude.com/docs/en/about-claude/pricing](https://platform.claude.com/docs/en/about-claude/pricing) (USD per million tokens):\n\n| Model | Input | Output | Cache write | Cache read |\n|-------|------:|-------:|------------:|-----------:|\n| Opus 4.6/4.5 | $5 | $25 | $6.25 (1.25x) | $0.50 (0.10x) |\n| Sonnet 4.6/4.5/4 | $3 | $15 | $3.75 (1.25x) | $0.30 (0.10x) |\n| Haiku 4.5 | $1 | $5 | $1.25 (1.25x) | $0.10 (0.10x) |\n| Opus fast mode | $30 | $150 | $37.50 (1.25x) | $3.00 (0.10x) |\n\n## Structure\n\n```\nclaude-money-burn/\n├── .claude-plugin/\n│   └── plugin.json              # Plugin metadata\n├── skills/\n│   └── burn/\n│       ├── SKILL.md             # Skill definition\n│       └── scripts/\n│           └── estimate_cost.py # The estimator script\n├── CLAUDE.md                    # Dev instructions\n└── README.md\n```\n",
  "bytes": 4848,
  "sha": "4c4e0758806e474799835256067333c72e91d5b7948d0b60711dd12c1efba656",
  "repo_slug": "into-the-intraverse/claude-money-burn",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_into_the_intraverse_claude_money_burn_bu_2fee8c7a/readme"
}