Skip to main content
skill CX Codex

prompt-injection-test — Claude Code skill: how to install

prompt-injection-test runs an LLM app through prompt injection attacks from the Arcanum PI Taxonomy. Use it when red-teaming your own AI app or checking how well its guardrails hold.

CC-BY-4.0 220 installs ★ 230 updated 2026-10-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add OWASP/secure-agent-playbook --skill prompt-injection-test -a claude-code
Open on GitHub

What prompt-injection-test does

The skill walks the agent through the procedure in plays/prompt-injection-testing.md. It begins by mapping every route attacker text can take into the model: chat and API parameters, uploaded files, web fetches, RAG documents, tool outputs, MCP resources. Then it goes through 13 attacker goals, such as leaking the system prompt, jailbreaking, enumerating tools, poisoning data or denial of service.

Each goal is tried with 18 payload techniques (Meta-Prompting, Rule Addition, Link Injection, Memory Exploitation and others). When a defense blocks the plain attempt, the skill retries with one of 20 evasions: base64, hex, morse, JSON/XML wrapping, steganography. High-impact goals and indirect surfaces go first.

You get a results table (intent, technique, evasion, surface, result, severity), findings written up with templates/finding.md, a checklist across five defense layers, and fixes ordered by priority. The skill covers only intents you have authorized, so set the scope before the run and point it at your own app.

What it helps with

  • map every path that lets outside text reach the LLM
  • check whether a chatbot gives up its system prompt
  • retry a blocked attack with base64 or hex encoding
  • write up an injection with its payload, attack path and fix
  • audit defenses across five layers, from model guardrails to app-side validation

Example prompts for the agent

  • Use the prompt-injection-test skill to check our support chatbot for prompt injection. It runs on my test environment.
  • Run prompt-injection-test on our RAG app, starting with indirect injection through uploaded documents.
  • With prompt-injection-test, retry the blocked system prompt leak using base64 and JSON wrapping, then write the finding up with templates/finding.md.

How to install prompt-injection-test

1Skills CLI (Vercel)

npx skills add OWASP/secure-agent-playbook --skill prompt-injection-test -a claude-code

2Manually: put the files in place

~/.claude/skills/prompt-injection-test/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/prompt-injection-test/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about prompt-injection-test

How do I install prompt-injection-test in Claude Code?

Run npx skills add OWASP/secure-agent-playbook --skill prompt-injection-test -a claude-code. The skill file ends up at ~/.claude/skills/prompt-injection-test/SKILL.md.

What does prompt-injection-test do?

It guides the agent through testing an LLM app against prompt injection: attacker goals, payload techniques, evasions and a check of five defense layers. The output is a results table, detailed findings and prioritized recommendations.

Which OWASP risks does the skill reference?

The main one is LLM01 (Prompt Injection). It also points to LLM05 (Improper Output Handling), LLM06 (Excessive Agency) and LLM07 (System Prompt Leakage). The taxonomy comes from Jason Haddix at Arcanum Information Security and the license is CC-BY-4.0.

Source text

SKILL.md · CC-BY-4.0
---
name: prompt-injection-test
description: Test LLM-integrated applications against known prompt injection techniques, evasion methods, and attack intents using the Arcanum PI Taxonomy. Use when red-teaming AI apps, validating guardrails, or deepening LLM01 (Prompt Injection) assessments.
license: CC-BY-4.0
---

# Prompt Injection Testing

Systematically test an LLM application's prompt injection defenses by following the full procedure in `plays/prompt-injection-testing.md`.

> Based on the [Arcanum PI Taxonomy](https://github.com/Arcanum-Sec/arc_pi_taxonomy) by Jason Haddix (Arcanum Information Security). CC BY 4.0.

## Steps

1. **Scope and Input Surface Mapping** — Identify all paths where attacker-controlled content reaches the LLM: direct (chat, API params) and indirect (file uploads, web fetches, RAG docs, tool outputs, MCP resources).

2. **Test by Attack Intent** (13 intents) — For each authorized intent, attempt to achieve the attacker's goal:
   - INT-01 System Prompt Leak, INT-02 Jailbreak, INT-03 Tool Enumeration
   - INT-04 API Enumeration, INT-05 Get Prompt Secret, INT-06 Attack Users
   - INT-07 Data Poisoning, INT-08 Denial of Service, INT-09 Discuss Harm
   - INT-10 Multi-Chain Attacks, INT-11 Generate Image, INT-12 Test Bias
   - INT-13 Business Integrity

3. **Test by Attack Technique** (18 techniques) — Apply known payload construction methods:
   - Framing, Narrative Smuggling, Cognitive Overload, Meta-Prompting
   - Russian Doll, Memory Exploitation, Act as Interpreter, Contradiction
   - End Sequences, Inversion, Rule Addition, Variable Expansion
   - Link Injection, Puzzling, Anti-Harm Coercion, ASCII/Spatial
   - Binary Streams, Spatial Byte Arrays

4. **Apply Evasion Layers** (20 evasions) — When techniques are blocked, retry with obfuscation:
   - Encoding: base64, hex, morse, cipher, reverse
   - Language: alt language, fictional language, phonetic substitution, emoji
   - Structural: JSON/XML wrapping, markdown, metacharacter confusion, whitespace, splats
   - Advanced: steganography, link smuggling, graph nodes, waveforms, case changing

5. **Execute Test Matrix** — Combine intents x techniques x evasions. Prioritize: high-impact intents first, indirect surfaces second, evasion sweeps against defenses that blocked direct attempts.

6. **Assess Results** — For each successful injection, document: severity, attack path (intent + technique + evasion + surface), exact payload, detection gap, and remediation.

7. **Defense Validation** — Check the 5-layer defense checklist: ecosystem hardening, model guardrails, prompt-layer defenses, data-layer controls, application-layer validation.

## Output

Test results summary table (intent / technique / evasion / surface / result / severity), detailed findings using `templates/finding.md`, defense coverage checklist with gaps highlighted, and prioritized recommendations.

## OWASP References

- LLM01: Prompt Injection
- LLM05: Improper Output Handling
- LLM06: Excessive Agency
- LLM07: System Prompt Leakage

© OWASP · CC-BY-4.0 · OWASP/secure-agent-playbook

Similar skills

All skills for Security →

From the same set18

The whole set →
secrets-scan secrets-scan scans source and config files for hardcoded credentials, API keys and tokens, whether you are reviewing before a merge or auditing a repo. CX Codex +1 427installs sca-audit sca-audit scans project dependencies for known CVEs, highlights abandoned packages, and suggests exact remediation commands. CX Codex +1 358installs agent-security-audit agent-security-audit is a Claude Code skill that checks AI agent configurations for vulnerabilities. Run it when reviewing CLAUDE.md files, MCP configs, and agent orchestration code. CX Codex +1 302installs mobile-code-review mobile-code-review audits native Android and iOS source code for security vulnerabilities against the OWASP MASVS v2.1.0 benchmark. CX Codex +1 224installs mcp-server-review mcp-server-review is a Claude Code skill that audits MCP server code and client settings for security risks. Run it to review a server or assess it before installation. CX Codex +1 217installs iac-security-review iac-security-review reviews Terraform, Kubernetes, and CloudFormation for security misconfigurations. Use it before an infrastructure change is reviewed or deployed. CX Codex +1 196installs securability-engineering securability-engineering — a skill that generates code adhering to FIASSE v1.0.4 and ASVS controls by default. Use it when building security-sensitive functions, APIs, or components that must pass review without rework. CX Codex +1 191installs multi-agentic-threat-model multi-agentic-threat-model conducts systematic threat modeling for multi-agent architectures using CSA MAESTRO and OWASP guidelines. CX Codex +1 188installs

Project sponsors

Companies that keep this analytics open