guardrails

guardrails is a skill for Claude Code from rainmanjam/poka-yoke. It costs 98 tokens per session (1,738 once invoked), scanned A, original, MIT.

A set of ways to make software rules enforce themselves, using checks such as pre-commit hooks, CI gates, lint rules, database constraints, and branch protection.

In plain words
What is it for?
Use it to configure checks that reject unsafe, invalid, or non-compliant changes before they reach shared code.
Why use it?
It prevents agreed rules from being forgotten or bypassed, such as merging unformatted code or committing secrets.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the poka-yoke plugin — 6 skills shipped together

Good fit Use it to configure checks that reject unsafe, invalid, or non-compliant changes before they reach shared code.

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

Made for: Claude Code.

Or install poka-yoke, the plugin that ships this one along with the rest of its 6 skills.

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/rainmanjam/poka-yoke/guardrails/github.svg)](https://agentmods.dev/skills/rainmanjam/poka-yoke/guardrails)
Your own site
<a href="https://agentmods.dev/skills/rainmanjam/poka-yoke/guardrails"><img src="https://agentmods.dev/badge/skills/rainmanjam/poka-yoke/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/rainmanjam/poka-yoke/guardrails"><img src="https://agentmods.dev/badge/skills/rainmanjam/poka-yoke/guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,738 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00098 $0.01738
Opus 5 $0.00049 $0.00869
Sonnet 5 $0.00020 $0.00348
Haiku 4.5 $0.00010 $0.00174

Measured 12d ago against content hash 8106ac1ca777, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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.

plugins/poka-yoke/skills/guardrails/SKILL.md · 132 lines

How it starts

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

Poka-Yoke Guardrails

Design-time devices protect the code you are writing now. Guardrails protect the code everyone writes later, including the version of you who is in a hurry. They are Shingo's successive check: the next station refuses to accept bad work.

The reason this mode exists as its own thing: the most common failure in software quality is agreeing on a rule and then writing it down. A rule in a wiki has a half-life of about one onboarding. The same rule wired into a gate applies itself and costs nothing to remember.

Building, not reviewing

Most of the time this mode is reached while someone is building the thing, not afterwards. That changes the deliverable. They asked for the config, so produce the config, working, complete, in their stack. Do not hand back a severity table when the person is mid-feature; a list of findings about code they have not written yet is not useful to them.

Then add a short closing note, three or four lines, covering:

  • which misuses the shape you chose makes impossible, and at which rung,
  • what you left possible on purpose, and why that tradeoff is the right one here.

That closing note is what stops the device being undone in six months by someone who cannot see why it is there. It is also the difference between mistake-proofing and a code generator: the reasoning travels with the code.

When the code already exists and they are asking what is wrong with it, switch to the audit voice, ranked findings with the mistake, the consequence, and the device. Match the mode to where they are in the work, not to this file's default.

Pick the earliest gate that can hold the rule

The same rule can live at several points in the lifecycle. Earlier is better, feedback is faster, cheaper, and lands while the author still has the context in their head. But earlier is also easier to bypass. The resolution is to place the device early and back it with a gate that cannot be skipped.

Gate Feedback speed Bypassable? Best for
Type system / compiler instant no anything the types can express, always first choice
Editor + lint seconds yes (ignore comment) style, banned APIs, unsafe patterns
Pre-commit hook seconds yes (--no-verify) fast checks: secrets, formatting, obvious footguns
Pre-push hook ~a minute yes medium checks you don't want to wait for on every commit
CI required check minutes no, with branch protection the real enforcement, everything that must not merge
Database constraint instant, at write no data invariants, across every service and every script
Runtime assertion at execution no invariants no earlier gate can see

Read the full file on GitHub · 132 lines

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. 12d ago First seen · 132 lines · 98 tokens per session scan A 8106ac1ca777

Subscribe to this mod's changes

guardrails is a skill published in the GitHub repository rainmanjam/poka-yoke (22 stars, last pushed 11d ago), licensed MIT. It adds 98 tokens to every session and 1,738 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

setup-solution

Creates a Dataverse publisher and solution, then adds Power Pages site components to the solution for ALM and deployment management. Use when asked to: "create solution", "set up solution", "add to solution", "package site into solution", "create publisher", "solutionize my site", or "set up ALM for my site".

microsoft/power-platform-skills · 73 tokens

setup-pipeline

Sets up a Power Platform Pipeline for automated Power Pages deployments. Power Platform Pipelines is Microsoft's native CI/CD tool built into the Power Platform — no external infrastructure required. Use when asked to: "set up ci/cd", "create pipeline", "setup pipeline", "set up power platform pipelines", "create…

microsoft/power-platform-skills · 118 tokens

configure-env-variables

Configures environment variables for Power Pages site settings to support ALM across environments. Creates environment variable definitions in Dataverse, guides the user through linking site settings to those variables via the Power Pages Management app, adds the variables to the solution, and generates a…

microsoft/power-platform-skills · 119 tokens

add-azuredevops

Adds Azure DevOps connector to a Power Apps code app. Use when querying work items, creating bugs, managing pipelines, or making ADO API calls.

microsoft/power-platform-skills · 37 tokens

pr-watch

Local PR watcher. Monitors CI status, automatically fixes failing checks by reading failure logs and applying targeted fixes, then optionally merges when all checks pass. Local CLI analog to Claude Code's cloud auto-fix feature.

SethGammon/Citadel · 46 tokens

push-ci

Push to remote and monitor CI. Validates branch safety, executes git push WITH explicit user approval, then monitors CI run status via gh CLI. Use when: user says 'push', 'push and watch CI', 'ship it', 'push-ci'. Not for: committing (use /smart-commit), creating PRs (use /create-pr), merging (use /merge-prep).

sd0xdev/sd0x-harness · 82 tokens