guardrails

guardrails is a skill for Claude Code from adewale/guardrails-skill. It costs 135 tokens per session (2,669 once invoked), scanned A, a copy of guardrails, MIT.

A guide that makes a coding agent run and respect code-quality checks during software work.

In plain words
What is it for?
Use it while writing, changing, reviewing, or debugging code, and when setting up testing, quality checks, or CI pipelines across different project types.
Why use it?
It provides rules for handling failed checks, protecting configuration, gating risky actions, and learning from diagnostic results.

Skill for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: mentions Claude Code; mentions Codex; mentions Gemini CLI.

Part of the guardrails plugin — 1 skill shipped together

Good fit Use it while writing, changing, reviewing, or debugging code, and when setting up testing, quality checks, or CI pipelines across different project types.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adewale/guardrails-skill/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 adewale/guardrails-skill --skill guardrails
Clone the repo
git clone --depth 1 https://github.com/adewale/guardrails-skill

Made for: Claude Code.

Or install guardrails, the plugin that ships this one along with the rest of its 1 skill.

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/adewale/guardrails-skill/guardrails/github.svg)](https://agentmods.dev/skills/adewale/guardrails-skill/guardrails)
Your own site
<a href="https://agentmods.dev/skills/adewale/guardrails-skill/guardrails"><img src="https://agentmods.dev/badge/skills/adewale/guardrails-skill/guardrails/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.

agentmods 80×15 button for guardrails

Your own site · 80×15
<a href="https://agentmods.dev/skills/adewale/guardrails-skill/guardrails"><img src="https://agentmods.dev/badge/skills/adewale/guardrails-skill/guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,669 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.00135 $0.02669
Opus 5 $0.00068 $0.01334
Sonnet 5 $0.00027 $0.00534
Haiku 4.5 $0.00014 $0.00267

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

Security

Grade A, and why

guardrails 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/notation-templates/reproduction-script.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

100% identical to guardrails — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/guardrails/SKILL.md · 261 lines

How it starts

The opening of the file, as written. The whole thing — 261 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Guardrails

Verification gates that block the agent from proceeding until checks pass. The agent already knows what linting, testing, type checking, and security scanning are. This skill doesn't re-teach those concepts. Instead, it specifies:

  • When each check runs in the agent lifecycle (hooks that block progress)
  • What to do when stuck (diagnostic escalation instead of retrying)
  • What not to touch (config protection, high-risk action gating)
  • How to accumulate knowledge (lessons learned, agent tool library)

These are the behaviors a coding agent wouldn't exhibit without being told. Everything else — which linter to use, how to structure a unit test — the agent already knows from training and discovers from the project's existing config.

Bundled resources: references/tool-building.md contains the diagnostic tool and notation catalogs with worked examples. references/language-defaults.md is a lookup table for tool selection by ecosystem. Read these when directed, not proactively.


Scope

Not every check applies to every project. The common base applies everywhere: lint, format, types, SAST, dependency audit, secrets scan, dead/duplicate code detection, coverage, unit tests (tool lookup: references/language-defaults.md). Beyond that, add layers by project type:

  • Backend / API: integration tests. Usually: property-based, contract, performance.
  • Frontend: integration tests. Usually: screenshot, E2E, accessibility.
  • Full-stack: integration tests. Usually: screenshot, E2E, contract, accessibility.
  • Library / SDK: Usually: property-based, mutation.
  • Data pipeline: integration tests. Usually: property-based, performance.
  • Infrastructure / IaC: integration tests (plan/apply validation).

Scale up as the project matures. A prototype needs the common base. A production system serving users needs the full suite.


Lifecycle Hooks

Hooks make guardrails real: they block the agent from proceeding until checks pass. A failing check gives concrete, unambiguous feedback; prose alone competes for attention.

Read the full file on GitHub · 261 lines

Files

What ships with it

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

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. 9d ago First seen · 261 lines · 135 tokens per session scan A 2cde22f39839

Subscribe to this mod's changes

guardrails is a skill published in the GitHub repository adewale/guardrails-skill (2 stars, last pushed 1mo ago), licensed MIT. It adds 135 tokens to every session and 2,669 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to guardrails, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

test-verification

Requires behavioral, failure-path, and durable-seam evidence for tests and review. Use when writing tests, reviewing test coverage, assessing behavioral test quality, or accepting high-risk behavior on test evidence.

Ezra144israel/governed-agent-skills · 43 tokens

vibe-reengineer

Top-level orchestration skill coordinating the entire 7-step surgical vibe-to-enterprise reengineering pipeline with automated safety and economic optimization controls.

richfrem/agent-plugins-skills · 33 tokens

link-checker-agent

Specialized Quality Assurance Operator for documentation link integrity and scans. Automatically handles automated link validation, auditing, fixing, and repairing broken documentation links and docs paths across repositories, with guidance on when to commit changes.

richfrem/agent-plugins-skills · 46 tokens

vibe-behavioral-test-capture

Builds an executable safety net of characterization tests by integrating browser flow recording, API payload snapshotting, DOM state captures, network traces, and mock fixture generation.

richfrem/agent-plugins-skills · 42 tokens

vibe-slice-migrator

Progressively migrates legacy prototype routes and features to a clean architecture layer slice-by-slice, verifying them against characterization tests, running purity/drift checks, and executing completion certifications.

richfrem/agent-plugins-skills · 44 tokens

vibe-to-speckit-superpowers

End-to-end pipeline that transforms an undocumented vibe-coded prototype into a Spec Kit-compatible specification package and a Superpowers-ready implementation handoff, including characterization tests, domain extraction, architecture decisions, task breakdown, TDD strategy, worktree guidance, and certification…

richfrem/agent-plugins-skills · 61 tokens