Skip to content
Security
Skill

/prompt-injection

Audit applications for AI prompt injection, agent security, and LLM permission boundary vulnerabilities, including chatbots and agents hijacked by what they read: a malicious web page in a browsing agent, incoming emails, documents or tickets reaching an agent that can send

From plugin
cybersecurity-skills
53442 skills1 agent

Claude Code

$ npx -y skills add briiirussell/cybersecurity-skills --skill prompt-injection --agent claude-code

SKILL.md

prompt-injection.SKILL.md
name: prompt-injection
description: "Audit applications for AI prompt injection, agent security, and LLM permission boundary vulnerabilities, including chatbots and agents hijacked by what they read: a malicious web page in a browsing agent, incoming emails, documents or tickets reaching an agent that can send replies, write files or call tools. Use when the user mentions 'prompt injection,' 'LLM security,' 'AI security,' 'jailbreak,' 'indirect prompt injection,' 'prompt leaking,' 'AI red team,' 'LLM vulnerabilities,' 'AI input validation,' 'system prompt extraction,' 'agent security,' 'MCP security,' 'AI permissions,' 'AI privilege escalation,' or needs to secure any application with AI features, AI agents, or LLM integrations."
allowed-tools: Read, Grep, Glob, WebSearch

Prompt Injection — AI/LLM Security Audit

Audit applications that use AI features, LLM integrations, or AI agents for prompt injection, privilege escalation, and authorization bypass vulnerabilities.

Cross-references: `threat-modeling` for design-time AI risk modeling on new AI features (before this skill applies); `owasp-audit` for the XSS / output-rendering patterns that overlap when LLM output reaches the browser (sanitize on render, JSON-LD breakout); `api-audit` for the API surface that LLM tools and MCP servers expose; `ai-risk-management` for the broader governance frame this skill sits within — prompt injection is the security slice of AI risk; AI RMF covers the rest (fairness, robustness, transparency, drift, lifecycle); `agent-supply-chain-audit` for the same hidden-instruction and tool-poisoning checks applied to the developer's own coding-agent environment (skills, plugins, hooks, MCP servers, `CLAUDE.md` / `AGENTS.md`); `log-watch` and `personal-opsec` for two everyday agents that read attacker-controlled text — a log-review agent and a personal inbox assistant.

Authorization

Audit only AI features, agents and integrations the user owns or is authorized to test. Source and prompt review needs nothing more. For live tests, use a test or staging deployment and test accounts, keep payloads benign (a canary string, not a real exfiltration), and never aim an injection at production users, third-party AI services you don't control, or other people's agents. See Boundaries.

Background

Prompt injection is the #1 vulnerability in LLM-integrated applications (OWASP Top 10 for LLM Applications 2025, LLM01). It occurs when untrusted input influences the instructions an LLM follows, causing it to ignore its system prompt, leak secrets, or take unauthorized actions.

**Three attack classes:**

  • **Direct injection:** Attacker provides malicious input directly to the LLM (e.g., chat input, form field processed by AI)
  • **Indirect injection:** Attacker plants malicious instructions in data the LLM will later consume (e.g., web pages, emails, documents, database records, tool outputs, RAG chunks)
  • **Cross-privilege injection:** Lower-privileged user plants injection in shared data that a higher-privileged user's AI session consumes, escalating privileges through the AI layer

Methodology

Step 1: Map the AI Attack Surface

Identify every place the application uses AI. This includes direct LLM API calls AND higher-level AI features:

Grep for LLM API calls:
- openai, anthropic, cohere, replicate, ollama
- ChatCompletion, messages.create, generate, complete
- langchain, llamaindex, autogen, crewai

Also look for AI features that may not be obvious LLM calls:
- AI-powered search or recommendations
- AI content generation (summaries, descriptions, emails)
- AI chatbots or copilots embedded in the app
- AI-assisted form completion or auto-fill
- AI moderation or classification
- AI-driven workflow automation
- MCP (Model Context Protocol) servers and tool registrations

For each AI integration, document: 1. **What is the system prompt?** Read it fully. 2. **What user input reaches the prompt?** Trace every variable interpolated into the prompt template. 3. **What external data reaches the prompt?** (RAG results, tool outputs, web scrapes, database records, file contents, emails) 4. **What actions can the LLM take?** (tool/function calls, code execution, database writes, API calls, email sending) 5. **How is the LLM output used downstream?** (rendered as HTML, executed as code, used in SQL, passed to another LLM) 6. **What user role/permissions context does the AI operate under?** (its own service account? the requesting user's session? an admin context?)

Step 2: Audit Prompt Construction

Check how prompts are assembled. Look for:

**Unsanitized interpolation:**

# VULNERABLE — user input directly in prompt
prompt = f"Summarize this: {user_input}"

# VULNERABLE — external data injected without marking
prompt = f"Answer based on this context: {rag_results}"

**Missing input/output boundaries:**

# BETTER — clear delimiters separating instructions from data
prompt = f"""Summarize the text between the <document> tags.
<document>
{user_input}
</document>"""

**Secrets in system prompts:**

# VULNERABLE — API keys, database credentials, or internal URLs in system prompt
system = f"You are a helper. Use API key {API_KEY} to call..."

Check for these patterns:

  • User input concatenated or f-string interpolated into prompts without delimiters
  • RAG/retrieval results injected without sanitization or boundary markers
  • Tool/function outputs fed back into prompts without validation
  • System prompts containing secrets, internal URLs, or sensitive business logic
  • Chain-of-thought or scratchpad content exposed to the user

Step 3: Inspect Instruction-Bearing Content for Concealment

The model reads bytes a human reviewer never sees. Run these checks on everything that ends up in a prompt: system prompts and templates, RAG corpora and ingested documents, tool and MCP manifests (names, descriptions, parameter schemas), and agent instruction files (`CLAUDE.md`,

Read more
@briiirussell
Ships withcybersecurity-skills

A collection of cybersecurity skills for AI coding agents. The AI does the heavy lifting; you bring the context about your stack and your priorities.

53442 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
534
Star history of briiirussell/cybersecurity-skills on GitHub, a chart by star-history.com

Other skills on cybersecurity-skills.

More skills from other plugins.

api-security

api-security

Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…

@zhaoxuya520@zhaoxuya520Install Skill
nemoclaw-user-guide

nemoclaw-user-guide

Find official NemoClaw documentation for installation, configuration, operation, or troubleshooting. Also handles requested docs…

@nvidia@nvidiaInstall Skill

Questions about prompt-injection.

Which coding agents can use prompt-injection?
prompt-injection installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.