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 bmdhodl/agent47 --skill agentguardgit clone --depth 1 https://github.com/bmdhodl/agent47Wrote 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/bmdhodl/agent47/agentguard)<a href="https://agentmods.dev/skills/bmdhodl/agent47/agentguard"><img src="https://agentmods.dev/badge/skills/bmdhodl/agent47/agentguard/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/bmdhodl/agent47/agentguard"><img src="https://agentmods.dev/badge/skills/bmdhodl/agent47/agentguard.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.00037 | $0.00965 |
| Opus 5.5 | $0.00015 | $0.00386 |
| Sonnet 5.5 | $0.00007 | $0.00193 |
| Haiku 4.5 | $0.00004 | $0.00097 |
Grade A, and why
agentguard 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 — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AgentGuard
Runtime guardrails for coding agents. Recorded-budget preflight, loops, retries, and timeouts on instrumented Python paths. Zero dependencies. Local-first. This skill is onboarding, not host enforcement. See docs/enforcement-boundary.md.
Install
pip install agentguard47
Verify the install:
agentguard doctor
Quick Start (4 lines)
from agentguard import Tracer, BudgetGuard, patch_openai
budget = BudgetGuard(max_cost_usd=5.00, warn_at_pct=0.8)
tracer = Tracer(service="support-agent")
patch_openai(tracer, budget_guard=budget)
# Chat Completions are tracked. Exhausted recorded budget refuses the next dispatch.
Guards
| Guard | What it stops | Example |
|---|---|---|
BudgetGuard |
Dollar/token/call overruns | BudgetGuard(max_cost_usd=5.00) |
LoopGuard |
Exact repeated tool calls | LoopGuard(max_repeats=3) |
FuzzyLoopGuard |
Similar calls, A-B-A-B patterns | FuzzyLoopGuard(max_tool_repeats=5) |
TimeoutGuard |
Wall-clock time limits | TimeoutGuard(max_seconds=300) |
RateLimitGuard |
Calls-per-minute throttling | RateLimitGuard(max_calls_per_minute=60) |
RetryGuard |
Retry storms on flaky tools | RetryGuard(max_retries=3) |
Guards raise exceptions (BudgetExceeded, LoopDetected, TimeoutExceeded, RetryLimitExceeded) on instrumented paths. They do not intercept host tools or provider invoices.
One-Liner Init with Defaults
import agentguard
agentguard.init(local_only=True)
# Reads .agentguard.json if present, sets up tracer + budget guard with sensible defaults
Or drop a .agentguard.json in your repo root:
{
"profile": "coding-agent",
"service": "my-agent",
"trace_file": ".agentguard/traces.jsonl",
"budget_usd": 5.0
}
Tracing
from agentguard import Tracer, JsonlFileSink, BudgetGuard
tracer = Tracer(
sink=JsonlFileSink("traces.jsonl"),
guards=[BudgetGuard(max_cost_usd=5.00)],
)
with tracer.trace("agent.run") as span:
span.event("reasoning", data={"thought": "search docs"})
span.cost.add("gpt-4o", input_tokens=1200, output_tokens=450)
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 Changed 65968a135492
- 2mo ago Changed 3f6130f585fd
- 2mo ago Changed · +1 lines · -1 tokens per session 21bdb36400e5
- 2mo ago Changed 77092084f2d4
- 2mo ago Changed 189cddfbde52
- 2mo ago Changed 0ba6a2cadf74
- 3mo ago First seen · 124 lines · 38 tokens per session scan A c2a75bd6797d
agentguard is a skill published in the GitHub repository bmdhodl/agent47 (4 stars, last pushed 18d ago), licensed MIT. It adds 37 tokens to every session and 965 once invoked, about $0.0001 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-31.
agentguard compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agentguardbmdhodl/agent47 | Skill | 4 | 18d ago | MIT | A | 37 | Claude Code, Codex |
| llamaguarddavila7/claude-code-templates | Skill | 35k | today | MIT | A | 74 | Claude Code, Codex |
| safety-scanningMaxwellCalkin/sentinel-ai | Skill | 27 | 8mo ago | Apache-2.0 | A | 52 | Claude Code |
| shieldkobepaw/goop-shield-community | Skill | 2 | 7mo ago | Apache-2.0 | A | 67 | Claude Code |
| nemo-guardrailsdavila7/claude-code-templates | Skill | 35k | today | MIT | B | 61 | Claude Code, Codex |
| rust-string-enumsBerriAI/litellm | Skill | 64k | today | none | A | 41 | Claude Code, Codex |
| rust-tracingBerriAI/litellm | Skill | 64k | today | none | A | 28 | Claude Code, Codex |