guardrails

guardrails is a skill for Claude Code from alelaguard/agentguards-plugins. It costs 52 tokens per session (471 once invoked), scanned A, original, MIT.

A guide to how the self-hosted AgentGuards version enforces security through automatic hooks rather than callable agent tools.

In plain words
What is it for?
It is for understanding the automatic enforcement flow and interpreting messages when a hook blocks a prompt or tool action.
Why use it?
It explains why there are no AgentGuards tools to invoke and clarifies which checks happen for prompts, Bash commands, and fetched web content.

Skill for Claude Code

Written for Claude Code: UserPromptSubmit hook event. Also seen: mentions Claude Code.

Part of the agentguards-claude-selfhosted plugin — 3 skills, 3 hooks shipped together

Good fit It is for understanding the automatic enforcement flow and interpreting messages when a hook blocks a prompt or tool action.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alelaguard/agentguards-plugins/guardrails
Install

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.

Any agent
npx skills add alelaguard/agentguards-plugins --skill guardrails
Clone the repo
git clone --depth 1 https://github.com/alelaguard/agentguards-plugins

Made for: Claude Code.

Or install agentguards-claude-selfhosted, the plugin that ships this one along with the rest of its 3 skills, 3 hooks.

Wrote 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.

agentmods badge for guardrails

README.md
[![agentmods](https://agentmods.dev/badge/skills/alelaguard/agentguards-plugins/guardrails.svg)](https://agentmods.dev/skills/alelaguard/agentguards-plugins/guardrails)
Your own site
<a href="https://agentmods.dev/skills/alelaguard/agentguards-plugins/guardrails"><img src="https://agentmods.dev/badge/skills/alelaguard/agentguards-plugins/guardrails.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 471 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00471
Opus 5 $0.00026 $0.00235
Sonnet 5 $0.00010 $0.00094
Haiku 4.5 $0.00005 $0.00047

Measured 7d ago against content hash d2ef61a5a374, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

guardrails scanned grade A 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

command that invokes `curl`/`wget`/`http`/`fetch`/`aria2c` — redacting or
claude-selfhosted/skills/guardrails/SKILL.md · 35 lines

What it actually says

AgentGuards — self-hosted, hooks-only

This variant bundles no MCP server, so there is no check_input/authorize_action to reach for — do not ToolSearch for them, they are not installed here.

That is not reduced protection. The three hooks in hooks/hooks.json enforce deterministically, on every request, regardless of anything the model does:

  • UserPromptSubmit screens every prompt before you see it. A block or escalate exits non-zero and you never receive the message.
  • PreToolUse authorizes every Bash command before it runs.
  • PostToolUse scans content from WebFetch, WebSearch, and any Bash command that invokes curl/wget/http/fetch/aria2c — redacting or withholding it before you read it.

Nothing here requires you to call a tool, check a decision, or format a block message — the hook has already acted by the time you see (or don't see) the result. If a hook blocks something, its message appears as the tool result or the reason a prompt was rejected; reply with that message rather than composing your own.

Why no MCP server: Claude Code's plugin .mcp.json cannot substitute an environment variable into its url field, so a URL baked in at publish time cannot be made to point at each installer's own appliance — it would either be fixed to one instance or, worse, silently fall back to AgentGuards' hosted service. Rather than ship that, this variant relies entirely on the hooks, which read AGENTGUARDS_URL correctly per installation because they are a subprocess, not a static config file. If you're on the hosted product instead of a self-hosted appliance, install agentguards-claude, which does bundle the MCP server.

Changes

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.

  1. 7d ago First seen · 35 lines · 52 tokens per session scan A d2ef61a5a374

Subscribe to this mod's changes

guardrails is a skill published in the GitHub repository alelaguard/agentguards-plugins (2 stars, last pushed 8d ago), licensed MIT. It adds 52 tokens to every session and 471 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

clawmoat

Real-time AI agent security scanner. Detects prompt injection, jailbreak attempts, credential/secret leaks, PII exposure, and dangerous tool calls. Activate when: (1) scanning inbound messages or tool outputs for prompt injection, (2) checking outbound content for credential leaks or PII, (3) auditing agent session…

darfaz/clawmoat · 107 tokens

integrate-arcjet-guard-genkit

Integrate Arcjet security into a Genkit JS agent using @arcjet/guard — wrap ai.defineTool, put guardMiddleware on generate({ use }) for unwrapped / MCP / filesystem tools, and read a caller-owned id from generate({ context }). Use when asked to add Arcjet to genkit, rate limit its tools, screen inbound messages, or…

arcjet/arcjet-js · 89 tokens

integrate-arcjet-guard-langchain

Integrate Arcjet security into a LangChain JS createAgent using @arcjet/guard — wrap tool() / StructuredTool, put guardMiddleware on createAgent({ middleware }) for MCP / unwrapped tools, and read configurable.threadid for correlation. Use when asked to add Arcjet to langchain createAgent, rate limit its tools, screen…

arcjet/arcjet-js · 101 tokens

integrate-arcjet-guard-google-adk

Integrate Arcjet security into a Google ADK JS app using @arcjet/guard — put guardPlugin first on Runner({ plugins }) so beforeToolCallback gates tools, and read a caller-owned id from helper options or context. Use when asked to add Arcjet to Google ADK, @google/adk, rate limit its tools, screen inbound messages, or…

arcjet/arcjet-js · 111 tokens

integrate-arcjet-guard-langgraph

Integrate Arcjet security into a LangGraph Graph API agent using @arcjet/guard — wrap tool() / StructuredTool, wrap ToolNode for unwrapped MCP tools, and read threadid for correlation. Use when asked to add Arcjet to a LangGraph StateGraph / ToolNode agent, rate limit its tools, screen inbound messages, or block…

arcjet/arcjet-js · 87 tokens

integrate-arcjet-guard-mastra

Integrate Arcjet security into a Mastra agent using @arcjet/guard — wrap createTool execute, screen input/output with a Processor tripwire, and gate unwrapped MCP/workspace tools with hooks. Use when asked to add Arcjet to a Mastra agent, rate limit its tools, screen inbound messages, or block prompt injection / PII.

arcjet/arcjet-js · 82 tokens