Agent Sandbox Kit: Locked-Down Docker for Claude Code and Codex CLI
Docker sandbox for Claude Code and Codex CLI: non-root read-only container, default-deny Squid egress allowlist, 11-check smoke test and secrets runbook.
Claude Code spend guard hook that blocks prompts and tool calls at a daily USD cap. Prices every response at 2026 list rates and writes a cost-per-PR CSV.
₹1,615
one-time payment
Claude Code spend guard hook that blocks prompts and tool calls at a daily USD cap. Prices every response at 2026 list rates and writes a cost-per-PR CSV.
Claude Code Spend Guard is a one-file Node.js hook that turns a dollar figure into a hard stop. Set a daily cap, a per-session cap or a rolling 5-hour window, and when the number is reached the next prompt is rejected before it reaches the model and the next tool call is blocked mid-task, each with a one-line reason. It is built for developers and small teams running Claude Code on an API key or a Max plan who want a ceiling they do not have to watch.
It reads the transcripts Claude Code already writes under ~/.claude/projects, counts each response once (Claude Code writes a response once per content block, so a plain sum overcounts by about 2x), and prices it from a table checked against Anthropic's pricing page on 13 October 2026: Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5 with its over-100K-token tier, cache writes, cache reads and fast mode. No dependencies, no network calls, nothing leaves your machine.
~/.claude/settings.json and the three-step install, including how to confirm the hook fires.~/.claude/spend-guard. Node.js 20 or newer is the only requirement.config/caps.json and set dailyUsd. Twenty dollars is a sensible first value for a solo developer.install/settings.snippet.json into ~/.claude/settings.json under hooks, adjusting the path.node hooks/spend-guard.mjs --report to see today's spend, then bash tests/run.sh to confirm the install.From the next prompt on, Claude Code calls the guard before every prompt and every tool call. Once over the cap, Claude cannot raise it for you: editing the cap needs a tool call, and tool calls are blocked.
Read the limits before you rely on the number: the guard estimates from local transcripts at list prices, it does not read Anthropic's billing, and it only sees usage on the machine it runs on. It pairs with the free Agent Run Cost Simulator for planning a budget, and sits alongside the other packs in best Claude Code configs. Browse the rest of the catalog at /browse.
Included Files
No reviews yet
Be the first to share your experience with this product
one-time payment, yours forever
Or unlock this + every product — Pro Vault from ₹1,615/mo
Category
AI IDE configurations