guards
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.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
guards
Mission
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.
Output Contract
Always return a structured plan plus a control matrix. The response must include these headings in this order:
- Problem Statement
- Success Criteria
- Risk Tier and Enforcement Posture
- Threat Scenarios
- Layered Control Stack
- Control Matrix
- Residual Risks
- Validation and Acceptance Checks
- Rollout and Monitoring
- Rollback and Abort Criteria
- Implementation Brief
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).
Request Contract
Model requests as GuardrailBlueprintRequest v1.
Required fields:
-
use_case: one-sentence workload description -
actor_profile: who can trigger the agent and from where -
tool_surface: tools or side-effecting actions the agent can invoke -
data_sensitivity:public | internal | confidential | regulated -
autonomy_level:assistant | semi_autonomous | autonomous -
regulatory_context: baseline policy context -
risk_tolerance:low | medium | high
Defaults:
-
regulatory_context = US enterprise baseline -
risk_tolerance = medium -
freshness_mode = pattern_only
When required fields are missing, ask only the minimum judgment-call questions needed to classify risk tier and tool boundary.
Control Taxonomy (Fixed)
Map every threat scenario across this layer order:
- Input controls
- Context controls
- Model controls
- Tool pre-call controls
- Tool post-call controls
- Output controls
- Human approval controls
- Audit and traceability controls
Each scenario must include at least one control in every applicable layer.
Enforcement Policy (Risk-Tiered Mixed Mode)
Apply this default policy unless the user overrides it:
-
low: monitored allow with explicit logging and anomaly detection -
medium: allow with guardrails and sampled human review -
high: fail-closed for side-effecting actions unless explicit human approval -
critical: fail-closed by default with mandatory human approval and dual-control where possible
Hard rule:
- High and critical scenarios must not be fail-open.
Workflow
- Normalize the request into
GuardrailBlueprintRequest v1. - Define the system boundary and identify side-effecting tools.
- Classify risk tier by data sensitivity, autonomy level, and blast radius.
- Build 5-12 concrete threat scenarios with attack paths and target assets.
- Map layered controls using the fixed taxonomy.
- Assign enforcement mode and human gate behavior per scenario.
- Produce residual risk register with explicit owners.
- Define acceptance checks and rollback triggers.
- Cross-check control choices against
references/industry_patterns.md. - Emit the final plan and control matrix using the template in
references/blueprint_template.md.
Evidence and Freshness Modes
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.
Quality Gates
Before completing, verify all gates:
- Provider-agnosticity: no vendor-locked implementation steps in the main output.
- Layer coverage: each high-risk scenario includes applicable controls across layers.
- Enforcement correctness: high and critical scenarios include fail-closed behavior.
- Residual risk completeness: each material risk has probability, impact, trigger, and owner.
- Traceability: each major requirement maps to at least one acceptance check.
- Operability: includes monitoring signals plus rollback/abort criteria.
Non-Goals
- No legal opinions or jurisdiction-specific legal advice.
- No guarantee that any control makes compromise impossible.
- No deployment automation scripts or runtime policy engine implementation.
- No provider-specific code generation unless explicitly requested.
Deliverable Checklist
- Structured plan with all required headings.
- Control matrix with standardized columns.
- Residual risk register with explicit ownership.
- Acceptance checks tied to requirements.
- Rollout and rollback criteria.
- Explicit mode declaration (
pattern_only,hybrid, orstrict_source_cited).
Reference
- Template:
references/blueprint_template.md - Pattern baseline:
references/industry_patterns.md
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-03-11
- Index updated
- 2026-03-11
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!