Agent skill · security · zechenzhangagi
prompt-guard
Meta's 86M prompt injection and jailbreak detector. Filters malicious prompts and third-party data for LLM apps. 99%+ TPR, <1% FPR. Fast (<2ms GPU). Multilingual (8 languages). Deploy with HuggingFace or batch processing for RAG security.
Why this skill is useful
Adds a comprehensive prompt injection and jailbreak detection system that enhances LLM security with executable filtering scripts.
What it needs
Requires torch, transformers installed locally. About 4k tokens when loaded. Last updated 2026-06-16. 11,472 stars on the source repository.
What this skill does
Prompt Guard - Prompt Injection & Jailbreak Detection Prompt Guard is an 86M parameter classifier that detects prompt injections and jailbreak attempts in LLM applications. Quick start Installation: Basic usage: Classification labels: BENIGN (label 0): Normal content INJECTION (label 1): Embedded instructions in data JAILBREAK (label 2): Direct override attempts Common workflows Workflow 1: User input filtering (jailbreak detection) Filter user prompts before LLM: Common jailbreak patterns detected: Workflow 2: Third-party data filtering (injection detection) Filter API responses and RAG documents: Common injection patterns detected: Workflow 3: Batch processing for RAG Filter retrieved documents in batch: When to use vs alternatives Use Prompt Guard when: Need lightweight (86M params, <2ms latency) Filtering user inputs for jailbreaks Validating third-party data (APIs, RAG) Need multilingual support (8 languages) Budget constraints (CPU-deployable) Model performance: TPR: 99.7% (in-distribution), 97.5% (OOD) FPR: 0.6% (in-distribution), 3.9% (OOD) Languages: English, French, German, Spanish, Portuguese, Italian, Hindi, Thai Use alternatives instead: LlamaGuard: Content moderation (violence, hate, criminal planning) NeMo Guardrails: Policy-based action validation Constitutional AI: Training-time safety alignment Combine all three for defense-in-depth: Common issues Issue: High false positive rate on security discussions Legitimate technical queries may be flagged: Solution: Context-aware filtering with user reputation: --- Issue: Texts longer than 512 tokens truncated Solution: Sliding window with overlapping chunks: Threshold recommendations Application Type Threshold TPR FPR Use Case ------------------ ----------- ----- ----- ---------- High Security 0.3 98.5% 5.2% Banking, healthcare, government Balanced 0.5 95.7% 2.1% Enterprise SaaS, chatbots Low Friction 0.7 88.3% 0.8% Creative tools, research Hardware requirements CPU: 4-core, 8GB RAM Latency: 50-200ms per re …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills zechenzhangagi/prompt-guard