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 TheArchitectit/agent-guardrails-template --skill guardrails-coregit clone --depth 1 https://github.com/TheArchitectit/agent-guardrails-templateWrote 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/thearchitectit/agent-guardrails-template/guardrails-core)<a href="https://agentmods.dev/skills/thearchitectit/agent-guardrails-template/guardrails-core"><img src="https://agentmods.dev/badge/skills/thearchitectit/agent-guardrails-template/guardrails-core/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/thearchitectit/agent-guardrails-template/guardrails-core"><img src="https://agentmods.dev/badge/skills/thearchitectit/agent-guardrails-template/guardrails-core.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.00016 | $0.01886 |
| Opus 5 | $0.00008 | $0.00943 |
| Sonnet 5 | $0.00003 | $0.00377 |
| Haiku 4.5 | $0.00002 | $0.00189 |
Grade C, and why
Pi Guardrails Core scanned grade C with 1 finding 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 11d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
| Bash safety | `tool_call` | Law 4 | Blocks dangerous commands (rm -rf, sudo, force-push) | How it starts
The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pi Guardrails Core
The Four Laws of Agent Safety are enforced automatically via event handlers. You do NOT need to call guardrail tools before every edit — the extension handles enforcement automatically.
Automatic Enforcement
The following rules are enforced without any explicit tool calls:
| Handler | Event | Law | What It Does |
|---|---|---|---|
| Read tracking | tool_result |
Law 1 | Tracks every file read; blocks edits to unread files |
| Scope enforcement | tool_call |
Law 2 | Blocks edits to files outside authorized scope |
| Bash safety | tool_call |
Law 4 | Blocks dangerous commands (rm -rf, sudo, force-push) |
| Injection defense | tool_call |
Law 4 | Blocks/warns on prompt injection in tool input (bash/write/edit) |
| Output validation | tool_result |
Law 3 | Detects secrets/PII in tool output, warns via status bar and logs violation |
| Content filtering | tool_result |
Law 3 | Detects denied topic content in output, warns and logs violation |
| Canary tokens | tool_result |
Law 3 | Detects canary tokens in output (data exfiltration), alerts via status bar |
| Permissions | tool_call |
All | Gates tool access by auto/ask/blocked levels |
When a handler blocks an operation, it also records a halt in the session state. Use guardrail_acknowledge_halt to resume after reviewing the halt reason.
Explicit Self-Check Tools
These tools are available for proactive checking before operations:
guardrail_verify_read— Check if a file has been read before editing itguardrail_check_scope— Check if a path is within the authorized scopeguardrail_check_halt— Evaluate whether an operation should be halted (includes uncertainty score)
Session Management
guardrail_init— Initialize a guardrails session at the start of each conversationguardrail_status— Get the full session state summary (scope, strikes, violations, MCP status, halt state)
Three Strikes Workflow
The Three Strikes rule enforces Law 4 (Halt When Uncertain):
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.
- 11d ago First seen · 160 lines · 16 tokens per session scan C f022b792bef4
Pi Guardrails Core is a skill published in the GitHub repository TheArchitectit/agent-guardrails-template (79 stars, last pushed 2d ago), licensed BSD-3-Clause. It adds 16 tokens to every session and 1,886 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
construction-expert
Expert-level construction management, project planning, BIM, safety compliance, and construction technology. Use when the user mentions BIM, project management, safety, or building, or when the task involves Construction Management, Technologies, Standards and Regulations, or Cost Control.
gemini-api-dev
Use when build applications using Google Gemini API. Handle chat completions, multimodal inputs, function calling, streaming, and grounding with Google Search. Use when building applications using google gemini api. handle chat completions, multimodal.
pydantic-ai
Build production-ready AI agents with PydanticAI — type-safe tool use, structured outputs, dependency injection, and multi-model support.
edgeone skill scanner
A local static scanner that checks agent-skill files for security risks before they are installed or used. Static analysis examines files without running them.
connect-agent
Connect the codebase's AI agent to LangWatch agent simulations, so test suites run against the real agent process. Adds a small connect function beside the service startup that calls the agent already in the codebase, which opens an outbound connection and registers the agent with its environment and its run…
prompt-optimization
Improve a prompt on the evaluations workbench through a measured loop. Score the baseline first, then duplicate the target column, form a hypothesis from failing rows, edit the copy's prompt draft, run, compare pass rate and cost, and repeat until the numbers hold. Use when the user asks to optimize or improve a…