defend-llm-prompt-injection

Enforce trust boundaries with input/output guardrails and delimiter-based data isolation.

9|3|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill defend-llm-prompt-injection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defend-llm-prompt-injection
Source: https://github.com/Sir-chawakorn/sanook-cli/tree/main/skills/defend-llm-prompt-injection
Command: npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill defend-llm-prompt-injection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents malicious users or untrusted data from hijacking your LLM agent, leaking system prompts, or triggering unauthorized tool actions.

Core Features & Use Cases

  • Input/Output Guardrails: Implements multi-layered defense including injection classifiers, PII redaction, and schema validation.
  • Data Containment: Enforces strict separation between trusted system instructions and untrusted user/data content using random per-request delimiters.
  • Use Case: If your agent summarizes web content or processes user-uploaded documents, this skill ensures that hidden instructions within those files cannot force the agent to perform malicious actions like sending emails or deleting data.

Quick Start

Apply the defend-llm-prompt-injection skill to my current agent architecture to implement input sanitization and output redaction protocols.

Frequently Asked Questions about defend-llm-prompt-injection

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

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

Secure LLM agents against prompt injection attacks by enforcing strict trust boundaries with input/output guardrails, PII redaction, and random per-request delimiters to isolate untrusted data from system instructions.

What is the best way to prevent data exfiltration from RAG content in my application?

Prevent data exfiltration from RAG content by implementing multi-layered defense mechanisms including injection classifiers, schema validation, and strict data containment to stop hidden instructions from triggering unauthorized tool actions.

How do I implement input guardrails for untrusted user input in LLM applications?

Implement input guardrails for untrusted user input by applying input sanitization protocols, injection classifiers, and schema validation to ensure malicious users cannot hijack your agent or leak system prompts.

Does this approach maintain access to sensitive tools while processing untrusted documents?

Yes, this approach maintains access to sensitive tools while processing untrusted documents by enforcing strict separation between trusted system instructions and untrusted data content using random per-request delimiters.

How do I test regression against an attack corpus for LLM cybersecurity?

Test regression against an attack corpus for LLM cybersecurity by evaluating your hardened agent architecture against known prompt injection, jailbreak, and data exfiltration patterns to verify defense effectiveness.

Why do hidden instructions in uploaded files force my agent to perform malicious actions?

Hidden instructions in uploaded files force malicious actions because untrusted data content lacks strict isolation from system instructions, allowing input to hijack your LLM agent without proper trust boundaries.