ai-prompt-injection-defense

Audit LLM injection surfaces and produce OWASP-aligned defense recommendations.

3|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/Muvon/octomind-tap --skill ai-prompt-injection-defense
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-prompt-injection-defense
Source: https://github.com/Muvon/octomind-tap/tree/main/skills/ai-prompt-injection-defense
Command: npx skills add https://github.com/Muvon/octomind-tap --skill ai-prompt-injection-defense

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps teams prevent prompt injection (direct, indirect, and reflection/output-to-action) from hijacking LLM behavior or causing data exfiltration, and it provides a repeatable red-teaming workflow to validate defenses against OWASP LLM and OWASP Agentic risk categories.

Core Features & Use Cases

  • OWASP-aligned audit coverage: Maps findings to OWASP LLM01–LLM10 (2025) and OWASP ASI01–ASI10 (Agentic 2026), including misalignment and tool/identity abuse scenarios.
  • Defense-in-depth blueprint: Provides layered mitigations including instruction/data separation (XML tagging), structured outputs (strict JSON/function calling), content filtering, defensive prompting, programmable rails (NeMo Guardrails), least-agency tool scoping, downstream output validation (OWASP LLM05), and tamper-evident audit logging.
  • Red-teaming methodology & tooling: Specifies concrete red-team approaches and payload categories, and recommends practical toolchains (garak, PyRIT, Promptfoo) to generate reproducible injection tests.

Quick Start

Use this skill to run an injection audit of your LLM app by mapping each untrusted entry point (user input, retrieved content, tool outputs) to OWASP risks and producing a defense recommendations report with specific payloads that were attempted.

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 attacks in my LLM application?

To prevent prompt injection in LLM applications, apply defense-in-depth mitigations including XML instruction/data separation, structured outputs, content filtering, least-agency tool scoping, and downstream output validation aligned with OWASP LLM01–LLM10.

What is the difference between direct, indirect, and reflection prompt injection?

Direct prompt injection manipulates model behavior via user input, indirect injection hides malicious payloads in retrieved content or tool outputs, and reflection injection exploits model outputs that become downstream actions or inputs during agent execution.

How do I audit my agentic AI system for OWASP LLM security risks?

Audit agentic AI security by mapping untrusted entry points—user inputs, retrieved content, and tool outputs—to OWASP LLM01–LLM10 and ASI01–ASI10 risk categories, producing layered defense recommendations and reproducible red-team test payloads.

Which tools are recommended for red teaming LLM prompt injection vulnerabilities?

For red teaming LLM prompt injection vulnerabilities, the recommended toolchains are garak, PyRIT, and Promptfoo, which generate reproducible injection test payloads to validate defense-in-depth mitigations.

Does this defense approach work with NeMo Guardrails for content filtering?

Yes, the defense-in-depth blueprint incorporates programmable rails such as NeMo Guardrails alongside structured outputs, defensive prompting, and tamper-evident audit logging to provide comprehensive content filtering and LLM security.

How do I stop indirect prompt injection from retrieved documents hijacking my agent?

Stop indirect prompt injection from retrieved documents by implementing instruction/data separation using XML tagging, enforcing strict structured outputs, applying least-agency tool scoping, and validating downstream outputs before agent execution.