guardrail-patterns

guardrail-patterns is a skill for Codex from ZaxbyHub/opencode-swarm. It costs 58 tokens per session (234 once invoked), scanned A, original, MIT.

A coding guide for changing command-safety checks in the opencode-swarm project. It covers how shell commands are cleaned up, split, checked, and tested.

In plain words
What is it for?
Use it when editing guardrail code, shell-wrapper parsing, .swarm path handling, or tests for unsafe commands.
Why use it?
It helps prevent changes from accidentally creating ways to bypass destructive-command blocking. It also keeps the required project instructions and test checks in view.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md; mentions Codex.

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.

agentmods
npx agentmods add skills/zaxbyhub/opencode-swarm/guardrail-patterns
Any agent
npx skills add ZaxbyHub/opencode-swarm --skill guardrail-patterns
Clone the repo
git clone --depth 1 https://github.com/ZaxbyHub/opencode-swarm

Made for: Codex.

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 guardrail-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/zaxbyhub/opencode-swarm/guardrail-patterns.svg)](https://agentmods.dev/skills/zaxbyhub/opencode-swarm/guardrail-patterns)
Your own site
<a href="https://agentmods.dev/skills/zaxbyhub/opencode-swarm/guardrail-patterns"><img src="https://agentmods.dev/badge/skills/zaxbyhub/opencode-swarm/guardrail-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 234 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00058 $0.00234
Opus 5 $0.00029 $0.00117
Sonnet 5 $0.00012 $0.00047
Haiku 4.5 $0.00006 $0.00023

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

Security

Grade A, and why

guardrail-patterns 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 6d 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.

.agents/skills/guardrail-patterns/SKILL.md · 22 lines

What it actually says

Guardrail Patterns

Read, in order:

  1. AGENTS.md
  2. .agents/skills/engineering-conventions/SKILL.md
  3. .agents/skills/writing-tests/SKILL.md if tests are touched
  4. .opencode/skills/generated/guardrail-patterns/SKILL.md

Codex-specific execution notes:

  • Use rg to locate the current guardrail section numbers before editing; line numbers in generated skills can drift.
  • Preserve wrapper-unwrapping, normalization, and per-segment evaluation order unless the task is specifically to change it.
  • Add or update adversarial tests for bypass surfaces, argument-order permutations, Windows shell forms, and .swarm path variants.
  • Run focused guardrail tests after the change and report exact commands.
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. 6d ago First seen · 22 lines · 58 tokens per session scan A 9f39e6624718

Subscribe to this mod's changes

guardrail-patterns is a skill published in the GitHub repository ZaxbyHub/opencode-swarm (463 stars, last pushed today), licensed MIT. It adds 58 tokens to every session and 234 once invoked, about $0.0003 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

stuck

Diagnose frozen, stuck, or slow Qwen Code sessions on this machine. Scans for problematic processes, high CPU/memory usage, hung subprocesses, and debug logs. Use /stuck or /stuck to focus on a specific process.

QwenLM/qwen-code · 57 tokens

structured-debugging

Hypothesis-driven debugging methodology for hard bugs. Use this skill whenever you're investigating non-trivial bugs, unexpected behavior, flaky tests, or tracing issues through complex systems. Activate proactively when debugging requires more than a quick glance — especially when the first attempt at a fix didn't…

QwenLM/qwen-code · 85 tokens

atmos-diagnostics

Atmos diagnostics: machine-readable JSONL event streams, diagnostics.enabled/file/includeoutput, subprocess start/end/output events, masking, and debugging Atmos execution.

cloudposse/atmos · 33 tokens

vs-search

Search runtime and scene management: verify queries, inspect scenes, debug app readiness, and diagnose recall or scene-config issues.

volcengine/SearchCLI · 27 tokens

debug-systematic

Systematic 4-phase debugging methodology for complex, intermittent, or mysterious issues. Use when investigating bugs, race conditions, or unexplained failures.

travisjneuman/.claude · 33 tokens

cpp

Use when writing, reviewing, modernizing, building, or debugging C++ - RAII and resource lifetime, smart-pointer ownership, move semantics and the Rule of Zero/Five, target-based CMake with FetchContent, and killing undefined behavior with ASan/UBSan/TSan plus clang-tidy. NOT borrow-checker / Result-Option / cargo…

ericrisco/rsc-harness · 81 tokens