ai-prompt-injection-defense

Implements prompt injection and jailbreak defenses for LLM applications processing untrusted input.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/JenilRevaliya/ARGUS --skill ai-prompt-injection-defense-jenilrevaliya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ai-prompt-injection-defense
Source: https://github.com/JenilRevaliya/ARGUS/tree/main/.agent/skills/ai-prompt-injection-defense
Command: npx skills add https://github.com/JenilRevaliya/ARGUS --skill ai-prompt-injection-defense-jenilrevaliya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM applications that process untrusted user input or fetch external data are vulnerable to prompt injection and jailbreak attacks that can override system prompts, leak instructions, or trigger unauthorized tool calls. This Skill provides concrete mitigation patterns to defend against both direct and indirect injection. ## Core Features & Use Cases - Delimiter Sandboxing: Isolate user input inside XML tags or randomized nonce delimiters so the model treats it as data, not instructions. - Dual-Model Filter Pattern: Use a fast, cheap model as a security scanner to classify input as SAFE or MALICIOUS before it reaches the main agent. - Least-Privilege Tooling: Restrict database permissions to read-only and require human approval gates for state-changing function calls like delete_user or process_payment. - Use Case: When building a chatbot that summarizes user-uploaded PDFs, apply indirect injection defenses so a poisoned document cannot hijack the assistant into executing malicious function calls. ## Quick Start Review my LLM prompt construction code and apply prompt injection defenses including XML delimiter sandboxing and output validation.

Frequently Asked Questions about ai-prompt-injection-defense

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

FAQPage Schema
How do I prevent prompt injection in LLM applications?▼

Prevent prompt injection by isolating user input inside XML delimiter tags and instructing the model to treat tag contents as data, not instructions. Combine this with input validation, output validation, and structural separation since no single layer catches all attacks.

What is the difference between direct and indirect prompt injection?▼

Direct injection is when a user types adversarial text like 'ignore previous instructions' into the prompt. Indirect injection hides payloads in external data the LLM reads, such as poisoned PDFs or hidden text on websites the model fetches.

How do I use a second model to filter malicious prompts?▼

Use a small fast model like Claude 3 Haiku or GPT-4o-mini as a firewall that classifies incoming text as SAFE or MALICIOUS before it reaches the main agent. Reject requests flagged as malicious with an HTTP 400 error.

Why should LLM database access be read-only?▼

Read-only database access limits the blast radius if the LLM is compromised through injection. A database user with only SELECT permissions prevents an attacker from executing destructive statements like DROP TABLE through generated SQL.

Can output filtering alone stop prompt injection attacks?▼

No, output filtering alone is insufficient because injections can manipulate behavior without producing detectable output patterns. Defense-in-depth requires input validation, structural isolation with delimiters, least-privilege tools, and output sanitization together.