Use when prompts produce inconsistent or unreliable outputs, need explicit structure and constraints, require safety guardrails or quality checks, involve multi-step reasoning that needs decomposition, need domain expertise encoding, or when user mentions improving prompts, prompt templates, structured prompts, prompt optimization, reliable AI outputs, or prompt patterns.
Transforms unreliable prompts into structured, constraint-aware prompts that produce consistent, high-quality outputs. Use when prompts yield inconsistent results, need safety guardrails, require multi-step reasoning decomposition, or when users mention prompt optimization and reliability.
/plugin marketplace add lyndonkl/claude/plugin install lyndonkl-thinking-frameworks-skills@lyndonkl/claudeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
resources/evaluators/rubric_meta_prompt_engineering.jsonresources/methodology.mdresources/template.mdTransform vague or unreliable prompts into structured, constraint-aware prompts that produce consistent, high-quality outputs with built-in safety and evaluation.
Use meta-prompt-engineering when you need to:
Improve Reliability:
Add Structure:
Enforce Constraints:
Enable Evaluation:
Encode Expertise:
Meta-prompt-engineering applies structured frameworks to improve prompt quality:
Key Components:
Quick Example:
Before (vague prompt):
Write a blog post about AI safety.
After (engineered prompt):
Role: You are an AI safety researcher writing for a technical audience.
Task: Write a blog post about AI safety covering:
1. Define AI safety and why it matters
2. Discuss 3 major challenge areas
3. Highlight 2 promising research directions
4. Conclude with actionable takeaways
Constraints:
- 800-1000 words
- Technical but accessible (assume CS background)
- Cite at least 3 recent papers (2020+)
- Avoid hype; focus on concrete risks and solutions
Output Format:
- Title
- Introduction (100 words)
- Body sections with clear headings
- Conclusion with 3-5 bullet point takeaways
- References
Quality Check:
Before submitting, verify:
- All 3 challenge areas covered with examples
- Claims are specific and falsifiable
- Tone is balanced (not alarmist or dismissive)
This structured prompt produces more consistent, higher-quality outputs.
Copy this checklist and track your progress:
Meta-Prompt Engineering Progress:
- [ ] Step 1: Analyze current prompt
- [ ] Step 2: Define role and goal
- [ ] Step 3: Add structure and steps
- [ ] Step 4: Specify constraints
- [ ] Step 5: Add quality checks
- [ ] Step 6: Test and iterate
Step 1: Analyze current prompt
Identify weaknesses: vague instructions, missing constraints, no structure, inconsistent outputs. Document specific failure modes. Use resources/template.md as starting structure.
Step 2: Define role and goal
Specify who the AI is (expert, assistant, critic) and what success looks like. Clear persona and objective improve output quality. See Common Patterns for role examples.
Step 3: Add structure and steps
Break complex tasks into numbered steps or sections. Define expected output format (JSON, markdown, sections). For advanced structuring techniques, see resources/methodology.md.
Step 4: Specify constraints
Add explicit limits: length, tone, content restrictions, format requirements. Include domain-specific rules. See Guardrails for constraint patterns.
Step 5: Add quality checks
Include self-evaluation criteria, chain-of-thought requirements, uncertainty expression. Build in failure prevention for known issues.
Step 6: Test and iterate
Run prompt multiple times, measure consistency and quality using resources/evaluators/rubric_meta_prompt_engineering.json. Refine based on failure modes.
Role Specification Pattern:
You are a [role] with expertise in [domain].
Your goal is to [specific objective] for [audience].
You should prioritize [values/principles].
Task Decomposition Pattern:
To complete this task:
1. [Step 1 with clear deliverable]
2. [Step 2 building on step 1]
3. [Step 3 synthesizing 1 and 2]
4. [Final step with output format]
Constraint Specification Pattern:
Requirements:
- [Format constraint]: Output must be [structure]
- [Length constraint]: [min]-[max] [units]
- [Tone constraint]: [style] appropriate for [audience]
- [Content constraint]: Must include [required elements] / Must avoid [prohibited elements]
Quality Check Pattern:
Before finalizing, verify:
- [ ] [Criterion 1 with specific check]
- [ ] [Criterion 2 with measurable standard]
- [ ] [Criterion 3 with failure mode prevention]
If any check fails, revise before responding.
Few-Shot Pattern:
Here are examples of good outputs:
Example 1:
Input: [example input]
Output: [example output with annotation]
Example 2:
Input: [example input]
Output: [example output with annotation]
Now apply the same approach to:
Input: [actual input]
Avoid Over-Specification:
Test for Robustness:
Prevent Common Failures:
Balance Specificity and Flexibility:
Iterate Based on Failures:
Resources:
resources/template.md - Structured prompt template with all componentsresources/methodology.md - Advanced techniques for complex promptsresources/evaluators/rubric_meta_prompt_engineering.json - Quality criteria for prompt evaluationOutput:
meta-prompt-engineering.md in current directorySuccess Criteria:
Quick Prompt Improvement Checklist:
Common Improvements:
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.