{"slug":"cost-guard","title":"cost-guard","description":"Real-time USD cost enforcement for Claude Code. Halts runaway agentic loops mid-step before they burn through your budget.\n\nThe plugin enforces real-time USD cost limits in Claude Code. It uses hooks to read the session's the moment any cap is crossed — between tool batches, between turns, or at prompt-submit time. The result: a single greedy turn cannot spiral into a $30+ spend, sessions cannot silently accumulate cost over hours, and runaway burn rates are stopped before they hurt.\n\nFive configurable USD-based caps:\n• Per-session total spend\n• Per-step (prompt → response) cost\n• Trailing 5-minute burn rate\n• Per-step subagent fan-out count\n• Compaction gate (blocks the expensive context-compaction model call when limits are tight)\n\nEleven slash commands for status, runtime config, pause/resume, and an optional bottom-row indicator.\n\nThe indicator shows session spend, rate, current step cost, context %, and (on Claude.ai Pro/Max) 5-hour slot consumption with an estimated USD plan value. It composes with any existing statusLine (preserving your starship setup, etc.) or takes over the slot — your choice at install time.\n\nPure Python 3 standard library. No runtime dependencies. No network calls. All enforcement is local; the plugin only reads the JSONL transcript Claude Code already writes.\n\nScreenshot: https://github.com/oggeh-dev/claude-cost-guard/blob/main/docs/indicator.png","developer":null,"category":null,"reported_installs":null,"active":true,"first_seen_at":"2026-10-03T22:13:33.942Z","last_seen_at":"2026-10-08T00:02:25.656Z","last_changed_at":"2026-10-03T22:13:33.942Z","platform":"claude","sources":["Community"],"works_with":["Claude Code"],"marketplace_url":null,"repository_url":"https://github.com/oggeh-dev/claude-cost-guard.git","web_data":{},"github_data":{},"catalog_sources":{"community":[{"name":"cost-guard","source":{"sha":"e0396485e89062799e5b1df77880bfaa7c85193b","url":"https://github.com/oggeh-dev/claude-cost-guard.git","source":"url"},"homepage":"https://github.com/oggeh-dev/claude-cost-guard","description":"Real-time USD cost enforcement for Claude Code. Halts runaway agentic loops mid-step before they burn through your budget.\n\nThe plugin enforces real-time USD cost limits in Claude Code. It uses hooks to read the session's the moment any cap is crossed — between tool batches, between turns, or at prompt-submit time. The result: a single greedy turn cannot spiral into a $30+ spend, sessions cannot silently accumulate cost over hours, and runaway burn rates are stopped before they hurt.\n\nFive configurable USD-based caps:\n• Per-session total spend\n• Per-step (prompt → response) cost\n• Trailing 5-minute burn rate\n• Per-step subagent fan-out count\n• Compaction gate (blocks the expensive context-compaction model call when limits are tight)\n\nEleven slash commands for status, runtime config, pause/resume, and an optional bottom-row indicator.\n\nThe indicator shows session spend, rate, current step cost, context %, and (on Claude.ai Pro/Max) 5-hour slot consumption with an estimated USD plan value. It composes with any existing statusLine (preserving your starship setup, etc.) or takes over the slot — your choice at install time.\n\nPure Python 3 standard library. No runtime dependencies. No network calls. All enforcement is local; the plugin only reads the JSONL transcript Claude Code already writes.\n\nScreenshot: https://github.com/oggeh-dev/claude-cost-guard/blob/main/docs/indicator.png"}]}}