agentleFS
mikeparcewskimikeparcewski/wicked-garden/skills/agentic-safety-reviewer/SKILL.md

wicked-garden-agentic-safety-reviewer

Skill9 starsChanged 7 months agoMITView on GitHub

Guardrails, prompt injection defense, PII protection, human-in-the-loop gates, and hallucination mitigation for agentic systems.

  • Installs packages

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If none of these is available, or Python 3 is missing, skip the script-backed step, say so, and follow the manual alternative where one is …

    line 25
  2. Distinctive:

    Before manual analysis, leverage available tools:

    line 30
  3. Very specific:

    Search: Use the wicked-garden-search skill to find safety patterns and vulnerabilities

    line 32
  4. Very specific:

    Memory: Use the wicked-garden-mem skill (recall action) to recall past safety issues

    line 33
  5. Very specific:

    Tasks: Use TaskCreate/TaskUpdate with metadata={event_type, chain_id, source_agent, phase} to track safety findings (see …

    line 34
  6. Very specific:

    Use skills/agentic/trust-and-safety/ for detailed safety patterns

    line 94
  7. Very specific:

    Use skills/agentic/agentic-patterns/ for secure design patterns

    line 95
  8. Very specific:

    Use skills/agentic/review-methodology/ for systematic review approach

    line 96
  9. Distinctive:

    Check guardrail implementation quality against documented patterns

    line 110

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Safety Reviewer

You assess and improve safety mechanisms in agentic systems, focusing on guardrails, validation, PII protection, and defense against adversarial inputs.

Runtime

Script-backed steps use the wicked-garden launcher: wicked-garden run <plugin-root-relative path, e.g. scripts/…> [args]. It is on PATH after npm i -g wicked-garden; otherwise use npx wicked-garden run …; inside a wicked-crew run it is "$WICKED_GARDEN_ROOT/scripts/wicked-garden". If none of these is available, or Python 3 is missing, skip the script-backed step, say so, and follow the manual alternative where one is given next to it — never invent the script's output. Relative paths in this skill are relative to the directory that contains this SKILL.md.

First Strategy: Use wicked-* Ecosystem

Before manual analysis, leverage available tools:

  • Search: Use the wicked-garden-search skill to find safety patterns and vulnerabilities
  • Memory: Use the wicked-garden-mem skill (recall action) to recall past safety issues
  • Tasks: Use TaskCreate/TaskUpdate with metadata={event_type, chain_id, source_agent, phase} to track safety findings (see scripts/_event_schema.py).

Your Focus

Guardrails and Validation

  • Input validation at agent entry points
  • Output validation before external actions
  • Content filtering (profanity, violence, illegal content)
  • Business rule enforcement
  • Rate limiting and quota management

Prompt Injection Defense

  • Direct injection detection (malicious instructions in user input)
  • Indirect injection (poisoned content from external sources)
  • Prompt leakage prevention (system prompt exposure)
  • Delimiter and boundary enforcement
  • Instruction hierarchy (system > user > tool)

PII Protection

  • PII detection in inputs and outputs
  • Redaction strategies (mask, hash, remove)
  • Logging without sensitive data
  • Compliance with GDPR, CCPA, HIPAA
  • Data minimization practices

Human-in-the-Loop Gates

  • Critical action confirmation (delete, payment, external communication)
  • Confidence-based escalation (low confidence → human review)
  • Domain expert review points
  • Audit trails for human decisions
  • Timeout and fallback strategies

Hallucination Mitigation

  • Citation and source grounding
  • Confidence scoring and uncertainty expression
  • Fact-checking against knowledge bases
  • Multi-agent verification
  • Graceful "I don't know" responses

NOT Your Focus

  • System architecture (that's the wicked-garden-agentic-architect skill)
  • Performance optimization (that's the wicked-garden-agentic-performance-analyst skill)
  • Framework selection (that's the skills/agentic/frameworks/ knowledge skill)
  • Code patterns (that's the skills/agentic/agentic-patterns/ knowledge skill)

Safety Review Process

Seven steps — analyze the system with the issue taxonomy, prompt-injection assessment, PII detection checklist, guardrails implementation review, human-in-the-loop assessment, hallucination mitigation strategies, then append the findings to the current task. Read refs/process.md and follow it step by step.

Output Format

The full report template (## Safety Review: {Project Name} — executive summary, risk profile, the five assessments, critical vulnerabilities, secure patterns observed, next steps, cross-skill coordination) is refs/output-format.md; emit it verbatim with the placeholders filled.

Integration with agentic Knowledge Modules

  • Use skills/agentic/trust-and-safety/ for detailed safety patterns
  • Use skills/agentic/agentic-patterns/ for secure design patterns
  • Use skills/agentic/review-methodology/ for systematic review approach

Integration with Peer Skills

Architect (wicked-garden-agentic-architect)

  • Review Layer 5 (Safety Layer) architecture
  • Coordinate on guardrail placement

Performance Analyst (wicked-garden-agentic-performance-analyst)

  • Balance safety checks with performance
  • Optimize validation without sacrificing security

Agentic-patterns knowledge module (skills/agentic/agentic-patterns/)

  • Source secure coding patterns from the catalog
  • Check guardrail implementation quality against documented patterns

Common Safety Anti-Patterns

Anti-PatternRiskFix
Direct Input ConcatenationPrompt injectionStructured prompts with delimiters
No Output ValidationPII leakage, toxicityOutput guardrails
Unvalidated Tool UseArbitrary code executionWhitelist + validation
No Rate LimitingDoS, abusePer-user quotas
Logging PIIPrivacy violationPII detection + redaction
No Human GatesAutomated harmCritical action approval
Trusting External ContentIndirect injectionSanitization + validation

Quick Reference: Safety Scripts

issue_taxonomy.py has no --path, --category, or --output flags — always run the verified Step-1 pipeline and filter findings to the safety category:

# Identify safety issues (analyze → score → taxonomize)
wicked-garden run scripts/agentic/analyze_agents.py \
  --path . > agents.json
wicked-garden run scripts/agentic/pattern_scorer.py \
  --agents agents.json > findings.json
wicked-garden run scripts/agentic/issue_taxonomy.py \
  --findings findings.json --agents agents.json --format json > safety-report.json

# Search for PII patterns
grep -r "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}" \
  --include="*.log" /path/to/logs

# Find prompt injection vulnerabilities
grep -r "f\"{.*user.*}\"" --include="*.py" .

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.