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 Wh0FF24/whoff-agents --skill cost-cap-guardgit clone --depth 1 https://github.com/Wh0FF24/whoff-agentsWrote 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/wh0ff24/whoff-agents/cost-cap-guard)<a href="https://agentmods.dev/skills/wh0ff24/whoff-agents/cost-cap-guard"><img src="https://agentmods.dev/badge/skills/wh0ff24/whoff-agents/cost-cap-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/wh0ff24/whoff-agents/cost-cap-guard"><img src="https://agentmods.dev/badge/skills/wh0ff24/whoff-agents/cost-cap-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.00042 | $0.01108 |
| Opus 5 | $0.00021 | $0.00554 |
| Sonnet 5 | $0.00008 | $0.00222 |
| Haiku 4.5 | $0.00004 | $0.00111 |
Grade A, and why
cost-cap-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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cost Cap Guard Skill
You are enforcing a token budget — calculating what this operation will actually cost, flagging if it exceeds the limit, and producing a trimmed prompt that delivers the same result for less.
Runaway agents are a real cost problem. A single verbose handoff packet, a bloated system prompt, or a multi-step task with no scoping can 3–5x the expected token count. This skill stops that before dispatch.
What You Will Do
-
Read the proposed prompt — the full text being sent to the subagent, including system prompt, context, and task.
-
Estimate token cost using this rule of thumb:
- 1 token ≈ 4 characters
- Input tokens + estimated output tokens = total session tokens
- Multiply by model rate (Opus: ~$15/M input, ~$75/M output; Sonnet: ~$3/M input, ~$15/M output; Haiku: ~$0.25/M input, ~$1.25/M output)
-
Compare against the session budget (default: 50k tokens unless specified):
STATUS: [WITHIN BUDGET / OVER BUDGET / WARNING]
Estimated input tokens: X,XXX
Estimated output tokens: X,XXX
Total estimated tokens: X,XXX
Budget: XX,XXX
Overage: +X,XXX (if applicable)
Estimated cost: $X.XX
-
If over budget, produce a trimmed version of the prompt:
- Strip filler phrases and pleasantries
- Replace prose context with bullet facts
- Remove re-stated constraints the subagent can derive from the codebase
- Trim examples to the minimum needed (1 example beats 3 when they're identical in structure)
- Cut "here's what I've already tried" to a 1-line ruled-out summary
-
Write the result to
.claude/cost-cap-<timestamp>.md:
# Cost Cap Report — <ISO timestamp>
## Budget Status
[WITHIN BUDGET / OVER BUDGET / WARNING — X% of budget used]
## Token Estimate
- Input: X,XXX tokens (~$X.XX)
- Output: X,XXX tokens (~$X.XX)
- Total: X,XXX tokens (~$X.XX)
## Original prompt (X,XXX tokens)
[paste]
## Trimmed prompt (X,XXX tokens — X% reduction)
[paste trimmed version]
## What was cut and why
- [item]: [reason it was redundant]
- [item]: [reason it was derivable from context]
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 · 104 lines · 42 tokens per session scan A 01bb1a173837
cost-cap-guard is a skill published in the GitHub repository Wh0FF24/whoff-agents (2 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 1,108 once invoked, about $0.0002 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-31.
Other skills, from other repositories
shogun-bloom-config
An interactive wizard that creates model-routing settings from your AI subscription choices. Model routing decides which available model handles each kind of task.
shogun-model-list
A reference table of AI command-line tools, their available models, subscription requirements, and maximum Bloom capability levels. Bloom's Taxonomy is a scale describing thinking tasks, from remembering information to creating new designs.
shogun-model-switch
A live-switching tool for changing which command-line AI agent, model, and reasoning mode is running. It updates settings, restarts the agent, and refreshes the displayed session information.
shogun-screenshot
A screenshot tool for getting images from a computer or web page and then cropping, resizing, or masking sensitive information. Playwright is a browser-automation tool used here to capture web pages.
shogun-readme-sync
A skill that compares an English README with its Japanese counterpart and brings them back into alignment. A README is the project document that explains what the software is and how to use it.
shogun-agent-status
A skill that shows whether the agents in a multi-agent Japanese feudal-themed team are working, waiting, missing, or assigned tasks. It combines terminal session status, task files, and unread messages.