Install
openclaw skills install prompt-engineering-2Comprehensive prompt engineering framework for designing, optimizing, and iterating LLM prompts. This skill should be used when users request prompt creation, optimization, or improvement for any LLM task, or when users need help translating vague requirements into effective prompts through collaborative dialogue and iterative refinement.
openclaw skills install prompt-engineering-2This skill transforms vague user requests into precise, effective prompts through collaborative dialogue, systematic analysis, and iterative refinement. It combines proven prompt engineering techniques with a structured development process to create prompts that reliably achieve user objectives.
When a user requests prompt assistance, follow this decision flow:
User Request
├─ "Create a prompt" / "Make a prompt" / Vague request
│ └─ → Start with EXPLORATION PHASE
├─ "Optimize this prompt" / Has existing prompt
│ └─ → Start with SIMPLE OPTIMIZATION
└─ "Fix this issue with my prompt" / Specific problem
└─ → Start with ANALYSIS PHASE (focused on problem)
Before creating any prompt, deeply understand the user's actual needs through strategic questioning. Start broad, then narrow down systematically.
Initial Context Gathering:
Deepening Understanding:
Technical Requirements:
Continue exploration until the core requirements are crystal clear. Never assume—always verify.
Analyze the task to determine the optimal prompting approach.
Task Classification:
Classify the task along key dimensions:
Strategy Selection:
Based on classification, choose primary techniques:
Trade-off Analysis:
Present multiple approaches with clear trade-offs:
Always explain WHY each approach fits the specific context.
Create the prompt through progressive refinement, starting simple and adding complexity as needed.
Version 1 - Minimal Viable Prompt:
Version 2 - Enhanced Clarity:
Version 3+ - Optimization:
Document each version's changes and rationale. Store prompts in markdown files with:
Rigorously evaluate the prompt against quality criteria.
Essential Checks:
Testing Approach:
Be ruthlessly honest about weaknesses. If something isn't working, acknowledge it and iterate.
When optimizing an existing prompt, focus on minimal, targeted improvements:
Common optimization targets:
When creating new prompts, structure them as instructions for an eager but inexperienced assistant who needs clear guidance.
Essential Components:
Role/Context (if beneficial):
Clear Objective:
Specific Instructions:
Output Format (when relevant):
Examples (when clarifying):
Role Setting: Establish perspective when expertise or tone matters
Progressive Disclosure: Start general, add detail as needed
Explicit Constraints: Define boundaries clearly
Chain-of-Thought: Request reasoning before conclusions
Few-Shot Learning: Provide input-output examples
Self-Consistency: Have model verify its own outputs
For detailed technique explanations and examples, consult:
references/techniques.md - Comprehensive technique catalogreferences/patterns.md - Common prompt patternsreferences/antipatterns.md - What to avoidThis skill includes detailed reference documentation:
techniques.md - Complete catalog of prompting techniques with examplespatterns.md - Reusable prompt patterns for common scenariosantipatterns.md - Common mistakes and how to avoid themevaluation.md - Comprehensive quality evaluation frameworkexamples.md - Library of before/after prompt improvementsConsult these references for in-depth technical details and extensive examples not included in this overview.