claude-usage-quota-budget

Measures Claude Code subscription quota consumption from local transcripts to stop plan execution at step boundaries.

Updated Aug 25, 2026
One-click install
npx skills add https://github.com/hyvanmielenpelit/SharedAgentSkills --skill claude-usage-quota-budget-hyvanmielenpelit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-usage-quota-budget
Source: https://github.com/hyvanmielenpelit/SharedAgentSkills/tree/main/skills-claude/claude-usage-quota-budget
Command: npx skills add https://github.com/hyvanmielenpelit/SharedAgentSkills --skill claude-usage-quota-budget-hyvanmielenpelit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long implementation plans executed by Claude Code can exhaust a subscription's 5-hour or weekly rate-limit window mid-step, leaving work half-finished. This Skill measures quota consumption from local transcripts so execution stops cleanly at a step boundary instead of part-way through a step. ## Core Features & Use Cases - Quota Calibration: Converts a /usage percentage or past rate-limit rejections into a stored per-subscription capacity, persisted in ~/.claude/usage-budget.json. - Per-Step Measurement: Runs claude-budget.js raw --since <timestamp> at each step boundary to record what each step cost, then estimates the next step from the worst observed cost with a 1.5x margin. - Stop Rule and Notification: Halts before a step the remaining budget cannot cover, reports consumption figures, and sends a push notification so an absent user knows why execution stopped. - Use Case: On a standard Team seat, a 9-step migration plan is executed step by step; after step 5 the remaining 3.9M units cannot cover the estimated 4.7M needed, so the agent stops, reports the figures and the window reset time, and leaves task.md ready to resume. ## Quick Start Ask the agent to budget this plan against my Claude subscription quota and stop at a step boundary before the 5-hour window runs out.

Frequently Asked Questions about claude-usage-quota-budget

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I track Claude Code usage quota during a long plan?

Run claude-budget.js check before the first step to record remaining units, then at each step boundary run raw --since <stepStart> to measure the step's cost and check again for headroom. Proceed only if remaining units cover 1.5 times the worst measured step.

How do I calibrate claude-budget without a /usage reading?

Run claude-budget.js calibrate --from-limit, which approximates capacity from past rate-limit rejections recorded in local transcripts. It takes the lowest observed capacity and flags estimates with over 40% spread or a single observation as too unreliable to plan against.

Does claude-budget work with Gemini or Codex harnesses?

No. The tool reads transcripts that only Claude Code writes under ~/.claude/projects, including the bridge-session records used for per-subscription attribution. Other harnesses produce no such transcripts, so there is nothing to measure.

Why does claude-budget exit with code 2?

Exit 2 means the tool could not answer: either no calibration exists for the resolved subscription or the subscription could not be resolved at all. It does not mean quota is fine; report headroom as unknown and offer to calibrate.

When should quota tracking not be used?

Skip it on Premium Team seats and Max plans, where capacity far exceeds what a plan consumes, and on short plans that cannot exhaust a 5-hour window. The skill is loaded only when the user explicitly asks for quota budgeting.