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.5 | $0.00030 | $0.01345 |
| Sonnet 5.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 1mo 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.
- 1mo 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 3mo ago), licensed MIT. It adds 75 tokens to every session and 3,362 once invoked, about $0.0003 per session on Opus 5.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
poteto-help
Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.
ketchup
Catch the user up on what changed in this chat since their last message, in plain words and small visuals. List every item waiting on them with what they need to decide it from the reply alone. Use for /ketchup.
sharpen
Make a task deeper, not bigger, then rewrite the prompt. Use for /sharpen.
timeboxed-iterating
Run a task iteratively over a user-specified duration by dispatching subagents. The orchestrator stays strictly linear and time-checked, but each iteration fans out MULTIPLE subagents in parallel over independent units (and those subagents may fan out further). Shared state — a compact progress digest and a growing…
find-plugin-file
This skill should be used when needing to locate files within the Claude Code plugins cache directory (/.claude/plugins/cache). Triggers include finding tool scripts, skill files, or any plugin resource when the hardcoded path is unknown or varies by plugin version. Use when slash commands or orchestrators need to…
agent-teams
Multi-agent team orchestration with native Agent Teams. Trigger when the user wants to launch a team of agents, coordinate parallel work with inter-agent communication, or use swarm mode.