cost-guard
Publisher not specified · Claude Code
What this plugin does
Real-time USD cost enforcement for Claude Code. Halts runaway agentic loops mid-step before they burn through your budget.
The 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.
Five configurable USD-based caps:
• Per-session total spend
• Per-step (prompt → response) cost
• Trailing 5-minute burn rate
• Per-step subagent fan-out count
• Compaction gate (blocks the expensive context-compaction model call when limits are tight)
Eleven slash commands for status, runtime config, pause/resume, and an optional bottom-row indicator.
The 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.
Pure 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.
Screenshot: https://github.com/oggeh-dev/claude-cost-guard/blob/main/docs/indicator.png
Catalog observations
- Sources
- Community
- Works with
- Claude Code
- Reported installs
- Not provided
- First observed
- 2026-10-03 22:13 UTC
- Last observed
- 2026-10-08 00:02 UTC
Installation counts are reported by Claude Marketplace, not independently verified active users. Observation dates are not release dates. Pricing and account requirements must be checked with the publisher.
Install in Claude Code
Choose a source and review what the plugin adds before installing.
Community
/plugin marketplace add anthropics/claude-plugins-community
/plugin install cost-guard@claude-community
Source evidence
Descriptions and compatibility labels come from the linked sources. Where both sources match, the GitHub description is used because web summaries may be shortened. We have not independently tested the declared capabilities.