Home / Claude Code mods / Security / agent-usage-guard

agent-usage-guard

agent-usage-guard is a Claude Code mod by rbartoli that 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,.

Updated 2026-10-11

What is agent-usage-guard?

agent-usage-guard is a Claude Code mod by rbartoli that 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,. It is listed under Security and has 3 GitHub stars.

TypeClaude code mod
Authorrbartoli
Repositoryrbartoli/agent-usage-guard
Popularity3 GitHub stars
CategorySecurity
SecurityReview before installing (72/100)
Rank#956 of 5,272 Claude Code mods; #111 in Security
LicenseMIT
Last commit2026-10-11
Hooks16 events
Seesclassic hooks, every prompt, every tool call, subagent spawns
Draws onnothing

Is agent-usage-guard safe to install?

agent-usage-guard scores 72/100 on the MCPMods security check: Review before installing. Things to review: reads environment variables; watches every prompt or event. It passed 5 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
No network accessPass
Starts no processesPass
Writes no files or configPass
Reads environment variablesReview
Watches every prompt or eventReview
Drives Claude (model calls, prompts)Note
Passes claude plugin validatePass
Has an open-source licensePass

API calls in its code

CallWhat it means
$.clock.after
$.clock.now
$.command.register
$.env.getreads env vars
$.prompt.fillwrites the prompt box
$.prompt.read
$.prompt.submitdrives Claude
$.session.compactdrives Claude
$.session.id
$.session.usage
$.store.deletekeeps its own state
$.store.getkeeps its own state
$.store.keyskeeps its own state
$.store.setkeeps its own state
$.ui.askdraws interface
$.ui.logdraws interface
$.ui.statusdraws interface

How do I install agent-usage-guard?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/rbartoli/agent-usage-guard
    claude plugin validate ./agent-usage-guard/.
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    claude plugin marketplace add rbartoli/agent-usage-guard && claude plugin install agent-usage-guard@agent-usage-guard

Or ask Claude to set it up

Paste this into Claude Code and it installs agent-usage-guard for you:

Install the "agent-usage-guard" Claude Code mod from https://github.com/rbartoli/agent-usage-guard. Run claude plugin validate on it first and show me what it can access before you enable it.