detecting-indirect-prompt-injection

detecting-indirect-prompt-injection is a skill for Claude Code, Codex from adriannoes/awesome-agentic-ai. It costs 29 tokens per session (2,599 once invoked), scanned C, original, MIT.

A security guide for finding hidden instructions in documents, web pages, images, emails, or tool results that try to manipulate an AI agent.

In plain words
What is it for?
Use it to scan untrusted content for indirect prompt injection during browsing, document processing, image reading, or other agent workflows.
Why use it?
It helps stop external content from tricking an agent into leaking information, changing its actions, or misusing connected tools.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scan untrusted content for indirect prompt injection during browsing, document processing, image reading, or other agent workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adriannoes/awesome-agentic-ai/detecting-indirect-prompt-injection
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add adriannoes/awesome-agentic-ai --skill detecting-indirect-prompt-injection
Clone the repo
git clone --depth 1 https://github.com/adriannoes/awesome-agentic-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for detecting-indirect-prompt-injection

README.md
[![agentmods](https://agentmods.dev/badge/skills/adriannoes/awesome-agentic-ai/detecting-indirect-prompt-injection/github.svg)](https://agentmods.dev/skills/adriannoes/awesome-agentic-ai/detecting-indirect-prompt-injection)
Your own site
<a href="https://agentmods.dev/skills/adriannoes/awesome-agentic-ai/detecting-indirect-prompt-injection"><img src="https://agentmods.dev/badge/skills/adriannoes/awesome-agentic-ai/detecting-indirect-prompt-injection/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for detecting-indirect-prompt-injection

Your own site · 80×15
<a href="https://agentmods.dev/skills/adriannoes/awesome-agentic-ai/detecting-indirect-prompt-injection"><img src="https://agentmods.dev/badge/skills/adriannoes/awesome-agentic-ai/detecting-indirect-prompt-injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,599 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.02599
Opus 5 $0.00015 $0.01300
Sonnet 5 $0.00006 $0.00520
Haiku 4.5 $0.00003 $0.00260

Measured 9d ago against content hash 5d3ff2354f45, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade C, and why

detecting-indirect-prompt-injection scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

ZERO_WIDTH = dict.fromkeys(map(ord, "​‌‍⁠ "), None) TAG_RANGE = range(0xE0000, 0xE0080) # Unicode tag chars used to smuggle text def normalize(text: str) -> str: text = text.translate(ZERO_WIDTH) text = "".join(ch for ch

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

# Debian/Ubuntu: sudo apt-get install -y tesseract-ocr

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

cursor-claude-codex/skills/anthropic-cybersecurity-skills/skills/detecting-indirect-prompt-injection/SKILL.md · 233 lines

How it starts

The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Detecting Indirect Prompt Injection

Authorized-use-only notice: Scripts in this skill scan untrusted content for injection payloads and run detector models. Run scanning only on data you are authorized to process, and treat any extracted payloads as live untrusted input — never paste them back into a privileged LLM context.

Overview

Indirect prompt injection (MITRE ATLAS AML.T0051.001, OWASP LLM01:2025) occurs when an LLM-powered agent ingests external content — a web page it browses, a PDF or email it summarizes, an image it OCRs, a tool result it reads — and that content contains hidden instructions the model then follows as if they came from the developer or user. Because the agent treats all tokens in its context window as equally authoritative, an attacker who controls any consumed artifact can hijack the agent's behavior: exfiltrate conversation history, redirect tool calls, leak secrets, or pivot through connected systems.

Unlike direct injection (the user types the attack), indirect injection arrives through a trusted-looking data channel, which is why naive input filtering misses it. Payloads hide in many forms: HTML comments and display:none/zero-width text on web pages, white-on-white or tiny-font text in PDFs, alt-text and EXIF metadata in images, text rendered into pixels (invisible to OCR-light filters but read by multimodal models), Unicode tag/zero-width characters, and Base64/ROT13 obfuscation. This skill builds a detection pipeline that normalizes and scans every artifact before it reaches the model, combining heuristic/regex detection, dedicated detector models (Meta Prompt Guard 2, ProtectAI's deberta-v3 prompt-injection classifier via LLM Guard), and multimodal extraction for images, and then defines response actions and detection telemetry.

When to Use

  • When building or hardening an agent that browses the web, reads email, summarizes documents, or processes user-uploaded files/images.
  • When you need a content-sanitization gate in front of an LLM that ingests third-party data.
  • During AI red-team / blue-team exercises validating that injected instructions in retrieved artifacts are caught.
  • When investigating an incident where an agent behaved as if it received instructions you did not author.
  • As a CI/CD pre-ingestion scan for documents added to a knowledge base.

Read the full file on GitHub · 233 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 233 lines · 29 tokens per session scan C 5d3ff2354f45

Subscribe to this mod's changes

detecting-indirect-prompt-injection is a skill published in the GitHub repository adriannoes/awesome-agentic-ai (57 stars, last pushed 14d ago), licensed MIT. It adds 29 tokens to every session and 2,599 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 2 findings (hidden instructions, asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

skill-inspector

Review AI agent skills before installation using NVIDIA SkillSpector and source-aware semantic review. Use when asked whether a skill or downloaded skill folder is safe, trustworthy, installable, over-permissioned, or malicious.

NVIDIA/SkillSpector · 47 tokens

agent-safety

Use when bounding an LLM agent that already runs — scoping its task domain, gating tools to least privilege, defending against prompt injection in untrusted web/email/RAG text, requiring human approval on irreversible actions, capping runtime and cost, or triaging what it already did. NOT building the loop, tools, or…

ericrisco/rsc-harness · 79 tokens

AI & LLM Security

LLM and AI application security testing — prompt injection, jailbreak resistance, OWASP LLM Top 10 (2025), RAG and agent/tool-use security, model supply chain, and AI red teaming for authorized assessments.

Masriyan/Claude-Code-CyberSecurity-Skill · 50 tokens

crossval-harness

Orchestrate a static + dynamic, exploit-validated red-team of an AI agent — read the source to find candidate vulnerable paths, then run the dynamic skills to confirm or refute each one empirically. The arbiter of truth is whether the exploit works, not a model vote. Authorized testing of agents you own or are…

William2333ZZ/trustshell · 75 tokens

redteam-an-agent

The end-to-end methodology for red-teaming a specific AI agent — adaptively, exploit-validated, and honestly. Read THIS target's own code, stand up a disposable harness, and prove or refute each weakness through a real attacker-reachable entry point. This is the orchestration + discipline that makes a finding…

William2333ZZ/trustshell · 90 tokens

audit-agent-code

Security-audit an AI agent's OWN framework code for classic appsec vulnerabilities the LLM can't defend — path traversal, command injection, SSRF, fail-open security controls, missing/late auth, unsafe deserialization — especially at the untrusted-input boundaries (channels, file/media handlers, config & skill…

William2333ZZ/trustshell · 102 tokens