Prompt Pattern Catalog — Index

A catalog of 142 prompt engineering patterns extracted from 500+ production AI agent plugins (2,293 SKILL.md files) across community plugin repositories, 2 open-source skill repositories, and the Claude Code system prompt architecture. The original 30 patterns (1-30) include positive/negative examples. The advanced 61 patterns (31-91) were discovered through deep research across the full plugin collection. The 8 gap-fill patterns (92-99) were found in a targeted sweep for under-explored categories. The final 21 patterns (100-120) were extracted from Anthropic’s official skills repo and ComposioHQ’s awesome-claude-skills repo. Patterns 121-142 cover platform-level concerns from Claude Code’s composable system prompt.

Data sources: Extracted from analysis of 500+ production AI agent plugins across DevOps, security, migration, and incident response domains.

Extraction dates: 2026-04-13 (original 30), 2026-04-14 (advanced 31-91), 2026-04-15 (open-source 100-120)


How to Use This Catalog

  1. Building a new skill? Scan the quick-reference table below to find patterns relevant to your use case.
  2. Reviewing an existing skill? Check which patterns it uses and which it’s missing.
  3. Learning prompt engineering? Read the category files in order — they build from structure to orchestration to quality.

Companion Files

File What it covers
prompt-engineering-for-skills.md Theory — 9 foundational techniques grounded in conditional entropy / attention distribution
template.md Deep dive — One BAD vs GOOD comparison with line-by-line analysis
This catalog (patterns 1-30) Foundational Patterns — 30 patterns with positive/negative examples
patterns-advanced-orchestration.md Advanced — 14 agent orchestration & multi-agent patterns (31-44)
patterns-advanced-quality.md Advanced — 11 quality, review & evaluation patterns (45-55)
patterns-advanced-safety.md Advanced — 14 safety, trust & compliance patterns (56-69)
patterns-advanced-workflow.md Advanced — 11 workflow, execution & autonomy patterns (70-80)
patterns-advanced-io-domain.md Advanced — 11 I/O, domain & communication patterns (81-91)
patterns-gap-fills.md Gap fills — 8 onboarding, productivity, migration & creative patterns (92-99)
patterns-open-source-skills.md Open-Source — 21 patterns from Anthropic official + community skill repos (100-120)
patterns-karpathy-behavioral.md Behavioral — 5 Karpathy-derived patterns: surface assumptions, minimum viable code, surgical changes, verify-per-step, narrate mistake path
patterns-claude-code-platform.md Platform — 12 Claude Code platform patterns: memory, permissions, scheduling, tool routing, agent dispatch (121-132)
patterns-claude-code-platform-extended.md Platform Extended — 10 patterns: compositional assembly, tool constraints, security monitor, team coordination, dream memory (133-142)
skill-architecture-patterns.md Architecture — Skill packaging, composition, sub-agents, marketplace, reference org
skill-reference-laziness-analysis.md Deep Dive — 8 strategies to prevent agent laziness in Tier 3 reference reads, with risk-tiered decision framework
reference-skip-playbook.md Deep Dive — 11 solution patterns for the reference-skip problem: 3 failure modes (naked hop, pre-satisfaction, optional framing), decision matrix, anti-patterns

Quick-Reference Table

# Pattern Category Prevalence Key Benefit
1 YAML Frontmatter Metadata Structural ~100% Platform-level identity and tool permissions
2 Phased/Stepped Execution Structural ~54% Deterministic ordering with per-phase goals
3 Workflow Mode Branching Structural ~5% Same skill serves different audiences
4 $ARGUMENTS Variable Structural ~7% Parse user input with flags and options
5 Persona/Role Assignment Execution ~9% Sets expertise level and reasoning style
6 Negative Constraints Execution ~18% Prevents specific known mistakes
7 Interactive Flow Control Execution ~2% One question at a time, STOP and WAIT
8 Confirmation Gates Execution ~4% Human approval before risky actions
9 Progress Feedback Execution ~2% Step N/M status with exit codes
10 Prompt Injection Defense Safety <1% Treat external content as untrusted data
11 Sensitive Data Redaction Safety ~2% Named data types with replacement patterns
12 Read-Only Boundary Safety ~4% Declare operational scope limits
13 Activation Scope Safety ~7% When to Use / When NOT to Use with redirects
14 Structured Output Templates I/O Contracts ~26% Exact output format with populated example
15 Error Handling / Degradation I/O Contracts ~10% Phase-specific failure responses
16 Configuration Persistence I/O Contracts ~4% Check-load-setup-save for user settings
17 Cross-Platform Handling I/O Contracts ~3% Platform-specific tools and paths
18 Multi-Agent Orchestration Orchestration ~2% Agent topology with consensus scoring
19 Skill Composition Orchestration ~4% Delegate to existing skills (DRY)
20 Intent Classification Orchestration ~6% Route input to correct sub-workflow
21 Tool Routing Tables Orchestration ~16% Task-to-tool mapping with “NOT these”
22 Deduplication / Consensus Orchestration ~1% Weighted similarity with defined thresholds
23 Reference File Injection Knowledge ~17% Pointers to external knowledge files
24 Domain Knowledge Embedding Knowledge ~22% Inline schemas, field tables, query templates
25 Few-Shot Examples Knowledge ~21% Complete input/output pairs
26 Evidence Chain / Proof-of-Work Knowledge ~5% Traceable conclusions with mandatory manifest
27 Scoring Rubrics Quality ~4% Criteria, score ranges, category thresholds
28 Self-Critique Quality ~2% Adversarial weakness identification
29 Feedback Solicitation Quality <1% Priority-tiered survey with session dedup
30 Version Check Quality <1% Non-blocking update notification

Advanced Patterns Quick-Reference Table (31-80)

Discovered through deep research across 500+ plugins. Grouped by category.

Category 8: Advanced Agent Orchestration (/prompt-context-patterns/catalog/categories/patterns-advanced-orchestration)

# Pattern Key Benefit
31 Adversarial Persona Framing Attack mindset finds real bugs, not surface issues
32 Hub-and-Spoke SDLC State Machine Deterministic progress through development lifecycle
33 M x N Cross-Model Consensus Grid Cross-model diversity catches hallucinations
34 Dual-Model Adversarial Planning Independent plans reduce single-model bias
35 Cost-Optimized Model Routing 60%+ cost savings via task-appropriate model selection
36 Handoff Context Protocol Uniform context transfer between agents
37 Context Efficiency Rule Orchestrator context stays clean for coordination
38 Complexity-Tiered Dispatch Right-size agent pipeline to task complexity
39 Persistent Team with Message Board State files enable cross-agent discussion
40 Delegation to Cloud Agent Work items as agent assignment mechanism
41 Loop Prevention with Max Iterations Hard stops prevent infinite agent cycles
42 Agent Memory Isolation Prevents cross-agent influence and injection
43 Sparse Git Worktree for Review Monorepo-safe isolated file access
44 Severity Promotion/Demotion by Area Organizational risk appetite in the prompt

Category 9: Advanced Quality & Evaluation (/prompt-context-patterns/catalog/categories/patterns-advanced-quality)

# Pattern Key Benefit
45 Directive-Based Review with on_fail Three-way Pass/Review/Fail per criterion
46 Multi-Stage Repo Discovery Before Review Reviews calibrated to repo conventions
47 Evidence-First Review “Demonstrate, don’t cite rules” — actionable bugs
48 Rule-Catalog Review (YAML) Versioned, auditable, independently updatable rules
49 Blast Radius & Impact Formulas Quantified operational impact scoring
50 Adversarial Triad + Counterarguments Two-round review eliminates groupthink
51 Schema Validation Gate Machine-enforced output format compliance
52 LLM-as-Judge (8 Scenarios) Full evaluation toolkit including meta-judging
53 Retrospective Quality Rubric Anti-pattern/pattern pairs for postmortems
54 Test Scaffolding + Convention Enforcement Complete test generation with anti-pattern tables
55 Smart Triage-Skip with Model Tracking Prevents duplicate triage, enables model upgrades

Category 10: Advanced Safety & Compliance (/prompt-context-patterns/catalog/categories/patterns-advanced-safety)

# Pattern Key Benefit
56 MCP-Response-as-Data Guardrail Prevents infrastructure detail leakage
57 Prompt-Injection-as-Security-Finding Turns attacks into actionable review findings
58 Prosecutor-Defender-Judge Architecture Adversarial audit with accuracy metrics
59 Rescue-Tag-Before-Destructive-Operation Automatic undo points for all destructive ops
60 Tiered Permission Model (RED/DEFER/GREEN) Three-tier risk classification with preflight analysis
61 Data Classification Matrix (4-Level) Unambiguous sensitivity taxonomy with tool-specific rules
62 XPIA Defense Model Four-layer defense for cross-plugin injection attacks
63 Severity Rubric with Litmus Tests “Would you wake someone at 3 AM?” — calibration anchors
64 Security Posture Delta Analysis Code + infrastructure correlation for real risk
65 Confidence-Gated Reporting Asymmetric thresholds: lower for security findings
66 System-Prompt Non-Disclosure Prohibits revealing agent configuration
67 40-Point Skill Security Checklist Supply-chain defense for plugin marketplace
68 Orchestrator-Only (No Direct Data) LLM never sees raw PII; tools handle data
69 Policy-as-Data (Declarative YAML) Compliance rules decoupled from agent code

Category 11: Advanced Workflow & Autonomy (/prompt-context-patterns/catalog/categories/patterns-advanced-workflow)

# Pattern Key Benefit
70 State File as Sole Continuity Bridges isolated agent context windows
71 Zero-Questions Triage Full autonomous analysis in 95 seconds
72 Pull-Based Kanban Orchestration Agents pull tasks by affinity, fork on scope creep
73 Deployment State Machine (Idempotent) Crash-recoverable stateless deployment handlers
74 Autonomous PR Feedback Resolution Agent implements or pushes back on review comments
75 11-Phase Autonomous Dev Flow End-to-end from task to deployment, with guardrails
76 Staggered Burst Query + Rate Limits Cross-server anti-parallelism prevents cascade failures
77 Time-Boxed Investigation Hard budgets with partial result reporting
78 Deployment Override Knowledge Encoding Complete override taxonomy for precise queries
79 Incident Escalation Decision Matrix Quantified thresholds for severity and escalation
80 Scope Estimation Checkpoints Re-estimation at 25/50/75% catches scope creep

Category 12: Advanced I/O & Domain Specialization (/prompt-context-patterns/catalog/categories/patterns-advanced-io-domain)

# Pattern Key Benefit
81 NL to Relational Schema Decomposition Teaches model to derive schemas, not just embed them
82 Chart Decision Tree + Anti-Pattern Guards Data-shape to visualization with cardinality guards
83 Audience-Purpose Content Calibration Output format/detail driven by who reads it and why
84 Socratic Investigation Loop Active research + Socratic questioning for guided discovery
85 Knowledge Base Index + Intent Routing Two-tier retrieval: lightweight index then selective deep read
86 Heuristic Scoring with Signal Detection Machine-detectable signals replace subjective rubric labels
87 Eager Incremental Materialization Create artifacts during conversation, not after
88 Data Shape to Query Pattern Detection Infer visualization from data columns + query text
89 Writability Rules + Substitution Tables Complete style transformation with detection heuristics
90 Cross-Platform Compatibility Matrix Source/target degradation paths with bounded retry
91 Hub-Spoke Router with Overlap Resolution Multi-level specificity cascade for disambiguation

Category 13: Gap Fills — Onboarding, Productivity, Migration & Creative (/prompt-context-patterns/catalog/categories/patterns-gap-fills)

# Pattern Key Benefit
92 DAG Journey with Typed Gates Non-linear onboarding with manual gates and backfill
93 Multi-Source Evidence Harvest + Goal Synthesis 6+ source parallel harvest with audience-stratified output
94 Promise Detection and KB Sync Extracts implicit commitments from conversations
95 Mandatory Self-Learning After Failure Knowledge base grows with every error resolution
96 Risk-Ordered Batch Migration + Build-Verify Batched migration with same-error-signature revert
97 PII-Motivated Delivery Restriction Absolute delivery channel restriction, no override
98 Audience-Register Translation Review Engineer-to-executive review with matched frameworks
99 Automated Accessibility Post-Processing A11y pipeline with 25 assertion eval

Category 14: Open-Source Skill Patterns (/prompt-context-patterns/catalog/categories/patterns-open-source-skills)

# Pattern Key Benefit
100 Progressive Disclosure Architecture 3-tier context loading minimizes token waste
101 Creative Philosophy Scaffolding Forces conceptual depth before visual execution
102 Mandatory Refinement Pass Self-imposed quality gate with emotional anchoring
103 Reconnaissance-Then-Action Observe state before acting, prevents blind interaction
104 Helper Script as Black Box Scripts encapsulate complexity; model uses –help first
105 Anti-Slop Design Guidelines Named AI anti-patterns with specific alternatives
106 Section-by-Section Collaborative Drafting Iterative per-section build with user approval
107 Reader Testing with Sub-Agent Fresh-eyes review by spawning a naive reader
108 Blind A/B Comparison Double-blind skill evaluation eliminates bias
109 Composio 3-Step SaaS Integration Universal Search-Connect-Execute for any SaaS API
110 Algorithm-as-Domain Knowledge Embed actual system internals as prompt knowledge
111 Clarifying Questions Before Action Targeted parameter-gathering questions before work
112 Output Format with Populated Example Complete realistic output, not abstract schema
113 Multi-Workflow Routing by Input Type Same skill routes create/read/edit by input
114 Font/Asset Bundling with Directory Reference Bundled assets by relative path, no downloads
115 QA Sub-Agent with Visual Verification Spawn sub-agent to screenshot and inspect output
116 Never-Hardcode Financial Rules All calculated values must use formulas
117 Multi-Language SDK Routing Detect language, load language-specific docs only
118 Surface Selection by Architecture Route to single-call / workflow / agent by need
119 Eval-Driven Skill Improvement Loop TDD for prompts: write tests → grade → improve
120 Non-Anthropic Provider Guard Early exit when imports indicate wrong ecosystem

Category 15-16: Claude Code Platform Patterns (patterns-claude-code-platform*.md)

# Pattern Key Benefit
121 Typed Memory Taxonomy Four memory types with distinct write triggers and staleness rules
122 Bidirectional Feedback Capture Record corrections AND confirmations to prevent behavioral drift
123 Reversibility × Blast-Radius 2×2 permission matrix with non-sticky approval
124 Tool Preference with Hard Routing Ban shell equivalents when dedicated tools exist
125 Cache-Aware Scheduling Schedule delays around prompt cache TTL dead zones
126 Agent Briefing Protocol “Brief like a colleague” + never delegate understanding
127 Parallel-Safe Step Identification Annotate multi-step workflows with parallelism markers
128 Context Compaction Survival Named fields to preserve across context compression
129 Non-Sticky Authorization Approval scoped to specific request, not action category
130 Investigate Before Destroying Investigate root cause before destructive shortcuts
131 Output Visibility Awareness Communicate in text since tool calls are hidden from user
132 Hook-Driven Automation Treat hook feedback as user input; adapt, don’t retry
133 Compositional Prompt Assembly Small versioned fragments assembled conditionally
134 Tool-Constraint Boundaries Remove tools from agents, don’t just instruct against use
135 Fork vs Fresh Spawning Cache-sharing fork vs independent fresh agent
136 Security Monitor Agent Separate agent evaluating every action against threat model
137 Analysis-First Compaction Think in analysis tags before producing summaries
138 Team Task Board Shared task list with async messaging between agents
139 Background Job Narration Machine-parseable completion signals for classifier
140 Autonomous Trust Calibration “Steward, not initiator” — scale trust by blast radius
141 REPL as Tool Composition JavaScript layer for loops/branches over tool calls
142 Immutable Memory + Dream Never-edit memory files with periodic consolidation agent

Category Files

Category 1: Structural Scaffolding

How a skill prompt is organized — the skeleton that holds everything together.

Patterns: YAML Frontmatter (1), Phased Execution (2), Workflow Mode Branching (3), $ARGUMENTS Variable (4)

Category 2: Execution Control

How to guide agent behavior — personas, constraints, interaction patterns, and checkpoints.

Patterns: Persona/Role Assignment (5), Negative Constraints (6), Interactive Flow Control (7), Confirmation Gates (8), Progress Feedback (9)

Category 3: Safety and Trust

Guardrails that prevent the agent from causing harm — injection defense, data redaction, boundaries, and scope.

Patterns: Prompt Injection Defense (10), Sensitive Data Redaction (11), Read-Only Boundary (12), Activation Scope (13)

Category 4: Input/Output Contracts

How data flows in and out — output templates, error handling, configuration, and platform adaptation.

Patterns: Structured Output Templates (14), Error Handling (15), Configuration Persistence (16), Cross-Platform (17)

Category 5: Agent Orchestration

How multiple agents coordinate — topologies, skill composition, routing, tool mapping, and consensus.

Patterns: Multi-Agent Orchestration (18), Skill Composition (19), Intent Classification (20), Tool Routing Tables (21), Dedup/Consensus (22)

Category 6: Knowledge and Context

How information is managed — reference files, domain knowledge, examples, and evidence requirements.

Patterns: Reference File Injection (23), Domain Knowledge Embedding (24), Few-Shot Examples (25), Evidence Chain (26)

Category 7: Quality and Feedback

How to ensure output quality — scoring rubrics, self-critique, feedback loops, and version management.

Patterns: Scoring Rubrics (27), Self-Critique (28), Feedback Solicitation (29), Version Check (30)

Category 8: Advanced Agent Orchestration

Production-grade multi-agent architectures — state machines, consensus grids, adversarial planning, cost-optimized routing, memory isolation.

Patterns: Adversarial Persona (31), Hub-and-Spoke State Machine (32), Cross-Model Consensus (33), Adversarial Planning (34), Model Routing (35), Handoff Context (36), Context Efficiency (37), Complexity Tiers (38), Message Board (39), Cloud Delegation (40), Loop Prevention (41), Memory Isolation (42), Sparse Worktree (43), Severity Promotion (44)

Category 9: Advanced Quality & Evaluation

Deep review architectures — directive-based review, evidence-first analysis, adversarial triads, LLM-as-judge, test scaffolding.

Patterns: Directive Review (45), Repo Discovery (46), Evidence-First (47), Rule Catalog (48), Impact Formulas (49), Adversarial Triad (50), Schema Gate (51), LLM-as-Judge (52), Retro Rubric (53), Test Scaffolding (54), Triage Skip (55)

Category 10: Advanced Safety & Compliance

Production security — MCP data guardrails, XPIA defense, prosecutor-defender-judge, data classification, policy-as-data.

Patterns: MCP-Data Guardrail (56), Injection-as-Finding (57), Prosecutor-Defender-Judge (58), Rescue Tags (59), Tiered Permissions (60), Data Classification (61), XPIA Defense (62), Litmus Tests (63), Posture Delta (64), Confidence Gates (65), Non-Disclosure (66), Skill Security Checklist (67), Orchestrator-Only (68), Policy-as-Data (69)

Category 11: Advanced Workflow & Autonomy

Execution control at scale — state files, zero-questions triage, Kanban orchestration, autonomous development, incident response.

Patterns: State File Continuity (70), Zero-Questions (71), Kanban Pull (72), Deployment State Machine (73), PR Feedback Resolution (74), Autonomous Dev Flow (75), Burst Query (76), Time-Boxed Investigation (77), Override Knowledge (78), Escalation Matrix (79), Scope Checkpoints (80)

Category 12: Advanced I/O & Domain Specialization

Input/output transformation, domain reasoning scaffolds, visualization instruction, interactive reasoning, style transformation, and audience adaptation.

Patterns: Schema Decomposition (81), Chart Decision Tree (82), Audience Calibration (83), Socratic Loop (84), KB Index Routing (85), Heuristic Scoring (86), Eager Materialization (87), Data Shape Detection (88), Writability Rules (89), Compatibility Matrix (90), Overlap Resolution Router (91)

Category 13: Gap Fills — Onboarding, Productivity, Migration & Creative

Patterns from under-explored areas: DAG-based onboarding journeys, personal productivity, self-learning migration, and creative output accessibility.

Patterns: DAG Journey (92), Evidence Harvest (93), Promise Detection (94), Self-Learning (95), Batch Migration (96), Delivery Restriction (97), Register Translation Review (98), A11y Post-Processing (99)

Category 14: Open-Source Skill Patterns

Patterns extracted from Anthropic’s official Agent Skills repo (17 skills) and ComposioHQ’s community-curated awesome-claude-skills repo (32 unique + 832 Composio template skills). Covers progressive disclosure, creative scaffolding, visual QA, eval-driven improvement, SaaS integration templates, and multi-language SDK routing.

Patterns: Progressive Disclosure (100), Creative Philosophy (101), Refinement Pass (102), Reconnaissance-Then-Action (103), Helper Script Black Box (104), Anti-Slop (105), Collaborative Drafting (106), Reader Testing (107), Blind A/B (108), SaaS Integration (109), Algorithm-as-Knowledge (110), Clarifying Questions (111), Populated Examples (112), Input-Type Routing (113), Asset Bundling (114), Visual QA (115), Never-Hardcode (116), Language Routing (117), Architecture Selection (118), Eval-Driven Loop (119), Provider Guard (120)

Architecture companion: skill-architecture-patterns.md — Skill packaging, marketplace grouping, reference file organization, sub-agent design, script integration, and cross-repo comparison.

Category 15: Claude Code Platform Patterns

Patterns extracted from the Claude Code system prompt — platform-level concerns: memory taxonomy, permission models, scheduling, tool routing, agent dispatch, and context survival.

Patterns: Typed Memory Taxonomy (121), Bidirectional Feedback Capture (122), Reversibility × Blast-Radius (123), Tool Preference with Hard Routing (124), Cache-Aware Scheduling (125), Agent Briefing Protocol (126), Parallel-Safe Step Identification (127), Context Compaction Survival (128), Non-Sticky Authorization (129), Investigate Before Destroying (130), Output Visibility Awareness (131), Hook-Driven Automation (132)

Category 16: Claude Code Platform Patterns — Extended

Deeper architectural patterns from Claude Code’s composable prompt system, agent spawning, security classification, team coordination, and memory consolidation.

Patterns: Compositional Prompt Assembly (133), Tool-Constraint Agent Boundaries (134), Fork vs Fresh Spawning (135), Security Monitor Agent (136), Analysis-First Compaction (137), Team Task Board Coordination (138), Background Job Narration (139), Autonomous Trust Calibration (140), REPL as Tool Composition Layer (141), Immutable Memory with Dream Consolidation (142)


Mapping to Foundational Techniques

How the 30 patterns relate to the 9 foundational techniques in prompt-engineering-for-skills.md:

Foundational Technique Patterns That Apply It
Decision Trees Workflow Mode Branching (3), Intent Classification (20), Error Handling (15), Input-Type Routing (113), Language Routing (117), Architecture Selection (118)
Grounding / Anchoring Domain Knowledge Embedding (24), Few-Shot Examples (25), Structured Output Templates (14), Populated Examples (112), Algorithm-as-Knowledge (110), Reconnaissance-Then-Action (103)
Cognitive Offloading Phased Execution (2), Evidence Chain (26), Scoring Rubrics (27), Helper Script Black Box (104), Collaborative Drafting (106), Eval-Driven Loop (119)
Attention Locality Negative Constraints (6), Reference File Injection (23), Tool Routing Tables (21), Progressive Disclosure (100)
Token-Action Binding Confirmation Gates (8), Interactive Flow Control (7), Progress Feedback (9), Clarifying Questions (111)
Schema Priming YAML Frontmatter (1), Structured Output Templates (14), Scoring Rubrics (27), Populated Examples (112)
Negative Space Negative Constraints (6), Activation Scope (13), Read-Only Boundary (12), Anti-Slop (105), Provider Guard (120), Never-Hardcode (116)
XML Semantic Boundaries Structured Output Templates (14), Few-Shot Examples (25), Domain Knowledge (24), Creative Philosophy (101)
Few-Shot with Reasoning Few-Shot Examples (25), Evidence Chain (26), Self-Critique (28), Blind A/B (108), Refinement Pass (102)

Source Data

Extracted from analysis of 500+ production AI agent plugins across DevOps, security, migration, and incident response domains, plus Anthropic’s official Agent Skills repo (17 skills) and ComposioHQ’s community-curated awesome-claude-skills repo (32 unique + 832 Composio template skills).