promptfoo-redteam-guardrailslisted
Install: claude install-skill SoluDevTech/ai-driven
# Test and Validate Guardrails with Promptfoo
Guardrails are content-filtering services in front of LLMs. Test them as standalone endpoints with custom Python providers returning `{output, guardrails: {flagged: bool}}`, then grade with `guardrails`/`not-guardrails` assertions. Always measure both true positives (caught harmful) and false positives (blocked benign).
## Use this skill when
- Testing Azure Content Filter, Azure Prompt Shields, AWS Bedrock Guardrails, NVIDIA NeMo, or OpenAI moderation
- Testing Google Cloud Model Armor with Vertex AI
- Benchmarking multiple guardrail vendors side-by-side
- Measuring true positives (`not-guardrails`) and false positives (`guardrails`)
- Testing evasion resistance (misspellings, translation, coded language)
- Configuring Model Armor templates and floor settings
- Comparing strict vs moderate template policies
## Do not use this skill when
- Setting up a first red team for an LLM app without guardrails → use `promptfoo-redteam-llm`
- Testing image guardrails specifically → use `promptfoo-redteam-multimodal` (UnsafeBench + Bedrock image provider)
- Testing RAG, agents, MCP, or multi-input apps → use the corresponding skill
## 🛡️ Edge cases (mandatory handling)
- **Only testing true positives** — a guardrail that blocks everything scores 100% on harmful but fails benign users. ALWAYS measure false positives with benign prompts.
- **Single-language testing** — guardrails often behave differently across languages; use the `translat