guardrails

guardrails is a skill for Claude Code from atretyak1985/swarmery. It costs 57 tokens per session (712 once invoked), scanned A, original, Apache-2.0.

A safety check for risky actions such as database migrations, deletions, deployments, and configuration changes. It rates the risk, decides whether the action is approved, and records how to undo it.

In plain words
What is it for?
It is for reviewing operational commands and migrations before execution, including checks such as tests, linting, and dry runs.
Why use it?
It prevents hard-to-reverse changes from running without a clear go/no-go decision and rollback steps.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the core plugin — 37 skills, 8 commands, 13 agents shipped together

Good fit It is for reviewing operational commands and migrations before execution, including checks such as tests, linting, and dry runs.

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

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 37 skills, 8 commands, 13 agents.

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/atretyak1985/swarmery/guardrails/github.svg)](https://agentmods.dev/skills/atretyak1985/swarmery/guardrails)
Your own site
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/guardrails"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/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/atretyak1985/swarmery/guardrails"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 712 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 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.00057 $0.00712
Opus 5.5 $0.00023 $0.00285
Sonnet 5.5 $0.00011 $0.00142
Haiku 4.5 $0.00006 $0.00071

Measured 1mo ago against content hash 2f6981c2c7eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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/core/skills/guardrails/SKILL.md · 56 lines

How it starts

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

Purpose

A risky action gets a structured go/no-go before it runs, derived from an Impact × Reversibility matrix — not ad-hoc vibes. The output contract is binary: APPROVED (possibly with conditions) or REJECTED (with the reason) — never ambiguous.

The check

  1. Short-circuit: read-only actions (viewing files, running tests) are APPROVED immediately — no ceremony.
  2. Risk level = Impact (Low / High / Critical) × Reversible (Yes / No): Low×Yes → Low; High×Yes → Medium; Low/High×No → High; Critical×anything → Critical. The matrix and per-action guidance: resources/risk-checks.md.
  3. Deterministic checks for the affected stack (typecheck/lint/tests for code, dry-run/lint for config, --dry-run for migrations where the tooling offers one). A failing deterministic check is an automatic REJECTED.
  4. Rollback plan with actionable commands ("DROP TABLE IF EXISTS x;", "git revert <sha>") — "revert the change" is not a plan.
  5. Critical never auto-approves. Anything Critical (prod data loss potential, credential changes, irreversible deletes) escalates to the user regardless of checks.

Verdict line: GUARDRAIL: {APPROVED|REJECTED} | Risk: {level} | Checks: {pass/fail/skip} | Rollback: {one line}.

How to use

What it does

Derives a risk level for a proposed action from an Impact × Reversibility matrix, runs the stack's deterministic checks, and emits an unambiguous APPROVED/REJECTED call with a concrete rollback plan — escalating anything Critical to the user instead of auto-approving.

When to use it

Before migrations, bulk deletes or renames, deploy/infra config changes, force operations, or anything an orchestrator flags as hard to reverse — especially inside autonomous runs where no human watches each step.

How to invoke

@core:tech-lead loads it via skills: and applies it before risky delegations; load it manually (/guardrails context or read resources/risk-checks.md) when about to run a risky command yourself.

Read the full file on GitHub · 56 lines

Files

What ships with it

1 file 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. 1mo ago First seen · 56 lines · 57 tokens per session scan A 2f6981c2c7eb

Subscribe to this mod's changes

guardrails is a skill published in the GitHub repository atretyak1985/swarmery (7 stars, last pushed today), licensed Apache-2.0. It adds 57 tokens to every session and 712 once invoked, about $0.0002 per session on Opus 5.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-09-03.