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 agentmods add skills/theafh/ai-modules/guardrailnpx skills add theafh/ai-modules --skill guardrailgit clone --depth 1 https://github.com/theafh/ai-modulesWrote 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/theafh/ai-modules/guardrail)<a href="https://agentmods.dev/skills/theafh/ai-modules/guardrail"><img src="https://agentmods.dev/badge/skills/theafh/ai-modules/guardrail.svg" alt="Measured on agentmods" 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 | $0.00182 | $0.04871 |
| Opus 5 | $0.00091 | $0.02436 |
| Sonnet 5 | $0.00036 | $0.00974 |
| Haiku 4.5 | $0.00018 | $0.00487 |
Grade A, and why
guardrail 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 5d 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 — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
guardrail
<guardrail_skill>
A guardrail doc carries rules, and a rule holds whether or not the code satisfies it yet. The doc states what must be true of this project, written as a general rule rather than a report on the current tree. Code that falls short of a rule is unmet work, never evidence that the rule is wrong, and softening a rule to match the code is the move the doc exists to prevent — the misreading an agent that treats a doc as a description of the present will make the moment the code disagrees with it. A rule becomes true along three paths: work filed and done to close the gap deliberately; new code written to the rule from the start; and touch-it-and-fix-it — existing code brought to the rule whenever ordinary work touches or rewrites it. The third path carries most of the distance, which is why a rule needs no migration plan attached to be worth stating.
The system is universal. It serves a single software system, a knowledge or content repository, a meta-repository whose product is components or documents, and a mixed multi-project layout alike, in any language and any stack. This skill carries only the general knowledge — the what and the how that hold everywhere; every actual guardrail doc is tailored to its repository, and a doc type that fits one repo nature can be a bad fit for another.
<when_to_activate> Activate this skill when the user:
- Asks what guardrail documents are, which ones exist or could exist, or how the guardrail system works.
- Asks which guardrail docs their repository should adopt, or asks for a suggestion, recommendation, or assessment of guardrail coverage.
- Asks to set up, bootstrap, draft, or create a
CHARTER.md,ARCHITECTURE.md,TESTING.md, orSECURITY.md— or a guardrail layer as a whole. - Asks how guardrail docs relate to or rank against each other or against the harness rule files (
CLAUDE.md/AGENTS.md/GEMINI.mdand equivalents). - Asks how a skill, agent, or workflow should consult or enforce a guardrail doc.
Route to guardrail_audit when the user wants the repo's existing guardrail docs audited for contradictions and doc-vs-code divergence. Route to the task family for backlog work; the task skills consume guardrail docs but are not the place that defines them.
</when_to_activate>
<doc_set>
Four core guardrail types are recognized. Each has a bundled reference (sibling of this SKILL.md) carrying its general template, its universally valid rules, and its tailoring guidance — read the reference before explaining, suggesting, drafting, or assessing a doc of that type:
CHARTER.md— the falsifiable project-identity contract: core purpose, DOES / DOES NOT domain boundaries, key invariants, intentional constraints. The one doc that stops work rather than informing it. Reference:references/charter.md.ARCHITECTURE.md— the descriptive account of how the project is structured and where its structure is deliberately headed: goals, stack, components and their responsibilities, load-bearing design decisions, declared direction. Reference:references/architecture.md.TESTING.md— the project's verification methodology: what counts as tested, the discipline verification follows, and how the suite runs. Reference:references/testing.md.SECURITY.md— the security constraints that must hold: secrets, trust boundaries, data handling, dependencies, attack surface. Reference:references/security.md.
What ships with it
4 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.
- 5d ago First seen · 134 lines · 182 tokens per session scan A 2189c93cd825
guardrail is a skill published in the GitHub repository theafh/ai-modules (38 stars, last pushed 2d ago), licensed MIT. It adds 182 tokens to every session and 4,871 once invoked, about $0.0009 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
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…