prompt-injection-security

Sanitize prompts and validate outputs to prevent prompt injection in AI models.

10|5|Updated Dec 12, 2025
One-click install
npx skills add https://github.com/ils15/pantheon --skill prompt-injection-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-injection-security
Source: https://github.com/ils15/pantheon/tree/main/skills/prompt-injection-security
Command: npx skills add https://github.com/ils15/pantheon --skill prompt-injection-security

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Mitigates the risks of prompt injection by sanitizing inputs, validating outputs, and establishing guardrails to secure interactions with Large Language Models.

Core Features & Use Cases

  • Input Sanitization: Remove potentially malicious instructions from prompts.
  • Output Validation: Ensure outputs match expected patterns and filter out sensitive data.
  • Guardrails: Implement rules and filters to prevent unauthorized commands and ensure compliance.
  • RAG Security: Defend against context poisoning by filtering documents for injection attempts.
  • Red Teaming: Simulate attacks to validate the effectiveness of the security measures.

Quick Start

Run the sanitize_prompt function to ensure a safe prompt before processing with the AI.

Frequently Asked Questions about prompt-injection-security

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

FAQPage Schema
How do I secure LLM inputs against prompt injection attacks?

To secure LLM inputs against prompt injection, you must sanitize prompts to remove potentially malicious instructions before processing them with the AI model.

What is the best way to prevent context poisoning in RAG pipelines?

Preventing context poisoning in RAG pipelines involves filtering retrieved documents for injection attempts to defend against unauthorized instructions contaminating the generation context.

How do I validate LLM outputs to ensure they match expected patterns?

Validating LLM outputs requires implementing output validation rules to ensure responses match expected patterns while actively filtering out any exposed sensitive data.

Can I use guardrails to enforce compliance and prevent unauthorized commands in AI models?

You can enforce compliance and prevent unauthorized commands by implementing guardrails that establish strict rules and filters to secure interactions with large language models.

How does red teaming validate the effectiveness of LLM security measures?

Red teaming validates LLM security measures by simulating prompt injection attacks against your models to actively test and confirm the effectiveness of your established defenses.