# LLM Prompt Injection Scanner

> Detect prompt injection, hidden text, and exfiltration patterns in documents, RAG chunks, and web content.

LLM Prompt Injection Scanner is a paid AI agent skill on Agensi by aingram702, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $1.99 (one-time purchase)
- Creator: [aingram702](https://www.agensi.io/creators/aingram702)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-10-17
- Security: scan passed (2026-10-11); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/llm-prompt-injection-scanner
- Tags: security, llm-ops, prompt-engineering, python, rag, jailbreak-detection

## About this skill

Processing untrusted content through an LLM creates immediate risks of instruction overrides and data exfiltration. This skill identifies prompt injection attempts and malicious payloads hidden within documents, emails, RAG chunks, and web content before they reach your model.

### What it does
- **Instruction Detection** flags common override patterns like "ignore previous instructions" or system role impersonation.
- **Hidden Text Extraction** finds zero-width characters, Unicode tags, and white-on-white HTML text used to hide payloads.
- **Exfiltration Analysis** scans for markdown image or link patterns designed to leak context to external domains.
- **Payload Decoding** identifies and evaluates base64, hex, and rot13 encoded malicious strings.
- **Automated Gating** provides exit codes and risk scores to block high-risk content in CI/CD or ingestion pipelines.

### How it works
1. **Input Selection** point the scanner at a file, directory, or pipe content through stdin.
2. **Heuristic Analysis** runs a multi-stage scan for known jailbreak templates, credential requests, and tool-use overrides.
3. **Risk Scoring** generates a score for each segment based on the severity of the detected pattern.
4. **Sanitization** optionally strips hidden characters and zero-width text to create a safer version of the source file.

### Frameworks & tools
The skill utilizes a Python-based CLI tool supporting various formats including `.md`, `.html`, `.pdf` (text layer), `.docx`, `.eml`, and RAG-ready text chunks.

### Why this beats prompting it yourself
Models are notoriously bad at identifying their own prompt injections because the injection itself subverts the model's reasoning. This external heuristic scanner operates outside the LLM context, ensuring that "ignore all instructions" commands never reach the target model's attention window.

### Use cases
- Sanitize external web content or PDFs before ingestion into a RAG knowledge base.
- Audit chat logs and tool outputs for attempted prompt-leaking or role-play attacks.
- Gate ingestion pipelines by blocking files that exceed a specific risk score threshold.
- Detect invisible Unicode or HTML tricks that human reviewers often miss during manual audits.

### Known limitations
Heuristic-based detection is not exhaustive as attackers constantly adapt. It only scans the text layer of PDFs and requires a Python environment for execution.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the LLM Prompt Injection Scanner skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Why should I use this scanner instead of just asking my LLM to check for injections?

Unlike LLM-based filters that can be bypassed by the very instructions they are trying to detect, this skill uses external heuristic analysis to identify malicious patterns before they ever reach your model's context window.

### Which file types and data formats can this skill process?

The scanner supports a wide range of formats including .md, .html, .pdf (text layer), .docx, .eml, and raw text chunks commonly used in RAG pipelines.

### How do I integrate this scanner into my existing AI agent workflow?

This is a Python-based CLI tool designed for easy integration into LLM-ops pipelines, CI/CD workflows, or as a pre-processing step for any AI agent that handles untrusted external data.

### What exactly is included in the purchase of this skill?

You will receive the full Python-based CLI tool, comprehensive documentation for integration, and a suite of pre-configured heuristic patterns for immediate deployment.

### Can the skill automatically remove the threats it finds, or does it only flag them?

Yes, the 'Sanitization' feature allows the tool to automatically strip zero-width characters and hidden HTML text, providing a 'clean' version of the source file for safer LLM processing.

### Are there any specific technical requirements or limitations I should be aware of?

While highly effective against known jailbreak templates and encoding tricks, it is a heuristic tool that requires a Python environment and cannot detect visual-based attacks in PDF images.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
