PromptInjection
Test LLM applications for prompt injection vulnerabilities โ jailbreak attempts, system prompt extraction, context manipulation, guardrail bypass techniques, direct injection, indirect injection, multi-stage attacks, and reconnaissance. USE WHEN prompt injection, jailbreak, LLM security, AI security assessment, pentest AI application, test chatbot, guardrail bypass, direct injection, indirect injection, RAG poisoning, multi-stage attack, complete assessment, reconnaissance.
What this skill does
## Customization
**Before executing, check for user customizations at:**
`~/.claude/PAI/USER/SKILLCUSTOMIZATIONS/PromptInjection/`
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
## ๐จ MANDATORY: Voice Notification (REQUIRED BEFORE ANY ACTION)
**You MUST send this notification BEFORE doing anything else when this skill is invoked.**
1. **Send voice notification**:
```bash
curl -s -X POST http://localhost:8888/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running the WORKFLOWNAME workflow in the PromptInjection skill to ACTION"}' \
> /dev/null 2>&1 &
```
2. **Output text notification**:
```
Running the **WorkflowName** workflow in the **PromptInjection** skill to ACTION...
```
**This is not optional. Execute this curl command immediately upon skill invocation.**
# PromptInjection Skill
## ๐ AUTHORIZATION & ETHICAL USE REQUIREMENTS
**โ ๏ธ CRITICAL - READ BEFORE USE โ ๏ธ**
This skill is part of a **Security Practice** run by a security professional with extensive experience in offensive security testing.
### Legal Requirements
**AUTHORIZATION IS MANDATORY:**
- โ
**ONLY test systems you own** or have **explicit written permission** to test
- โ
**ONLY use these techniques** as part of authorized penetration testing engagements
- โ
**ALWAYS document authorization** before beginning any testing
- โ
**RESPECT scope boundaries** defined in testing agreements
- โ
**FOLLOW responsible disclosure** practices for any vulnerabilities discovered
**UNAUTHORIZED TESTING IS ILLEGAL:**
- โ **NEVER test systems** without explicit written permission
- โ **NEVER exceed** authorized scope boundaries
- โ **NEVER use these techniques** for malicious purposes
- โ **NEVER disclose vulnerabilities** publicly before vendor remediation
- โ **NEVER exfiltrate** real user data during testing
### Ethical Framework
This skill exists for **defensive security purposes:**
1. **Authorized penetration testing** of client systems under formal engagement
2. **Security assessment** of your own systems and products
3. **Research and education** for improving AI/LLM security practices
4. **Responsible disclosure** of vulnerabilities to vendors for remediation
**Any use of this skill constitutes acceptance of these terms and agreement to use only for authorized, ethical security testing purposes.**
---
## When to Activate This Skill
**Activate this skill when user says:**
### Direct Triggers
- "test for prompt injection", "prompt injection test", "prompt injection assessment"
- "LLM security testing", "AI security audit", "test chatbot security"
- "jailbreak test", "test for jailbreaking"
- "pentest AI application", "security test AI system"
- "check AI vulnerabilities", "assess AI security"
### Research & Analysis
- "research prompt injection", "analyze LLM vulnerabilities"
- "study jailbreaking methods", "investigate AI attack vectors"
### Engagement Work
- "client engagement for LLM security"
- "comprehensive AI security assessment"
- "vulnerability research for disclosure"
---
## Workflow Routing
**When executing a workflow, output this notification:**
```
Running the **WorkflowName** workflow in the **PromptInjection** skill to ACTION...
```
This skill provides 5 comprehensive testing workflows:
### 1. CompleteAssessment (Master Workflow)
**File:** `Workflows/CompleteAssessment.md`
**Triggers:** "full assessment", "complete test", "comprehensive assessment"
**Description:** End-to-end security assessment (12-20 hours)
- Phase 1: Authorization & scoping
- Phase 2: Reconnaissance (1-2 hours)
- Phase 3-5: Direct/indirect/multi-stage testing (6-8 hours)
- Phase 6-9: Defense analysis & reporting (4-6 hours)
**Use for:** Full security engagements, formal penetration tests
### 2. Reconnaissance
**File:** `Workflows/Reconnaissance.md`
**Triggers:** "recon", "discover attack surface", "map application"
**Description:** Application intelligence gathering via browser automation
- DOM extraction and analysis
- JavaScript inspection
- API endpoint enumeration
- Injection point identification
**Use for:** Initial assessment phase, attack surface mapping
### 3. DirectInjectionTesting
**File:** `Workflows/DirectInjectionTesting.md`
**Triggers:** "test direct injection", "jailbreak testing", "basic injection"
**Description:** Single-stage direct attacks
- Basic instruction override
- Jailbreaking & guardrail bypass
- System prompt extraction
- Token manipulation
- Obfuscation techniques
**Use for:** Quick vulnerability validation
### 4. IndirectInjectionTesting
**File:** `Workflows/IndirectInjectionTesting.md`
**Triggers:** "test indirect injection", "RAG poisoning", "document injection"
**Description:** Attacks via external data sources
- Document upload injection
- Web scraping attacks
- RAG system poisoning
- API response manipulation
**Use for:** Testing RAG systems, data processing pipelines
### 5. MultiStageAttacks
**File:** `Workflows/MultiStageAttacks.md`
**Triggers:** "multi-stage attack", "sophisticated testing", "advanced attacks"
**Description:** Complex multi-turn attack sequences
- Progressive escalation
- Context poisoning
- Trust exploitation chains
**Use for:** Advanced testing, sophisticated threat simulation
---
## Quick Start
**For first assessment:**
1. Read QuickStartGuide.md (30-60 minute methodology)
2. Verify written authorization
3. Run Reconnaissance workflow
4. Test top 5 attack types
5. Document findings
**For comprehensive assessment:**
1. Use CompleteAssessment workflow
2. Follow all 9 phases
3. Generate professional report
---
## Resource Library
**Core Documentation:**
- **COMPREHENSIVE-ATTACK-TAXONOMY.md** - 10 attack categories, 100+ techniques
- **APPLICATION-RECONNAISSANCE-METHODOLOGY.md** - 7-phase recon process
- **DefenseMechanisms.md** - Defense-in-depth strategies, remediation guidance
- **AutomatedTestingTools.md** - Promptfoo, Garak, PyRIT comparison
- **QuickStartGuide.md** - First assessment checklist (30-60 min)
- **Reporting.md** - Report structure, templates, presentation guidance
**All resources are in the PromptInjection skill root directory.**
---
## Key Principles
### Authorization-First
1. Written authorization is mandatory
2. Document everything (scope, boundaries, approvals)
3. Respect boundaries - in-scope only
4. Stop if uncertain - clarify before proceeding
### Methodical Testing
1. Systematic approach - follow established methodology
2. Document as you go - record all tests and results
3. Reproduce findings - ensure vulnerabilities are reliable
4. Assess impact accurately - distinguish theoretical vs practical risk
### Responsible Disclosure
1. Give vendors time - 90-day disclosure timeline typical
2. Clear communication - detailed reproduction steps
3. Coordinate disclosure - work with vendor on timing
4. Protect users - no public details before patch
---
## Examples
**Example 1: Quick test**
```
User: "test this chatbot for prompt injection - I own it"
โ Verifies authorization
โ Runs Reconnaissance workflow
โ Tests top 5 attack types
โ Documents findings
```
**Example 2: Full assessment**
```
User: "comprehensive prompt injection assessment for client"
โ Loads CompleteAssessment workflow
โ 9-phase methodology (12-20 hours)
โ Professional report with remediation
```
**Example 3: Research**
```
User: "what are the latest jailbreaking methods?"
โ Searches COMPREHENSIVE-ATTACK-TAXONOMY.md
โ Returns categorized techniques with effectiveness ratings
```
---
## Support & Escalation
**When to escalate:**
- Authorization is unclear or questionable
- Ethical concerns arise
- Novel attack techniques discovered
- Critical 0-day vulnerabilities found
**Contact:**
- Configure in your USER settings
---
**๐ REMINDER: AUTHORIZED USE ONLY ๐**
This skill contains powerful security testing techniqRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts โ single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score โฅ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.