// Operational prompt engineering patterns, templates, and validation flows for Claude Code.
| name | ai-prompt-engineering |
| description | Operational prompt engineering patterns, templates, and validation flows for Claude Code. |
Modern Best Practices: Production-grade patterns, templates, and validation workflows for reliable prompts.
This skill provides operational guidance for building production-ready prompts across standard tasks, RAG workflows, agent orchestration, structured outputs, hidden reasoning, and multi-step planning.
All content is operational, not theoretical. Focus on patterns, checklists, and copy-paste templates.
Claude 4+ Updates: This skill includes Claude 4.x and 4.5-specific optimizations:
Claude 4.5 Communication: Claude 4.5 is more concise by default. Request explicit summaries when needed for visibility into reasoning or work completed.
Activate this skill when the user asks to:
Do NOT use this skill for:
See Also: For specialized AI/LLM implementations, see "Related Skills" section at the end of this document.
| Task | Pattern to Use | Key Components | When to Use |
|---|---|---|---|
| Machine-parseable output | Structured Output | JSON schema, "JSON-only" directive, no prose | API integrations, data extraction |
| Field extraction | Deterministic Extractor | Exact schema, missingโnull, no transformations | Form data, invoice parsing |
| Use retrieved context | RAG Workflow | Context relevance check, chunk citations, explicit missing info | Knowledge bases, documentation search |
| Internal reasoning | Hidden Chain-of-Thought | Internal reasoning, final answer only | Classification, complex decisions |
| Tool-using agent | Tool/Agent Planner | Plan-then-act, one tool per turn | Multi-step workflows, API calls |
| Text transformation | Rewrite + Constrain | Style rules, meaning preservation, format spec | Content adaptation, summarization |
| Classification | Decision Tree | Ordered branches, mutually exclusive, JSON result | Routing, categorization, triage |
User needs: [Prompt Type]
โโ Output must be machine-readable?
โ โโ Extract specific fields only? โ **Deterministic Extractor Pattern**
โ โโ Generate structured data? โ **Structured Output Pattern (JSON)**
โ
โโ Use external knowledge?
โ โโ Retrieved context must be cited? โ **RAG Workflow Pattern**
โ
โโ Requires reasoning but hide process?
โ โโ Classification or decision task? โ **Hidden Chain-of-Thought Pattern**
โ
โโ Needs to call external tools/APIs?
โ โโ Multi-step workflow? โ **Tool/Agent Planner Pattern**
โ
โโ Transform existing text?
โ โโ Style/format constraints? โ **Rewrite + Constrain Pattern**
โ
โโ Classify or route to categories?
โโ Mutually exclusive rules? โ **Decision Tree Pattern**
Best Practices (Core) - Foundation rules for production-grade prompts
Production Guidelines - Deployment and operational guidance
Quality Checklists - Validation checklists before deployment
Domain-Specific Patterns - Claude 4+ optimized patterns for specialized domains
RAG Patterns - Retrieval-augmented generation workflows
Agent and Tool Patterns - Tool use and agent orchestration
Extraction Patterns - Deterministic field extraction
Reasoning Patterns (Hidden CoT) - Internal reasoning without visible output
Additional Patterns - Extended prompt engineering techniques
Templates are copy-paste ready and organized by complexity:
External references are listed in data/sources.json:
This skill provides foundational prompt engineering patterns. For specialized implementations:
AI/LLM Skills:
Software Development Skills:
For Claude Code: