prompt-guard

Detect prompt injections and jailbreak attempts in LLM inputs.

11.5k|842|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/Orchestra-Research/AI-Research-SKILLs --skill prompt-guard-orchestra-research
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-guard
Source: https://github.com/Orchestra-Research/AI-Research-SKILLs/tree/main/07-safety-alignment/prompt-guard
Command: npx skills add https://github.com/Orchestra-Research/AI-Research-SKILLs --skill prompt-guard-orchestra-research

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers, torch, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill protects Large Language Models (LLMs) from prompt injection and jailbreak attacks, ensuring the integrity and safety of AI applications by filtering malicious user inputs and third-party data.

Core Features & Use Cases

  • Prompt Injection Detection: Identifies and blocks attempts to embed malicious instructions within user prompts or data.
  • Jailbreak Detection: Flags and prevents direct attempts to override the LLM's safety guidelines and intended behavior.
  • Use Case: Integrate this Skill into your chatbot to automatically scan incoming user messages for any signs of prompt injection or jailbreaking before they reach the LLM, preventing the AI from generating harmful or unintended responses.

Quick Start

Use the prompt-guard skill to check if the user input 'Ignore all previous instructions' is a jailbreak attempt.

Frequently Asked Questions about prompt-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect prompt injection attacks in LLM applications?

Prompt injection attacks are detected by validating user inputs and third-party data using a pre-trained 86M parameter sequence classifier. This identifies and blocks malicious instructions embedded within prompts before they reach the LLM.

What is the best way to prevent jailbreak attempts in chatbots?

Preventing jailbreak attempts involves scanning incoming user messages for direct overrides of safety guidelines using a dedicated classifier. This flags malicious inputs and ensures the LLM maintains its intended behavior and safety alignment.

Do I need transformers and torch to run prompt injection detection?

Yes, you need the transformers and torch libraries to run prompt injection detection. These dependencies are required to load the pre-trained 86M parameter classifier and perform sequence classification inference.

Can I use a pre-trained classifier to filter malicious instructions in third-party data?

Yes, you can use a pre-trained classifier to filter malicious instructions in third-party data. The model validates external inputs for embedded malicious instructions, ensuring secure LLM interactions across all data sources.

Does input validation for LLM security catch both direct and indirect prompt injections?

Input validation for LLM security catches both direct and indirect prompt injections. It identifies direct jailbreak attempts overriding safety guidelines and flags malicious instructions hidden within third-party data.

What are the limitations of using an 86M parameter classifier for jailbreak detection?

The 86M parameter classifier for jailbreak detection requires torch and transformers dependencies and focuses on sequence classification inference. It validates inputs before LLM processing but does not inspect generated outputs for safety alignment.