cost-guard
OGGEH, Inc v0.2.0
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 hoo...
From the developer
License
MIT
Works with
Claude Code
Description
From the marketplace listing
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
What changed
No changes recorded yet. Follow this plugin to keep track of future changes.
Similar plugins
Find competitors to follow as you develop your plugin.
-
Claude Code plugin for real-time rate-limit %, token usage, cost, and stats in your status line
Shared terms: cost, limit, time, real
-
Real-time token usage and cost analytics for Claude Code. Automatically tracks spend per developer, project, and session via a PostToolUs...
Shared terms: budget, cost, time, real
-
Real-time status line for Claude Code showing context window usage, git status, session cost, rate limits, cache stats, and more — all in...
Shared terms: cost, limit, time, real
-
Display OpenAI Codex usage and rate limits inside Claude Code. Real-time statusline integration with claude-hud, slash commands for usage...
Shared terms: cost, limit, time, real
-
Displays real-time usage percentages (5h session, 7d weekly, context window), reset countdowns, burn rate, and exhaustion prediction in y...
Shared terms: burn, time, real, code
Keywords
Files & skills
cost-guard · catalog manifest
Saved declaration
{}
cost-guard · catalog manifest
Saved declaration
{
"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"
}
cost-guard · catalog manifest
Saved declaration
{
"name": "cost-guard",
"author": {
"name": "OGGEH, Inc"
},
"license": "MIT",
"version": "0.2.0",
"keywords": [
"cost",
"budget",
"rate-limit",
"observability",
"safety"
],
"userConfig": {
"enabled": {
"type": "boolean",
"title": "Enable cost-guard halting",
"default": true,
"description": "Master switch. When off, no halts fire (ledger still records)."
},
"warn_at_usd": {
"min": 0.05,
"type": "number",
"title": "Per-session warning threshold (USD)",
"default": 7.0,
"description": "Emit an amber warning on UserPromptSubmit when session spend crosses this dollar amount (always below max_usd_per_session)."
},
"log_decisions": {
"type": "boolean",
"title": "Log halt decisions",
"default": true,
"description": "Write an audit line to halt-log.jsonl for every halt/warn decision. Useful for diagnosing false positives."
},
"max_usd_per_step": {
"min": 0.05,
"type": "number",
"title": "Per-step cost cap (USD)",
"default": 2.0,
"description": "Halt the agentic loop after one Claude step (one user prompt → Claude's tool calls + final answer) has spent this many dollars. Primary defense against a single greedy step."
},
"rate_per_min_usd": {
"min": 0.01,
"type": "number",
"title": "Burn-rate limit (USD/min)",
"default": 0.5,
"description": "Halt mid-step when the trailing 5-minute session burn rate exceeds this value."
},
"seed_from_history": {
"type": "boolean",
"title": "Seed ledger from existing transcripts on first run",
"default": true,
"description": "On first install, scan recent ~/.claude/projects transcripts to populate the rolling cost ledger. Gives accurate trailing rates on the first prompt."
},
"max_usd_per_session": {
"min": 0.1,
"type": "number",
"title": "Per-session cost cap (USD)",
"default": 10.0,
"description": "Halt new work when this session's total spend reaches this value. Primary defense against a session burning too much over time."
},
"max_subagent_spawns_per_step": {
"max": 100,
"min": 1,
"type": "number",
"title": "Max subagent spawns per step",
"default": 8,
"description": "Deny further Agent/Task tool calls within one step once this count is reached. Bounds fan-out cost."
}
},
"description": "Real-time USD cost enforcement for Claude Code. Halts runaway agentic loops mid-step before they burn through your budget."
}
plugin.json observed Nov 6, 2026 · 10:43 UTC. Manifest source ↗
Catalog declarations and available plugin.json metadata are saved. Referenced skills and executable source files are not downloaded or tested. Missing components in a manifest do not prove that the plugin has none.
Installation instructions
Community
/plugin marketplace add anthropics/claude-plugins-community
/plugin install cost-guard@claude-community
Technical details
- Sources
- Community
- First seen
- Oct 3, 2026 · 22:13 UTC
- Last seen
- Nov 7, 2026 · 00:08 UTC
- Latest observed change
- Oct 3, 2026 · 22:13 UTC
- Collection status
- Listed
- Reported installs
- Not provided
Installation counts are source-reported, not independently verified active users. Observation dates are not release dates.
Download plugin data (JSON)Plugin history: served from cache. Prepared . Refreshed when catalog data changes or after 6 hours. Your account and Follow status are live.