testing-agents-for-indirect-prompt-injection

testing-agents-for-indirect-prompt-injection is a skill for Claude Code from UnboundCompute/security-agent-skills. It costs 127 tokens per session (1,553 once invoked), scanned A, original, MIT.

A testing method for finding indirect prompt injection in AI agents. Indirect prompt injection is when instructions hidden in webpages, documents, emails, files, tool results, or other content make an agent act for an attacker.

In plain words
What is it for?
Use it to assess agents that browse, retrieve documents, read files or email, call tools, or use results from other agents.
Why use it?
An agent may treat untrusted content as instructions, even when the user never asked it to do so. This helps identify every content source that can influence the agent and test whether it obeys hidden instructions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the security-agent-skills plugin — 194 skills shipped together

Good fit Use it to assess agents that browse, retrieve documents, read files or email, call tools, or use results from other agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/unboundcompute/security-agent-skills/testing-agents-for-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 UnboundCompute/security-agent-skills --skill testing-agents-for-indirect-prompt-injection
Clone the repo
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills

Made for: Claude Code.

Or install security-agent-skills, the plugin that ships this one along with the rest of its 194 skills.

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 testing-agents-for-indirect-prompt-injection

README.md
[![agentmods](https://agentmods.dev/badge/skills/unboundcompute/security-agent-skills/testing-agents-for-indirect-prompt-injection/github.svg)](https://agentmods.dev/skills/unboundcompute/security-agent-skills/testing-agents-for-indirect-prompt-injection)
Your own site
<a href="https://agentmods.dev/skills/unboundcompute/security-agent-skills/testing-agents-for-indirect-prompt-injection"><img src="https://agentmods.dev/badge/skills/unboundcompute/security-agent-skills/testing-agents-for-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 testing-agents-for-indirect-prompt-injection

Your own site · 80×15
<a href="https://agentmods.dev/skills/unboundcompute/security-agent-skills/testing-agents-for-indirect-prompt-injection"><img src="https://agentmods.dev/badge/skills/unboundcompute/security-agent-skills/testing-agents-for-indirect-prompt-injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,553 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00127 $0.01553
Opus 5 $0.00063 $0.00776
Sonnet 5 $0.00025 $0.00311
Haiku 4.5 $0.00013 $0.00155

Measured 6d ago against content hash f14ae95f70df, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

testing-agents-for-indirect-prompt-injection scanned grade A with 0 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 6d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/testing-agents-for-indirect-prompt-injection/SKILL.md · 130 lines

How it starts

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

Testing agents for indirect prompt injection

Direct prompt injection is the user attacking the model. Indirect prompt injection is a third party planting instructions in content the agent later ingests, so the agent follows an attacker who never touched the prompt. It is the central agent vulnerability because agents exist to read external content and act on it, and models do not reliably separate "data to process" from "instructions to obey" when both share one context.

When to use

  • An agent or LLM app ingests any content it did not fully author: web pages, documents, RAG results, emails, tickets, files, tool responses, other agents.
  • You are reviewing an assistant that can call tools, browse, or send messages.
  • You need to know if a channel is a data channel or an instruction channel.

Scope check

Test agents and content channels you own or are authorized to test. Use benign, clearly-marked payloads and canaries; never exfiltrate real data or act against systems you do not control. If you can't name the authorization, stop.

The loop

  1. Enumerate ingestion channels. List every path by which content the agent does not control enters its context: retrieved/RAG documents, fetched web pages, uploaded or attached files, email and ticket bodies, tool and API responses, filenames and metadata, image and PDF text (via vision or OCR), source code and comments, and messages from other agents. Each is a candidate injection channel.

  2. Determine the trust treatment per channel. Does the content land in the same context as instructions, undelimited, with tools live? If ingested content is concatenated next to system/user instructions and the model can act while reading it, the channel is injectable. If it is quoted as data with tools disabled during ingestion, it is structurally harder.

  3. Define an observable effect first. Decide the unambiguous signal that proves the injection fired: emit a specific canary string, call a named benign tool, or set a flag. Success must be measurable, not "the output felt off." A canary token that only appears if the injected instruction executed is ideal.

Read the full file on GitHub · 130 lines

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. 6d ago First seen · 130 lines · 127 tokens per session scan A f14ae95f70df

Subscribe to this mod's changes

testing-agents-for-indirect-prompt-injection is a skill published in the GitHub repository UnboundCompute/security-agent-skills (5 stars, last pushed 2d ago), licensed MIT. It adds 127 tokens to every session and 1,553 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.