Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add shirley-xue-2025/usage-guard --skill usage-guardgit clone --depth 1 https://github.com/shirley-xue-2025/usage-guardWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/shirley-xue-2025/usage-guard/usage-guard)<a href="https://agentmods.dev/skills/shirley-xue-2025/usage-guard/usage-guard"><img src="https://agentmods.dev/badge/skills/shirley-xue-2025/usage-guard/usage-guard/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/shirley-xue-2025/usage-guard/usage-guard"><img src="https://agentmods.dev/badge/skills/shirley-xue-2025/usage-guard/usage-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00075 | $0.03362 |
| Opus 5 | $0.00037 | $0.01681 |
| Sonnet 5 | $0.00015 | $0.00672 |
| Haiku 4.5 | $0.00007 | $0.00336 |
Grade A, and why
usage-guard scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.
usage-guard
Proactive usage guard for long Claude Code sessions (Desktop Code tab or CLI). Invoke once at session start before heavy batch, subagent, or overnight work — especially when the account window is already partly used.
Why account-level monitoring matters
Each Claude session only sees its own usage. The shared 5-hour window is account-level — you can start at 58% in one session while another tab or earlier work already pushed the window to 94%. The daemon polls the OAuth usage API (same as Desktop Settings) so the guard sees the real window, not just this chat's view.
Re-arm every sitting
Arms do not survive Desktop quit, crash, or daemon exit. At the start of every new sitting, run /usage-guard (or /usage-guard resume if continuing a paused task). If arm.sh prints "warning", the previous guard was stale — proceed with the new arm.
If the user mentions usage-guard without /usage-guard
When the user says "use usage-guard", "pay attention to usage limits", or names this skill but does not run the slash command:
- Follow this file (you are reading it — treat that as the contract).
- Run
arm.shvia bash before heavy work (same as ARM MODE below). - Tell the user:
/usage-guardis the normal entry point; withdisable-model-invocationit may not show in the slash picker — typing/usage-guardstill works.
Do not auto-arm on your own initiative without the user asking for usage protection.
When the user invokes /usage-guard
Mode detection
- If the argument is
resume(or starts withresume): RESUME MODE (skip arm, go to section 4). - Otherwise: ARM MODE.
1. ARM MODE — start guard
Run:
bash "${CLAUDE_SKILL_DIR}/scripts/arm.sh" {{ARGUMENTS}}
If arm fails, stop and tell the user to run usage-guard doctor in Terminal. Do not start heavy work without a successful arm.
Read ~/.usage-guard/control.json once and confirm:
armed: truephaseisnormal(orfive_hour_percentis set) — not stuck onwaiting_first_pollwithout a live daemon- If arm JSON output includes
"warning", tell the user the prior guard was not active and this is a fresh arm - Report go/no-go using arm JSON:
five_hour_percent,five_hour_reset_local,seconds_until_five_hour_reset,state— not raw UTC strings - If
weekly_percentis present (weekly monitoring enabled in config), also report weekly % andweekly_reset_local/seconds_until_weekly_reset. Weekly can trigger PAUSE even when 5h looks safe. - If present in control.json, also report extra usage wallet:
extra_used_credits,extra_monthly_limit,extra_utilization,extra_currency(amounts are in cents;usage-guard statusformats them), or runusage-guard pollfor a live snapshot
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 210 lines · 75 tokens per session scan A fb6f9dae4eb8
usage-guard is a skill published in the GitHub repository shirley-xue-2025/usage-guard (15 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 3,362 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
g-help
Context-aware help. With no argument, reads current project state and tells you where you are and what to do next, plus a map of every archive. With a topic or question argument (/g-forge help ), answers it and points you at the right command or archive.
g-resume
Re-hydrate a fresh session with the right slice of the durable record. The read-side counterpart to /g-retro — selectively retrieves the relevant retro, ADRs, journal, and handoff keyed by the current branch/milestone/first-task, and assembles a focused re-entry briefing. Loads distilled context into a clean window…
g-voice
Set how G-Forge communicates with you. With no argument, runs a short 2-question intake and sets the right profile automatically — you never need to know the tier names. With dev, mid, or eli5 as an argument, applies that profile directly. Writes .claude/voice-profile. Every G-Forge skill reads this and renders its…
g-listen
Enter listen mode — collect user reports and information without acting, then synthesize and triage when the user signals done.
caveman-help
Quick-reference card for all caveman modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /caveman-help, "caveman help", "what caveman commands", "how do I use caveman".
google-apps-script
Build Google Apps Script automation for Sheets and Workspace. Custom menus, triggers (onEdit / time-driven / form submit), dialogs, sidebars, email batches, PDF export, external API. Use whenever the user wants to automate a Google Sheet, build a Sheets menu / sidebar / dialog, hit a Sheets row from email or a…