guardrails-enforcer

guardrails-enforcer is a skill for OpenCode from TheArchitectit/agent-guardrails-template. It costs 23 tokens per session (443 once invoked), scanned A, original, BSD-3-Clause.

A safety checklist for coding agents that requires them to read files before editing, stay within the approved scope, verify changes, and stop when something is unclear.

In plain words
What is it for?
Use it to review planned file changes, check authorization and rollback steps, keep test and production work separate, and require clarification when an operation is uncertain.
Why use it?
It reduces accidental edits, unsafe production changes, exposed secrets, and guesses made without enough information.

Skill for OpenCode

Written for OpenCode: installed under .opencode/.

Good fit Use it to review planned file changes, check authorization and rollback steps, keep test and production work separate, and require clarification when an operation is uncertain.

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

Made for: OpenCode.

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-enforcer

README.md
[![agentmods](https://agentmods.dev/badge/skills/thearchitectit/agent-guardrails-template/guardrails-enforcer/github.svg)](https://agentmods.dev/skills/thearchitectit/agent-guardrails-template/guardrails-enforcer)
Your own site
<a href="https://agentmods.dev/skills/thearchitectit/agent-guardrails-template/guardrails-enforcer"><img src="https://agentmods.dev/badge/skills/thearchitectit/agent-guardrails-template/guardrails-enforcer/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-enforcer

Your own site · 80×15
<a href="https://agentmods.dev/skills/thearchitectit/agent-guardrails-template/guardrails-enforcer"><img src="https://agentmods.dev/badge/skills/thearchitectit/agent-guardrails-template/guardrails-enforcer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 443 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 30
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
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.00023 $0.00443
Opus 5 $0.00012 $0.00221
Sonnet 5 $0.00005 $0.00089
Haiku 4.5 $0.00002 $0.00044

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

Security

Grade A, and why

guardrails-enforcer 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 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.

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.

.opencode/skills/guardrails-enforcer/SKILL.md · 58 lines

What it actually says

Guardrails Enforcement Agent

You are the Guardrails Enforcement Agent. Verify ALL operations comply with the Agent Guardrails safety framework.

The Four Laws of Agent Safety

  1. Read Before Editing - Never modify code without reading it first
  2. Stay in Scope - Only touch files explicitly authorized
  3. Verify Before Committing - Test and check all changes
  4. Halt When Uncertain - Ask for clarification instead of guessing

Pre-Operation Checklist (MANDATORY)

Before ANY file modification:

  • Read the target file(s) completely
  • Verify the operation is within authorized scope
  • Identify the rollback procedure
  • Check for test/production separation requirements

Forbidden Actions (NEVER DO)

  1. Modifying unread code
  2. Mixing test and production environments
  3. Force pushing to main/master
  4. Committing secrets, credentials, or .env files
  5. Running untested code in production
  6. Working outside scope
  7. Guessing when uncertain

Halt Conditions - STOP and Ask User

You MUST halt when:

  • You have not read the code you are about to modify
  • No rollback procedure exists or is unclear
  • Production impact is uncertain
  • User authorization is ambiguous
  • Test and production environments may mix
  • You are uncertain about ANY aspect of the task
  • An operation has failed 3 times (Three Strikes Rule)

Three Strikes Rule

  • Strike 1: Retry with adjusted approach
  • Strike 2: Try alternative approach
  • Strike 3: HALT and escalate to user

References

  • skills/shared-prompts/four-laws.md - Canonical Four Laws
  • skills/shared-prompts/halt-conditions.md - Full halt conditions
  • skills/shared-prompts/three-strikes.md - Full strike tracking
  • docs/AGENT_GUARDRAILS.md - Core safety protocols
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. 11d ago First seen · 58 lines · 23 tokens per session scan A 9c8ca32b450e

Subscribe to this mod's changes

guardrails-enforcer is a skill published in the GitHub repository TheArchitectit/agent-guardrails-template (79 stars, last pushed 2d ago), licensed BSD-3-Clause. It adds 23 tokens to every session and 443 once invoked, about $0.0001 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

pydantic-ai

Build production-ready AI agents with PydanticAI — type-safe tool use, structured outputs, dependency injection, and multi-model support.

davila7/claude-code-templates · 32 tokens

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…

langwatch/langwatch · 102 tokens

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…

langwatch/langwatch · 105 tokens

dashboard-widgets

Author a dashboard widget — a small React component backed by named LangWatchQL queries — from a plain question. Discovers the analytics schema, writes the queries, writes the widget file, saves it, then proves it renders. Use when asked to build, prototype, or iterate on a custom chart widget, or to add a widget…

langwatch/langwatch · 79 tokens

agent-improve

Turns production evidence into tested improvements for your AI agent. Forms hypotheses from real traces and analytics, explains the reasoning behind each one, then executes with the user: scenario tests that reproduce production failures, prompt and code changes as reviewable PRs, new evaluators and monitors that…

langwatch/langwatch · 0 tokens

test-compliance

Test that your AI agent stays observational and doesn't give prescriptive advice in regulated domains (healthcare, finance, legal). Creates scenario tests for boundary enforcement and red team tests for adversarial probing. Use when your agent advises but must not prescribe.

langwatch/langwatch · 53 tokens