Agent skill
ai-safety-guardrails
Security-by-design for AI (Prompt Injection defense, Hallucination checks, PII filters).
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/security-andreibesleaga-gabbe-4
SKILL.md
ai-safety-guardrails Skill
This skill protects the system from its own AI.
1. Input Guardrails (Defense)
- Prompt Injection: "Ignore previous instructions".
- Defense: Delimiters (XML tags), "Sandwich Defense" (System Prompt + User Input + System Reminder).
- Jailbreaks: "Do this in 'DAN' mode".
- Defense: Pattern matching for known jailbreak signatures.
- PII Scrubbing: Regex scan input for SSN, Credit Cards, Emails before sending to LLM.
2. Output Guardrails (Verification)
- Hallucination Check: "Self-Consistency" (Ask 3 times, take majority).
- Tone Policing: Sentiment analysis on output. (Block Toxic/Aggressive responses).
- Format Validation: Ensure JSON is valid JSON.
3. Libraries & Tools
- NeMo Guardrails (NVIDIA)
- Guardrails AI (Python)
- Rebertha (PII)
4. System Design
- Human in the Loop (HITL): For high-stakes actions (Transfer Money), AI proposes, Human approves.
- Least Privilege: The Agent's API Token should NOT have admin access.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?