codex/skills/guards/SKILL.md
Generate provider-agnostic AI agent guardrail blueprints and control matrices from a use case. Use when designing or reviewing agent safety architecture, prompt-injection and tool-misuse defenses, risk-tiered human approval gates, or auditable enterprise guardrail policies using industry patterns across top providers.
npx skillsauth add tkersey/dotfiles guardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Turn ambiguous "add guardrails" requests into an implementation-ready guardrail architecture. Produce provider-agnostic outputs that application engineers can execute without choosing a model vendor first.
Always return a structured plan plus a control matrix. The response must include these headings in this order:
Never output provider-specific SDK instructions in default mode.
If a user explicitly requests provider mappings, keep them in a separate appendix titled Provider Mapping (Optional).
Model requests as GuardrailBlueprintRequest v1.
Required fields:
use_case: one-sentence workload descriptionactor_profile: who can trigger the agent and from wheretool_surface: tools or side-effecting actions the agent can invokedata_sensitivity: public | internal | confidential | regulatedautonomy_level: assistant | semi_autonomous | autonomousregulatory_context: baseline policy contextrisk_tolerance: low | medium | highDefaults:
regulatory_context = US enterprise baselinerisk_tolerance = mediumfreshness_mode = pattern_onlyWhen required fields are missing, ask only the minimum judgment-call questions needed to classify risk tier and tool boundary.
Map every threat scenario across this layer order:
Each scenario must include at least one control in every applicable layer.
Apply this default policy unless the user overrides it:
low: monitored allow with explicit logging and anomaly detectionmedium: allow with guardrails and sampled human reviewhigh: fail-closed for side-effecting actions unless explicit human approvalcritical: fail-closed by default with mandatory human approval and dual-control where possibleHard rule:
GuardrailBlueprintRequest v1.references/industry_patterns.md.references/blueprint_template.md.Use one mode and state it in the output:
pattern_only (default): synthesize provider-agnostic industry patterns.hybrid: cite sources for high-risk controls and decision-critical claims.strict_source_cited: cite sources for all major control recommendations.When the prompt asks for "latest" provider specifics, verify against primary docs before finalizing.
Before completing, verify all gates:
pattern_only, hybrid, or strict_source_cited).references/blueprint_template.mdreferences/industry_patterns.mdtools
Convert markdown plans into beads with dependencies using br CLI. Use when creating task graphs, polishing beads before implementation, or bridging planning to agent swarm execution.
development
Orchestrate Codex skill optimization during active sessions through $cas goal control, $shadow single-session evidence, $tune diagnosis/refinement briefs, and the skill-optimizer custom subagent. Trigger for $opt, skill optimization loops, session-driven skill tuning, meta-skill audits, or explicit validated skill edits. Do not use for general code optimization, product optimization, or performance tuning.
development
Run a targeted fresh-eyes blunder pass over code, specs, plans, adjudications, closure gates, skill edits, or negative-evidence ledgers. Trigger when asked to reread with fresh eyes, find obvious bugs, catch mistakes/oversights/omissions, check for embarrassing misses, or perform a second independent blunder pass before closure. Do not use as a substitute for implementation, adjudication, or verification; use it as the final falsification/check pass for those workflows.
development
Explicitly shadow, tail, watch, follow, monitor, supervise, or companion exactly one Codex session id/path through `$seq`, then apply a named target skill as an interpretation/reporting/proposal/action lens until the watched session stops.