rbartoli

Agent Usage Guard — Development skill for Claude Code

Development community

A Claude Code mod that holds subagent fan-out, heavy-context prompts and retry loops before they spend your usage window.

How to install Agent Usage Guard

This entry records only its repository, not the path inside it, so there is no exact command to give. Open rbartoli/agent-usage-guard and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Usage Guard does

A Claude Code mod that holds subagent fan-out, heavy-context prompts and retry loops before they spend your usage window. It reads your plan's usage, counts agents across every session, and asks in Claude Code's own dialog.

Alternatives in Development

  • Claude Token Efficient — One CLAUDE.md file 3.8k ★
  • Prun — Run prun: parallel delegation fan-out (Codex-primary, Opus coordinates) 239 ★
  • Cmux Did Spawn — Orient yourself as orchestrator over a full-stack team that was just scripted into its own cmux window 107 ★

README

agent-usage-guard

Stops Claude Code from spending your five-hour usage window in ten minutes.

`agent-usage-guard` is a Claude Code [mod](https://code.claude.com/docs/en/plugins/mods/overview): it runs inside Claude Code and holds runaway spend before it happens. It reads your plan's live usage, and it holds subagent fan-out, heavy-context churn and retry loops.

Four scenes in Claude Code's interactive UI. The guard asks before a prompt re-writes the expired cache of a 486k-token session resumed after two hours, before a fifth parallel agent starts against a limit of four, before a twenty-first tool call at 433k context, and before a new agent once subagents have processed 10.9M tokens.

Recorded from Claude Code's interactive UI with the guard loaded. A scripted local API stands in for Claude, so the sessions and token counts are staged and no usage is spent. Every question on screen is the guard's own. Rebuild it from the Northstar fixture.

It acts before the spend, not after it: before an agent starts, a prompt is sent, or a tool call runs. Agent limits hold across every Claude Code session on your machine, and fan-out and heavy context are capped at any usage level, not only near the limit. When you are at the keyboard it asks you, in Claude Code's own question dialog. When nobody can answer, it refuses and tells Claude why, so the model can wait, batch the work, or stop. `/agent-guard report` shows what it did.

  • Plan-aware. It reads the 5-hour and weekly percentages Claude Code reports, and keeps the end of the window for you.
  • One answer covers a while. An approval lifts its condition until it clears or times out, so the same question doe