prompt-engineer
This skill should be used when the user asks to "create a prompt", "optimize a prompt", "improve this prompt", "engineer a prompt", "prompt engineering best practices", "make this prompt better", "recommend a model", "which model should I use", "best model for", "GPT vs Claude", "Opus vs Sonnet", "Haiku vs Sonnet", "analyze prompt quality", "fix my prompt", "prompt for Claude", "prompt for GPT", or needs help with prompt engineering techniques, model selection, or prompt optimization for any LLM (Claude Opus/Sonnet/Haiku 4.5, GPT 5.1/Codex, Gemini Pro 3.0).
What this skill does
# Prompt Engineering Skill ## Purpose This skill enables comprehensive prompt engineering across multiple LLM models. Engineer, optimize, and refine prompts using established best practices. Create new prompts from scratch or improve existing ones for maximum effectiveness. Recommend optimal models based on specific requirements through interactive analysis. **Supported Models:** - Claude Opus 4.5, Sonnet 4.5, Haiku 4.5 - GPT 5.1, GPT 5.1 Codex - Gemini Pro 3.0 ## When to Use This Skill Invoke this skill when the user requests: - Creating a new prompt for any supported LLM model - Optimizing or improving an existing prompt - Recommending which model to use for a specific task - Comparing models for specific use cases - Analyzing prompt weaknesses or issues - Applying model-specific optimization techniques - Migrating prompts between different models - Troubleshooting poor model performance ## Core Prompt Engineering Techniques Six universal techniques apply across all models: | Technique | When to Use | Impact | |-----------|-------------|--------| | **XML Tags** | 3+ components, structured output | High - clear separation | | **Role Prompting** | Domain expertise needed | Medium - contextual knowledge | | **Clear & Direct** | Always (baseline) | Critical - foundation | | **Multishot Prompting** | Format/style consistency | High - 40-60% improvement | | **Chain of Thought** | Complex reasoning | High - accuracy boost | | **Prompt Chaining** | Multi-stage workflows | High - manages complexity | **Technique Selection Matrix:** | Task Type | Recommended Techniques | |-----------|----------------------| | Simple question/task | Clear & Direct | | Classification/extraction | Clear & Direct + Examples | | Analysis/reasoning | Clear & Direct + Chain of Thought | | Domain-specific task | Clear & Direct + Role Prompting | | Complex structured output | Clear & Direct + XML Tags + Examples | | Multi-step process | Clear & Direct + Prompt Chaining | ## Supported Models Overview ### Claude Family | Model | Best For | Speed | Quality | Cost | |-------|----------|-------|---------|------| | **Opus 4.5** | Research, creative, complex analysis | Slow | Highest | $$$$$ | | **Sonnet 4.5** | Agentic coding, balanced production | Fast | High | $$ | | **Haiku 4.5** | Classification, high-volume, latency-critical | Very Fast | Good | $ | ### OpenAI Family | Model | Best For | Speed | Quality | Cost | |-------|----------|-------|---------|------| | **GPT 5.1** | General-purpose, function calling | Fast | High | $$ | | **GPT 5.1 Codex** | Code generation, review, debugging | Fast | High (code) | $$ | ### Google Family | Model | Best For | Speed | Quality | Cost | |-------|----------|-------|---------|------| | **Gemini Pro 3.0** | Multimodal, context caching, Google integration | Fast | High | $$ | ## Prompt Engineering Workflow ### Step 1: Understand Requirements Gather essential information: - Task purpose and success criteria - Target model (if specified) or requirements for recommendation - Input and output format requirements - Constraints (length, style, format) - Current issues (for optimization requests) ### Step 2: Select or Recommend Model **If model specified:** Load the corresponding model guide from `reference/models/`. **If model not specified:** Gather requirements via interactive dialog: 1. Task type (code, analysis, creative, data, conversation) 2. Priority (speed, quality, cost, balance) 3. Context size requirements 4. Special features needed (vision, function calling, JSON mode) Then consult `reference/comparisons/model-comparison-matrix.md` and `reference/comparisons/use-case-recommendations.md`. ### Step 3: Select Techniques Always start with Clear & Direct (foundation technique). Add based on needs: - **XML Tags:** Complex structure, 3+ components - **Role Prompting:** Domain expertise required - **Examples:** Format consistency needed - **Chain of Thought:** Reasoning tasks - **Prompt Chaining:** Multi-stage workflows ### Step 4: Load References Load technique documentation from `reference/techniques/`: - Always load: `03-be-clear-and-direct.md` - Add as needed: Relevant technique files Load model guide from `reference/models/`: - Target model optimization guide ### Step 5: Draft or Optimize Prompt **For new prompts:** 1. Apply selected techniques systematically 2. Structure with XML tags if appropriate 3. Add examples if format matters 4. Include model-specific optimizations **For optimization:** 1. Analyze current prompt against checklist 2. Identify missing or misapplied techniques 3. Apply fixes systematically 4. Add model-specific optimizations ### Step 6: Validate Use `reference/optimization/optimization-checklist.md` to verify: - Clarity and completeness - Proper technique application - Model-specific requirements met - No common pitfalls ### Step 7: Deliver Provide: 1. Complete prompt (ready to use) 2. Technique explanation (what was applied and why) 3. Usage instructions (how to use, variables to replace) 4. Testing recommendations (how to verify it works) ## Reference Documentation ### Technique References Detailed documentation for each technique: - `reference/techniques/01-xml-tags.md` - Structuring prompts - `reference/techniques/02-role-prompting.md` - System prompts and roles - `reference/techniques/03-be-clear-and-direct.md` - Foundation technique - `reference/techniques/04-multishot-prompting.md` - Using examples - `reference/techniques/05-chain-of-thought.md` - Step-by-step reasoning - `reference/techniques/06-prompt-chaining.md` - Multi-stage workflows ### Model Guides Model-specific optimization guides: - `reference/models/claude-opus-4.5.md` - Opus capabilities and optimizations - `reference/models/claude-sonnet-4.5.md` - Sonnet capabilities and optimizations - `reference/models/claude-haiku-4.5.md` - Haiku capabilities and optimizations - `reference/models/gpt-5.1.md` - GPT 5.1 capabilities and optimizations - `reference/models/gpt-5.1-codex.md` - Codex capabilities and optimizations - `reference/models/gemini-pro-3.0.md` - Gemini capabilities and optimizations ### Comparison Resources Cross-model analysis: - `reference/comparisons/model-comparison-matrix.md` - Capability comparison - `reference/comparisons/use-case-recommendations.md` - Task-based recommendations ### Optimization Resources Quality assurance and troubleshooting: - `reference/optimization/optimization-checklist.md` - Validation checklist - `reference/optimization/troubleshooting-guide.md` - Common issues and fixes - `reference/optimization/model-migration.md` - Adapting prompts between models ### Example Library Working examples by category: - `examples/classification-prompts.md` - Classification tasks - `examples/code-generation-prompts.md` - Code generation tasks - `examples/analysis-prompts.md` - Analysis and research tasks - `examples/creative-prompts.md` - Creative writing tasks - `examples/complex-workflow-prompts.md` - Multi-step workflows ## Key Principles ### 1. Clarity is Foundational Every prompt must have clear context, explicit instructions, defined success criteria, and specified output format. Without clarity, other techniques cannot compensate. ### 2. Match Technique to Task Simple tasks need simple prompts. Complex tasks benefit from multiple techniques. Match complexity to actual need. ### 3. Model-Specific Optimization Matters Each model has unique characteristics. Apply model-specific optimizations after general techniques for best results. ### 4. Test and Iterate First drafts rarely perfect. Test with real inputs, identify failure modes, refine systematically. ### 5. Progressive Disclosure Load detailed references only when needed. Start with core workflow, dive into specifics as required. ## Quick Decision Guide **Which model for coding?** - Agentic/complex: Claude Sonnet 4.5 - Code generation focused: GPT 5.1 Codex - Simple transforms: Claude Haiku 4.5 **Which model for analysis
Related 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.