Directory / Claude community plugins (Anthropic) / cost-guard
cost-guard
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.pngDescription from the marketplace entry / plugin manifest.
Information source
Copied from the Claude community plugins (Anthropic) catalog (anthropics/claude-plugins-community), maintained by Anthropic (community submissions).
- Marketplace entry:
.claude-plugin/marketplace.json
Links are pinned to commit 06ec7b6 (2026-10-13), the version we synced. Not reviewed by us.
Install
Add the marketplace (once, in Claude Code)
/plugin marketplace add anthropics/claude-plugins-communityIn a Claude Code session
/plugin install cost-guard@claude-communityFrom your shell
claude plugin install cost-guard@claude-communityCommands follow each host's documentation (Claude Code, Claude Cowork docs). gh skill needs GitHub CLI 2.90 or later and is in public preview.
Listed from Anthropic (community submissions)'s catalog, not reviewed by us. Read the source before installing.
- Catalog
- Claude community plugins (Anthropic) (
claude-community) - Information source
- marketplace.json in anthropics/claude-plugins-community
- Author
- Not stated in the source
- Source code
- oggeh-dev/claude-cost-guard
- License
- MIT (repository license)
- Repository stars
- 1 for oggeh-dev/claude-cost-guard
- Added to catalog
- 2026-04-28
- Last change
- 2026-07-27 (last push to the repo)
What it contains
Hosted in an external repository, so contents are not counted here. See the source link.
Similar in Software development
- superpowers (Claude community plugin)
- mattpocock-skills (Claude community plugin)
- ponytail (Claude community plugin)
- caveman (Claude community plugin)
- claude-mem (Claude community plugin)
- understand-anything (Claude community plugin)