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.
npx skills add Orchestra-Research/AI-Research-SKILLs --skill prompt-guard --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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**: ```bash pip install transformers torch ``` **Basic usage**: ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch from torch.nn.functional import softmax model_id = "meta-llama/Prompt-Guard-86M" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForSequenceClassification.from_pretrained(model_id) model.eval() def get_jailbreak_score(text): """Check user input for jailbreak attempts.""" inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512) with torch.no_grad(): logits = model(**inputs).logits probs = softmax(logits, dim=-1) return probs[0, 2].item() # Jailbreak probability # Check prompt score = get_jailbreak_score("Ignore previous instructions") if score > 0.5: print("⚠️ Jailbreak attempt detected!") ``` **Classification labels**: - **BENIGN** (label 0): Normal content - **INJECTION** (label 1): Embedded instructions in data - **JAILBREAK** (label 2): Direct override attempts ## Common workfl
- Quick start
- Common workflows
- Workflow 1: User input filtering (jailbreak detection)
- Workflow 2: Third-party data filtering (injection detection)
- Workflow 3: Batch processing for RAG
- When to use vs alternatives
- Common issues
- Threshold recommendations
- Hardware requirements
- Resources
pip install transformers torch
What does the prompt-guard skill do?
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.
How do I install it?
Run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill prompt-guard --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From Orchestra-Research/AI-Research-SKILLs, a repository with 11,391 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
