
Prompt Optimizer
- 24 installs
- 82 repo stars
- Updated August 2, 2026
- aaaaqwq/claude-code-skills
prompt-optimizer is a Claude Code skill that evaluates prompt quality and rewrites prompts using 58 prompting techniques.
About
This skill evaluates prompt quality and rewrites prompts using 58 prompting techniques such as chain-of-thought, few-shot, and role-play. A developer uses it to improve a prompt's clarity, specificity, and structure or to generate optimized variations. It scores prompts across defined quality dimensions and can run bundled Python scripts for repeatable evaluation and optimization.
- Evaluates prompt quality across clarity, specificity, structure, completeness
- Applies 58 prompting techniques including CoT and few-shot
- Generates optimized prompt versions, with optional scripts for deterministic runs
Prompt Optimizer by the numbers
- 24 all-time installs (skills.sh)
- Ranked #9,858 of 16,556 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
prompt-optimizer capabilities & compatibility
- Capabilities
- prompt optimization · prompt evaluation · prompt generation
- Use cases
- token optimization
What prompt-optimizer says it does
Evaluate, optimize, and enhance prompts using 58 proven prompting techniques.
Covers quality assessment, targeted improvements, and automatic optimization across techniques like CoT, few-shot learning, role-play, and 50+ more.
npx skills add https://github.com/aaaaqwq/claude-code-skills --skill prompt-optimizerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 24 |
|---|---|
| repo stars | ★ 82 |
| Last updated | August 2, 2026 |
| Repository | aaaaqwq/claude-code-skills ↗ |
What it does
Evaluate and rewrite a prompt using proven prompting techniques to improve clarity and results.
Who is it for?
Evaluating and optimizing LLM prompts
When should I use this skill?
You ask to improve, optimize, or analyze a prompt or generate prompt variations
What you get
A quality assessment plus optimized prompt versions using techniques like CoT and few-shot.
- prompt quality assessment
- optimized prompt versions
By the numbers
- 58 prompting techniques
- 6 quality dimensions
Files
Prompt Optimizer
Overview
Evaluate prompt quality, provide targeted improvement suggestions, and generate optimized versions using 58 proven prompting techniques. This skill systematically analyzes prompts across multiple quality dimensions and applies evidence-based optimization patterns.
Quick Start
For most optimization tasks, follow this workflow:
1. Analyze the current prompt - Read and understand what the user wants to achieve 2. Evaluate quality - Assess across clarity, specificity, structure, completeness 3. Load relevant techniques - Read references/prompt-techniques.md for applicable methods 4. Generate suggestions - Use evaluation results and techniques to propose improvements 5. Create optimized version - Apply chosen techniques to produce an enhanced prompt
Evaluation Workflow
When a user asks to optimize or evaluate a prompt:
Step 1: Load Quality Framework
Read references/quality-framework.md to understand evaluation dimensions:
- Clarity - Is the prompt unambiguous and easy to understand?
- Specificity - Are requirements and constraints clearly defined?
- Structure - Does it follow logical organization?
- Completeness - Does it include all necessary context and instructions?
- Tone - Is the voice appropriate for the task?
- Constraints - Are boundaries and limitations clear?
Step 2: Perform Quality Assessment
Evaluate the prompt against each dimension:
For each quality dimension:
1. Identify strengths (what works well)
2. Identify weaknesses (what's missing or unclear)
3. Rate quality (Poor/Fair/Good/Excellent)
4. Note specific improvement opportunitiesStep 3: Identify Applicable Techniques
Load references/prompt-techniques.md and identify techniques that address the identified weaknesses.
Example mapping:
- Weak: "Be creative" → Apply: Role-play or Creative Persona
- Weak: "Write an essay" → Apply: Chain of Thought or Step-by-Step
- Weak: "Summarize this" → Apply: Few-shot Learning with examples
Step 4: Generate Optimization Plan
Create a structured optimization plan:
1. Priority improvements - High-impact changes that address multiple weaknesses 2. Optional enhancements - Nice-to-have techniques that boost performance 3. Technique combinations - Suggest technique pairings for specific use cases
Step 5: Generate Optimized Prompt
Apply the selected techniques to create an improved version:
- Preserve original intent and requirements
- Add structure and clarity where missing
- Embed examples, constraints, or guidance as needed
- Maintain appropriate tone and voice
Optimization Patterns
For common optimization scenarios, use these proven patterns:
Ambiguous Requests → Structured Breakdown
When prompt lacks clarity: 1. Add explicit task definition 2. Break into sub-tasks with numbered steps 3. Include output format specification 4. Add completion criteria
Generic Tasks → Technique Enhancement
When prompt is too broad: 1. Apply relevant technique from references/prompt-techniques.md 2. Add examples (few-shot) or reasoning steps (CoT) 3. Include role or persona guidance 4. Specify evaluation criteria
Missing Context → Scenario Framing
When prompt lacks background: 1. Add user intent/goal statement 2. Include target audience specification 3. Define success metrics 4. Add relevant constraints or boundaries
Weak Instructions → Actionable Steps
When prompt provides vague guidance: 1. Convert abstract concepts to concrete actions 2. Add step-by-step instructions 3. Include quality checkpoints 4. Specify expected output format
Script Usage
Quality Evaluation
For consistent, repeatable evaluation:
python3 scripts/evaluate.py "Your prompt here"This provides:
- Dimension scores (clarity, specificity, structure, completeness)
- Overall quality rating
- Detailed weakness analysis
- Suggested improvement areas
Prompt Optimization
For automatic optimization generation:
python3 scripts/optimize.py "Your prompt here" --techniques "few-shot,coT"This generates:
- Multiple optimized prompt versions
- Explanation of applied techniques
- Comparison with original prompt
Note: Scripts should be used for automation or when you need deterministic results. For complex optimization tasks, use the manual workflow for more nuanced analysis.
Reference Files
references/prompt-techniques.md
Complete catalog of 58 prompting techniques including:
- Reasoning techniques (CoT, Tree of Thoughts, Decomposition)
- Context techniques (Few-shot, Self-Consistency, Reflection)
- Creative techniques (Role-play, Scenario, Persona)
- Structural techniques (Template, Framework, Checklists)
- And 50+ more with usage examples
Load this when you need to identify applicable techniques for a specific optimization task.
references/quality-framework.md
Detailed evaluation framework with:
- Dimension-specific criteria and rubrics
- Scoring guidelines
- Common anti-patterns to avoid
- Quality benchmarks for different prompt types
Load this before any evaluation task to ensure consistent assessment.
references/optimization-patterns.md
Collection of proven optimization patterns including:
- Pattern → Technique mappings
- Before/after examples
- Technique combination guidelines
- Use-case specific templates
Load this when optimizing common prompt types (essays, code generation, analysis, etc.).
Best Practices
1. Preserve user intent - Never change what the user wants, only how they ask for it 2. Add incrementally - Apply one technique at a time and evaluate impact 3. Test iteratively - After optimization, test the prompt and refine further if needed 4. Document choices - Explain which techniques you applied and why 5. Provide options - Offer multiple optimization versions when appropriate
When This Skill Should Trigger
This skill should be activated when:
- User explicitly asks to "optimize," "improve," or "evaluate" a prompt
- User asks if a prompt is "good" or "clear"
- User wants to "fix" or "enhance" a prompt that isn't working well
- User requests "better versions" of a prompt
- User asks about prompt engineering techniques or best practices
- User wants to analyze why a prompt is producing poor results
{
"ownerId": "kn7bznwraec9j4xjsp49391g39805235",
"slug": "prompt-optimizer",
"version": "1.0.0",
"publishedAt": 1769912196082
}{
"version": 1,
"registry": "https://clawhub.ai",
"slug": "prompt-optimizer",
"installedVersion": "1.0.0",
"installedAt": 1770443052746
}
Prompt Techniques Catalog
Complete catalog of 58 proven prompting techniques organized by category.
Table of Contents
- Reasoning Techniques
- Context Techniques
- Creative Techniques
- Structural Techniques
- Control Techniques
- Meta Techniques
---
Reasoning Techniques
1. Chain of Thought (CoT)
Purpose: Encourage step-by-step reasoning before final answer When to use: Math problems, logic puzzles, complex analysis Template:
[Task]
Let's think step by step:
1. [First step reasoning]
2. [Second step reasoning]
3. [Continue reasoning...]
Final answer: [Conclusion]Example: "Solve: 2x + 5 = 13. Let's think step by step: 1. Subtract 5 from both sides: 2x = 8. 2. Divide by 2: x = 4."
---
2. Tree of Thoughts
Purpose: Explore multiple reasoning branches before conclusion When to use: Complex decisions, strategic planning, creative problem solving Template:
[Task]
Explore multiple possible approaches:
Approach 1: [Description]
- Reasoning: [Why this approach]
- Outcome: [Expected result]
Approach 2: [Description]
- Reasoning: [Why this approach]
- Outcome: [Expected result]
Compare approaches and select the best one.---
3. Least-to-Most Prompting
Purpose: Break complex tasks into sub-problems solved sequentially When to use: Multi-step reasoning, complex analysis Template:
[Complex Task]
First, identify the sub-problems that need to be solved:
1. [Sub-problem 1]
2. [Sub-problem 2]
3. [Sub-problem 3]
Now solve them in order:
1. [Solve sub-problem 1]
2. [Solve sub-problem 2 using results from 1]
3. [Solve sub-problem 3 using results from 1-2]
Final solution: [Combine results]---
4. Self-Consistency
Purpose: Generate multiple reasoning paths and select most consistent answer When to use: Ambiguous problems, tasks requiring high confidence Template:
[Task]
Generate 3 different approaches to solve this:
Approach 1:
[Reasoning 1]
Answer: [Answer 1]
Approach 2:
[Reasoning 2]
Answer: [Answer 2]
Approach 3:
[Reasoning 3]
Answer: [Answer 3]
Most common answer: [Select consistent answer]---
5. Reasoning via Planning
Purpose: Explicitly plan execution before acting When to use: Multi-stage tasks, projects, workflows Template:
[Task]
Planning Phase:
1. What are the key milestones?
2. What resources are needed?
3. What are potential obstacles?
Execution Plan:
Step 1: [Description]
Step 2: [Description]
Step 3: [Description]
Now execute the plan:
[Detailed execution]---
6. Decomposition
Purpose: Break down complex problems into manageable components When to use: Large-scale analysis, system design Template:
[Complex Problem]
Decompose into components:
Component 1: [Name]
- Definition: [What it includes]
- Considerations: [Key factors]
Component 2: [Name]
- Definition: [What it includes]
- Considerations: [Key factors]
Now analyze each component:
[Analysis for each]---
7. Analogical Reasoning
Purpose: Use analogies to explain complex concepts When to use: Technical explanations, teaching, making abstract ideas concrete Template:
[Complex Concept]
Explain using an analogy:
Analogy: [Similar familiar situation]
- Similarities: [What's comparable]
- Differences: [What's different]
- Key insight: [What the analogy reveals]
Explanation: [Use analogy to explain]---
Context Techniques
8. Few-Shot Learning
Purpose: Provide examples to guide output format and style When to use: Pattern recognition, format-specific tasks, style transfer Template:
[Task description]
Example 1:
Input: [Example input]
Output: [Example output]
Example 2:
Input: [Example input]
Output: [Example output]
Example 3:
Input: [Example input]
Output: [Example output]
Now, new input: [Target input]
Output:---
9. Zero-Shot Chain of Thought
Purpose: Combine CoT reasoning without examples When to use: Quick reasoning tasks when examples aren't available Template:
[Task]
Let's think step by step:
[Reasoning steps]
Therefore, the answer is:---
10. Context Reframing
Purpose: Provide broader context to frame the task properly When to use: Misaligned responses, when model misses the point Template:
Context:
[Background information]
[Domain knowledge]
[Relevant constraints]
Task:
[Main request]---
11. Knowledge Injection
Purpose: Provide specific domain knowledge not in training data When to use: Specialized domains, recent events, proprietary information Template:
Domain Knowledge:
[Specific facts/data]
[Technical details]
[Relevant information]
Task: [Apply this knowledge]---
12. Scenario-Based
Purpose: Place task in realistic scenario for better context When to use: Practical applications, training, real-world simulation Template:
Scenario:
[Describe realistic situation]
[Set the scene]
[Establish context]
In this scenario, [task]:
[Specific request]---
13. Reflection
Purpose: Ask model to reflect on its own output before finalizing When to use: Quality-critical tasks, complex reasoning Template:
[Task]
Initial response:
[Generate answer]
Now reflect:
- What assumptions did I make?
- Are there any weaknesses in this response?
- What could be improved?
Final refined response:
[Improved answer]---
14. Self-Correction
Purpose: Explicitly ask model to identify and fix errors When to use: Tasks prone to mistakes, debugging, quality assurance Template:
[Task]
First attempt:
[Generate answer]
Critique:
[Identify any errors or issues]
Corrected attempt:
[Fix identified issues]---
Creative Techniques
15. Role-Play
Purpose: Assign a specific persona or role to the model When to use: Specialized expertise, creative writing, specific perspectives Template:
You are an expert [role] with [qualifications].
Role characteristics:
- Expertise in [specific areas]
- Typical tone: [professional, casual, academic, etc.]
- Key considerations: [what this role cares about]
Task: [Request in character]---
16. Creative Persona
Purpose: Embody a creative identity for artistic or innovative output When to use: Creative writing, art direction, innovative thinking Template:
You are a [creative identity - e.g., visionary artist, innovative designer].
Style characteristics:
- Aesthetic: [description]
- Approach: [how you create]
- Inspirations: [who influences you]
Create: [Creative task]---
17. Brainstorming Mode
Purpose: Generate quantity over quality, defer judgment When to use: Idea generation, exploring possibilities Template:
Task: [Brainstorming topic]
Generate 20+ ideas. Focus on quantity. Don't judge or filter.
Embrace wild and unconventional ideas.
Ideas:
[List ideas rapidly]---
18. SCAMPER
Purpose: Use systematic creativity technique (Substitute, Combine, Adapt, Modify, Put to other uses, Eliminate, Reverse) When to use: Innovation, improving existing ideas, creative problem solving Template:
Idea to improve: [Current idea]
Apply SCAMPER:
Substitute: What can be replaced?
[Substitutions]
Combine: What can be merged?
[Combinations]
Adapt: What can be borrowed from elsewhere?
[Adaptations]
Modify: What can be changed?
[Modifications]
Put to other uses: How else can this be used?
[Alternative uses]
Eliminate: What's unnecessary?
[Eliminations]
Reverse: What can be reversed?
[Reversals]
Best new ideas:
[Select top ideas from SCAMPER]---
19. Creative Constraints
Purpose: Use limitations to spur creativity When to use: Artistic tasks, design, innovative problem solving Template:
Create: [Creative task]
Constraints:
1. [Constraint 1 - e.g., exactly 100 words]
2. [Constraint 2 - e.g., cannot use the letter 'e']
3. [Constraint 3 - e.g., must use a specific metaphor]
Work:
[Creative output within constraints]---
20. Storytelling Format
Purpose: Present information as a narrative When to use: Making content engaging, teaching, presentations Template:
Topic: [Information to convey]
Tell it as a story with:
- A compelling opening
- A clear conflict or challenge
- A journey or process
- A satisfying resolution
Story:
[Narrative format]---
21. Metaphorical Thinking
Purpose: Use metaphors to explain or create When to use: Explaining abstract concepts, creative writing Template:
Concept: [To explain]
Use a powerful metaphor to explain this.
Metaphor: [The metaphor]
Explanation: [How the metaphor maps to the concept]---
Structural Techniques
22. Template-Based
Purpose: Use structured template for consistent output When to use: Repeated tasks, standard formats, documentation Template:
[Task]
Use this template:
## [Section 1]
[Content]
## [Section 2]
[Content]
## [Section 3]
[Content]
Fill in the template:
[Output following structure]---
23. Framework Application
Purpose: Apply established frameworks (SWOT, STAR, etc.) When to use: Business analysis, strategic planning, structured thinking Template:
[Analysis task]
Apply the [Framework Name] framework:
[Framework component 1]: [Content]
[Framework component 2]: [Content]
[Framework component 3]: [Content]
[Framework component 4]: [Content]
Analysis:
[Interpretation of framework output]---
24. Checklist-Driven
Purpose: Ensure all requirements are met with a checklist When to use: Quality assurance, comprehensive tasks, validation Template:
[Task]
Before finalizing, ensure:
☐ [Requirement 1]
☐ [Requirement 2]
☐ [Requirement 3]
☐ [Requirement 4]
☐ [Requirement 5]
Completed output:
[Only after checking all items]---
25. Format Specification
Purpose: Explicitly define output format When to use: Data extraction, specific document types, structured output Template:
[Task]
Output format:
- JSON with keys: [key1], [key2], [key3]
- Or Markdown table with columns: [col1], [col2], [col3]
- Or bulleted list
- Or numbered list
Specify which format and provide:
[Formatted output]---
26. Progressive Disclosure
Purpose: Reveal information gradually When to use: Teaching, complex explanations, tutorials Template:
[Topic]
First, start with the basics:
[Simple overview]
Now build on that with intermediate concepts:
[Add complexity]
Finally, advanced details:
[Deep dive]
Summary:
[Tie it all together]---
27. Modular Breakdown
Purpose: Divide task into independent, reusable modules When to use: Complex systems, code generation, curriculum design Template:
[Complex Task]
Break into modules:
Module A: [Name and purpose]
- Input: [What it needs]
- Output: [What it produces]
- Dependencies: [What it needs from other modules]
Module B: [Name and purpose]
[Same structure]
Module C: [Name and purpose]
[Same structure]
Now implement each module:
[Detailed implementation]---
Control Techniques
28. Negative Constraints
Purpose: Specify what NOT to do When to use: Avoiding specific errors, filtering out unwanted content Template:
[Task]
Do NOT:
- [Prohibition 1]
- [Prohibition 2]
- [Prohibition 3]
Allowed approach:
[Positive guidance]---
29. Output Constraints
Purpose: Limit output length, complexity, or format When to use: Conciseness requirements, token limits, specific formats Template:
[Task]
Constraints:
- Maximum length: [e.g., 200 words]
- Must include: [Required elements]
- Must exclude: [Forbidden elements]
- Format: [e.g., bullet list]
Output:
[Constrained result]---
30. Tone Specification
Purpose: Define the voice and attitude of the output When to use: Brand alignment, audience targeting, appropriate communication Template:
[Task]
Tone: [Professional / Friendly / Academic / Casual / etc.]
Voice: [First person / Third person / etc.]
Style: [Formal / Conversational / Technical / etc.]
Output:
[Content matching specified tone]---
31. Quality Criteria
Purpose: Define standards the output must meet When to use: Quality-critical work, evaluation tasks, deliverables Template:
[Task]
Quality criteria:
☐ [Criterion 1 - e.g., "All claims must be supported by evidence"]
☐ [Criterion 2]
☐ [Criterion 3]
Self-evaluation after output:
[Check against criteria]---
32. Step-by-Step Instructions
Purpose: Provide explicit procedural guidance When to use: How-to tasks, tutorials, process documentation Template:
[Task]
Follow these steps:
Step 1: [Action]
[Detail on how to do it]
Step 2: [Action]
[Detail on how to do it]
Step 3: [Action]
[Detail on how to do it]
Continue to completion.---
33. Guided Exploration
Purpose: Direct exploration while allowing discovery When to use: Learning, research, open-ended investigation Template:
[Exploration topic]
Start by exploring:
[Initial direction to look]
Then investigate:
[Next area to explore]
Finally, examine:
[Final area to check]
Synthesize findings:
[Summary of discoveries]---
34. Controlled Generation
Purpose: Use specific constraints to guide output When to use: Specific vocabulary, terminology, style requirements Template:
[Task]
Must use these terms:
- [Term 1]
- [Term 2]
- [Term 3]
Must avoid these terms:
- [Term 1]
- [Term 2]
Output:
[Content respecting constraints]---
Meta Techniques
35. Prompt Chaining
Purpose: Chain multiple prompts together for complex tasks When to use: Multi-stage workflows, complex processing Template:
Stage 1: [First task]
[Generate intermediate output]
Stage 2: [Use stage 1 output]
[Process further]
Stage 3: [Use stage 2 output]
[Final result]---
36. Multi-Persona Debate
Purpose: Use different personas to debate and reach consensus When to use: Complex decisions, exploring multiple perspectives Template:
[Decision/Question]
Persona A: [Expert 1 perspective]
[Their argument]
Persona B: [Expert 2 perspective]
[Their argument]
Persona C: [Expert 3 perspective]
[Their argument]
Synthesis:
[Weigh arguments and provide balanced conclusion]---
37. Self-Evaluation
Purpose: Ask model to rate and improve its own output When to use: Quality improvement, iterative refinement Template:
[Task]
Initial output:
[Generate answer]
Now evaluate:
- Quality rating (1-10): [Score]
- What's good: [Strengths]
- What needs improvement: [Weaknesses]
Improved version:
[Address weaknesses]---
38. Verification Steps
Purpose: Include explicit verification in the process When to use: Critical tasks, fact-checking, validation Template:
[Task]
Step 1: [Initial generation]
Step 2: Verify:
- Check [validation criteria]
- Cross-reference [sources/data]
- Identify potential errors
Step 3: Correct and finalize:
[Address any issues found]---
39. Meta-Cognitive Prompting
Purpose: Explicitly reason about the reasoning process When to use: Complex problem solving, teaching reasoning Template:
[Task]
Before answering, think about:
1. What approach will I use?
2. What are the key challenges?
3. How will I structure my reasoning?
Approach: [Selected method]
Challenges: [Anticipated difficulties]
Structure: [Organization plan]
Now solve:
[Detailed reasoning and solution]
Reflection on process:
[What worked well, what didn't]---
40. Temperature Control
Purpose: Adjust creativity vs. precision through prompt instruction When to use: Need more creative or more deterministic output Template:
[Task]
Be very creative and explore diverse ideas: [For high creativity]
OR
Be precise and stick to the most likely answer: [For high precision]---
41. Iterative Refinement
Purpose: Generate, evaluate, and refine multiple times When to use: Quality-critical work, complex creative tasks Template:
[Task]
Draft 1:
[Initial attempt]
Critique 1:
[What to improve]
Draft 2:
[Second attempt incorporating feedback]
Critique 2:
[Further improvements]
Final version:
[Polished result]---
42. Perspective Taking
Purpose: Explicitly consider different viewpoints When to use: Sensitive topics, diverse audiences, balanced analysis Template:
[Topic]
Consider from these perspectives:
Perspective 1: [Group/Stakeholder]
- Their view: [Position]
- Key concerns: [What matters to them]
Perspective 2: [Group/Stakeholder]
- Their view: [Position]
- Key concerns: [What matters to them]
Perspective 3: [Group/Stakeholder]
- Their view: [Position]
- Key concerns: [What matters to them]
Balanced analysis:
[Synthesis of perspectives]---
Additional Techniques (43-58)
43. Compare and Contrast
Purpose: Systematically compare multiple items Template: "Compare X and Y on: criteria 1, criteria 2, criteria 3. Highlight similarities and differences."
44. Pros and Cons
Purpose: Weigh advantages and disadvantages Template: "List pros and cons of [decision/topic]. Provide balanced analysis."
45. Root Cause Analysis
Purpose: Identify underlying causes, not just symptoms Template: "For [problem], apply 5 Whys to find root cause. 1. Why? [Answer]. 2. Why? [Answer]. Continue 5 times."
46. First Principles
Purpose: Break down to fundamental truths and build up Template: "Analyze [topic] from first principles. What are the fundamental truths? What can be concluded from them?"
47. Worst-Case Scenario
Purpose: Plan for potential failures Template: "Consider worst-case scenarios for [plan]. What could go wrong? How to mitigate?"
48. Best-Case Scenario
Purpose: Plan for optimal outcomes Template: "What's the best possible outcome for [initiative]? What conditions would enable this?"
49. Devil's Advocate
Purpose: Challenge assumptions and arguments Template: "Play devil's advocate for [position]. Argue against it strongly, then rebut those arguments."
50. Reverse Engineering
Purpose: Work backwards from desired outcome Template: "To achieve [goal], work backwards. What must happen right before that? And before that?"
51. Gap Analysis
Purpose: Identify difference between current and desired state Template: "Current state: [now]. Desired state: [goal]. Gap analysis: What's missing? How to bridge?"
52. Risk Assessment
Purpose: Identify and evaluate risks Template: "For [project/situation], identify risks. Rate by likelihood (Low/Med/High) and impact (Low/Med/High). Suggest mitigations."
53. Value Proposition
Purpose: Articulate value and benefits clearly Template: "What's the value proposition of [product/idea]? For [target audience], what problem does it solve and what benefit does it provide?"
54. Elevator Pitch
Purpose: Convince quickly in short format Template: "Create a 30-second elevator pitch for [idea/product]. Hook: [Grab attention]. Value: [What's offered]. Call to action: [Next step]."
55. Before-After-Bridge
Purpose: Persuasive copywriting framework Template: "Before: [Current painful situation]. After: [Desired future state]. Bridge: [How to get from before to after with your solution]."
56. Problem-Agitation-Solution
Purpose: Persuasive marketing framework Template: "Problem: [Identify pain]. Agitation: [Make it worse/emotional]. Solution: [Your answer to the problem]."
57. Feature-Benefit-Proof
Purpose: Sales and marketing framework Template: "For each feature: 1) What it does (Feature), 2) What it delivers (Benefit), 3) Evidence (Proof)."
58. Situational Analysis
Purpose: Comprehensive context assessment Template: "Analyze situation: Internal factors (strengths, weaknesses). External factors (opportunities, threats). Recommendations based on analysis."
---
Technique Selection Guide
Use this guide to choose the right technique:
| Need | Best Technique(s) |
|---|---|
| Complex reasoning | CoT, Tree of Thoughts, Decomposition |
| Format consistency | Few-Shot, Template-Based |
| Creative output | Role-Play, Brainstorming, Creative Persona |
| Quality assurance | Self-Correction, Verification, Reflection |
| Teaching/explaining | Progressive Disclosure, Analogical Reasoning |
| Structured output | Format Specification, Checklist-Driven |
| Multiple perspectives | Multi-Persona Debate, Perspective Taking |
| Decision making | Compare/Contrast, Pros/Cons, Risk Assessment |
---
Note: Many techniques work well in combination. For example, Role-Play + CoT provides expert reasoning with step-by-step structure. Experiment with combinations for optimal results.
Prompt Quality Evaluation Framework
Systematic framework for evaluating prompt quality across multiple dimensions.
Table of Contents
---
Evaluation Dimensions
1. Clarity (清晰度)
Definition: How unambiguous and easy to understand the prompt is.
Key Questions:
- Can the task be understood on first read?
- Are there multiple possible interpretations?
- Is the language precise and specific?
- Are technical terms defined if needed?
Indicators of Good Clarity: ✓ Clear, unambiguous language ✓ Specific task description ✓ Defined technical terms ✓ Single interpretation
Indicators of Poor Clarity: ✗ Vague or ambiguous phrasing ✗ Multiple possible interpretations ✗ Undefined jargon ✗ Unclear what's being asked
Examples:
- Poor: "Write something about AI"
- Good: "Write a 500-word article about the impact of AI on healthcare"
- Excellent: "Write a 500-word article for healthcare professionals about three specific ways AI is transforming patient care, including one real-world example for each"
---
2. Specificity (具体性)
Definition: How well the prompt defines requirements, constraints, and expectations.
Key Questions:
- Are the deliverables clearly defined?
- Are constraints (length, format, style) specified?
- Is the scope clearly bounded?
- Are success criteria explicit?
Indicators of Good Specificity: ✓ Clear deliverable definition ✓ Explicit constraints ✓ Bounded scope ✓ Defined success criteria
Indicators of Poor Specificity: ✗ Open-ended without boundaries ✗ No format or length guidance ✗ Unclear what "good" looks like ✗ Missing context about audience/purpose
Examples:
- Poor: "Write an essay about climate change"
- Good: "Write a 1,200-word persuasive essay about climate change for high school students, arguing for renewable energy investment"
- Excellent: "Write a 1,200-word persuasive essay for high school students arguing that governments should increase renewable energy investment by 50% over the next 5 years. Include: 1) three specific benefits, 2) address two counterarguments, 3) end with a call to action for students"
---
3. Structure (结构)
Definition: How well-organized and logical the prompt is.
Key Questions:
- Is information organized logically?
- Are related concepts grouped together?
- Is there a clear flow from context to task?
- Are complex tasks broken down?
Indicators of Good Structure: ✓ Logical organization ✓ Clear sections or components ✓ Appropriate ordering of information ✓ Complex tasks broken into steps
Indicators of Poor Structure: ✗ Disorganized information ✓ Jumping between topics ✓ Important details buried ✓ No clear flow or progression
Examples:
- Poor: "Here are some things: the deadline is Friday, it's for marketing, we need a blog post, the topic is product launch, keep it casual"
- Good:
Context: Marketing blog post
Topic: Product launch
Audience: Current customers
Tone: Casual and friendly
Requirements:
- Deadline: Friday
- Length: 800-1000 words
- Include: 3 key features, customer testimonial- Excellent:
# Marketing Blog Post
**Topic:** Product Launch Announcement
**Target Audience:** Existing customers
**Tone:** Casual, friendly, exciting
**Content Requirements:**
1. Introduction: Hook readers with the main benefit
2. Feature highlights: 3 key features with use cases
3. Social proof: Include 1-2 customer quotes
4. Call to action: Clear next step
**Technical Requirements:**
- Length: 800-1000 words
- Format: Blog post with H2 headers
- Deadline: Friday, 5 PM---
4. Completeness (完整性)
Definition: Whether all necessary context, background, and information is provided.
Key Questions:
- Does the model have enough context to understand the task?
- Is background information included?
- Are relevant constraints or preferences mentioned?
- Is the audience and purpose clear?
Indicators of Good Completeness: ✓ Sufficient context provided ✓ Background information included ✓ Constraints and preferences specified ✓ Audience and purpose clear
Indicators of Poor Completeness: ✗ Missing key context ✗ No background on topic ✗ Important constraints omitted ✗ Unclear who it's for or why
Examples:
- Poor: "Write a proposal"
- Good: "Write a proposal for a $50,000 budget to implement a new CRM system for our 50-person sales team"
- Excellent:
**Task:** Write a project proposal for CRM implementation
**Context:**
- Company size: 50 employees (30 in sales)
- Current process: Manual spreadsheet tracking
- Pain points: Lost leads, missed follow-ups, no reporting
- Goal: Improve lead conversion by 20% in 6 months
**Proposal Requirements:**
- Budget: $50,000 maximum
- Timeline: 6-month implementation
- Include: Software recommendation, implementation plan, training approach, ROI projection
- Target audience: CFO for approval---
5. Tone (语气)
Definition: How well the prompt defines the desired voice, style, and attitude.
Key Questions:
- Is the expected tone specified?
- Does it match the intended audience?
- Is the style appropriate for the task?
- Are there constraints on formality?
Indicators of Good Tone: ✓ Clear tone specification ✓ Appropriate for audience ✓ Matches task purpose ✓ Style constraints defined
Indicators of Poor Tone: ✗ No tone guidance ✓ Tone mismatches audience ✓ Inconsistent style ✓ No formality level
Examples:
- Poor: "Write an email to customers"
- Good: "Write an email to customers about a product update. Keep it professional and informative."
- Excellent:
**Task:** Write an email announcing a product update
**Tone:** Professional, friendly, not overly formal
**Style Guidelines:**
- Use clear, direct language
- Avoid jargon and technical terms
- Be enthusiastic but not salesy
- Include a personal touch (e.g., "We're excited because...")
**Audience:** Existing customers who have used the product for 6+ months
**Key Messages:**
1. What's new
2. Why it matters to them
3. How to get it
4. Support available---
6. Constraints (约束)
Definition: How well boundaries, limitations, and requirements are specified.
Key Questions:
- Are length or format constraints clear?
- Are there things to avoid?
- Are there specific elements that must be included?
- Are boundaries on scope defined?
Indicators of Good Constraints: ✓ Clear constraints specified ✓ What to include defined ✓ What to avoid defined ✓ Scope boundaries clear
Indicators of Poor Constraints: ✗ No guidance on limits ✓ Unclear what to include/exclude ✓ Open-ended scope ✗ No quality criteria
Examples:
- Poor: "Write a story"
- Good: "Write a 500-word mystery story with a surprise ending"
- Excellent:
**Task:** Write a mystery story
**Constraints:**
- Length: Exactly 500 words
- Genre: Classic whodunit
- Setting: Single location (a train)
- Characters: 3-5 passengers
**Requirements:**
- Include: Clues (at least 3), red herring (at least 1), detective character
- Avoid: supernatural elements, time travel
- Ending: Surprise reveal that recontextualizes earlier clues
**Style:** Noir, atmospheric, first-person detective narration---
Scoring Rubric
Quality Levels
| Level | Score | Description |
|---|---|---|
| Excellent | 9-10 | Exceeds expectations, minimal improvements possible |
| Good | 7-8 | Solid quality, minor optimizations would help |
| Fair | 5-6 | Functional but has clear weaknesses |
| Poor | 1-4 | Significant issues, needs major revision |
Dimension Scoring
For each dimension, rate based on these criteria:
Excellent (9-10):
- Clear, specific, well-structured, complete
- Examples, constraints, and success criteria provided
- Little to no ambiguity
- Model has everything needed
Good (7-8):
- Mostly clear and specific
- Structure is logical
- Most context is provided
- Minor improvements would help
Fair (5-6):
- Some ambiguity present
- Structure could be improved
- Missing some context
- Functional but not optimal
Poor (1-4):
- Multiple interpretations possible
- Poorly organized
- Missing key information
- Model will struggle
Overall Quality Calculation
Weighted Average:
- Clarity: 20%
- Specificity: 20%
- Structure: 15%
- Completeness: 20%
- Tone: 10%
- Constraints: 15%
Example Calculation:
Clarity: 8/10 × 0.20 = 1.6
Specificity: 7/10 × 0.20 = 1.4
Structure: 9/10 × 0.15 = 1.35
Completeness: 6/10 × 0.20 = 1.2
Tone: 7/10 × 0.10 = 0.7
Constraints: 5/10 × 0.15 = 0.75
Total: 7.0/10 = Good---
Quality Assessment Process
Step 1: Initial Scan
Read the prompt quickly and note:
- First impression of clarity
- Obvious missing information
- Immediate red flags
Step 2: Dimension-by-Dimension Evaluation
For each dimension: 1. Identify strengths (what works well) 2. Identify weaknesses (what's missing or unclear) 3. Provide specific score (1-10) 4. Note specific improvement opportunities
Step 3: Calculate Overall Score
Apply weighted average formula.
Step 4: Generate Recommendations
Based on dimensions with lowest scores: 1. Identify applicable techniques from prompt-techniques.md 2. Prioritize high-impact improvements 3. Provide concrete suggestions
Step 5: Create Optimization Plan
Organize recommendations into:
- Must fix (critical weaknesses)
- Should fix (important improvements)
- Nice to have (enhancements)
---
Common Anti-Patterns
1. The Ambiguous Ask
Problem: Vague language without clear expectations Example: "Make it better" or "Fix this" Fix: Specify what "better" means and what aspects to improve
2. The Overload
Problem: Too much information, poor organization Example: Long paragraphs mixing context, constraints, and tasks Fix: Use structure, sections, and logical grouping
3. The Missing Context
Problem: Insufficient background or audience information Example: "Write a blog post" (no topic, audience, or goal) Fix: Provide context about topic, audience, purpose, and constraints
4. The Moving Target
Problem: Contradictory or evolving requirements Example: "Be creative but follow strict guidelines" without clarification Fix: Resolve contradictions or make them explicit as trade-offs
5. The Assumption
Problem: Assuming model knows domain-specific context Example: Using technical jargon without explanation Fix: Define terms or provide background knowledge
6. The Kitchen Sink
Problem: Including irrelevant information Example: 10 paragraphs of background when 2 would suffice Fix: Focus on what's necessary for the task
7. The No-Output
Problem: Unclear what the final deliverable should be Example: "Think about X" without specifying what to produce Fix: Specify output format, length, and structure
8. The Too-Rigid
Problem: Over-constraining to the point of impossibility Example: 20 constraints that conflict with each other Fix: Focus on essential constraints, remove non-critical ones
---
Quality Benchmarks
By Prompt Type
Code Generation
Excellent:
Write a Python function to sort a list of dictionaries by a specific key.
Requirements:
- Function signature: def sort_dicts(list_of_dicts, key, reverse=False)
- Handle edge cases: empty list, key not found
- Return: New sorted list (don't modify original)
- Include docstring with examples
- Use stable sort (maintain order for equal keys)Score: 9.5/10
Content Creation
Excellent:
Write a LinkedIn post announcing our new feature.
Context:
- Feature name: Smart Scheduling
- Main benefit: Saves 2 hours/week for users
- Launch date: Next Monday
- Target: Existing customers (productivity enthusiasts)
Format:
- Length: 150-200 words
- Tone: Professional but excited
- Include: One hook, two bullet points on benefits, CTA
- Emoji: Use sparingly (2-3 max)Score: 9/10
Analysis
Excellent:
Analyze the competitive landscape for AI-powered email tools.
Scope:
- Top 5 competitors: [Company A, B, C, D, E]
- Focus on: Pricing, key features, target market, unique positioning
Output format:
- Comparison table with rows for each competitor
- Columns: Pricing, Key Features (3), Target Market, Differentiation
- Summary paragraph: Key insights and gaps
- Bullet list: Opportunities for our productScore: 9/10
Problem Solving
Excellent:
Our customer support response time is 48 hours (target: 12 hours).
Analyze the problem and provide a 3-step solution plan.
Consider:
- Current bottlenecks (we suspect manual triage)
- Team size: 5 support agents, 500 tickets/week
- Budget: Can invest up to $10K in tools/training
Provide:
- Root cause diagnosis
- 3 prioritized solutions with:
* What it is
* Expected impact (hours saved)
* Cost (time + money)
* Implementation timelineScore: 8.5/10
Improvement Targets
| Current Score | Target Score | Priority Improvements |
|---|---|---|
| 1-4 (Poor) | 7+ (Good) | Add context, clarify task, structure information |
| 5-6 (Fair) | 8+ (Very Good) | Specific constraints, examples, refine tone |
| 7-8 (Good) | 9-10 (Excellent) | Add examples, edge cases, success criteria |
---
Quick Assessment Checklist
Use this for rapid prompt evaluation:
☐ Clarity: Can I understand what's being asked? ☐ Specificity: Are deliverables and constraints clear? ☐ Structure: Is information organized logically? ☐ Completeness: Is there enough context? ☐ Tone: Is the expected voice/style specified? ☐ Constraints: Are boundaries and requirements defined?
If 5-6 items checked: Good quality If 3-4 items checked: Needs improvement If 0-2 items checked: Major revision needed
---
Note: Quality is relative to task complexity and requirements. A simple task may need less detail than a complex one. Adjust expectations accordingly.
Related skills
Forks & variants (1)
Prompt Optimizer has 1 known copy in the catalog totaling 11 installs. They canonicalize to this original listing.
- sundial-org - 11 installs
FAQ
How many techniques does it cover?
58 prompting techniques, including chain-of-thought, few-shot learning, role-play, and 50+ more.
Are there scripts?
Yes, scripts/evaluate.py and scripts/optimize.py provide deterministic evaluation and optimization.