/prompt-engineer:prompt-engineerfrom prompt-engineer
Crafts, optimizes, and debugs prompts for LLMs using techniques like chain-of-thought, few-shot learning, and constraint engineering. Use when building AI features or improving agent performance.
Ships in prompt-engineer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Expert in crafting, optimizing, and debugging prompts for large language models. Transform vague requirements into precise, effective prompts that produce consistent, high-quality outputs.
User: "My chatbot gives inconsistent answers about our refund policy"
Prompt Engineer:
1. Analyze current prompt structure
2. Identify ambiguity and edge cases
3. Apply constraint engineering
4. Add few-shot examples
5. Test with adversarial inputs
6. Measure improvement
Result: 40-60% improvement in response consistency
| Technique | When to Use | Expected Improvement |
|---|---|---|
| Chain-of-Thought | Complex reasoning | 20-40% accuracy |
| Few-Shot Examples | Format consistency | 30-50% reliability |
| Constraint Engineering | Edge case handling | 50%+ consistency |
| Role Prompting | Domain expertise | 15-25% quality |
| Self-Consistency | Critical decisions | 10-20% accuracy |
C - Context: What background does the model need?
L - Limits: What constraints apply?
E - Examples: What does good output look like?
A - Action: What specific task to perform?
R - Review: How to verify correctness?
You are [ROLE] with expertise in [DOMAIN].
## Your Task
[CLEAR, SPECIFIC INSTRUCTION]
## Constraints
- [CONSTRAINT 1]
- [CONSTRAINT 2]
## Output Format
[EXACT FORMAT SPECIFICATION]
## Examples
Input: [EXAMPLE INPUT]
Output: [EXAMPLE OUTPUT]
Think through this step-by-step:
1. First, identify [ASPECT 1]
2. Then, analyze [ASPECT 2]
3. Consider [EDGE CASES]
4. Finally, synthesize into [OUTPUT]
Show your reasoning before the final answer.
| Phase | Activities | Tools |
|---|---|---|
| Analyze | Review current prompts, identify issues | Read, pattern analysis |
| Hypothesize | Form improvement hypotheses | Sequential thinking |
| Implement | Apply prompt engineering techniques | Write, Edit |
| Test | Validate with diverse inputs | Manual testing |
| Measure | Quantify improvement | A/B comparison |
| Iterate | Refine based on results | Repeat cycle |
Problem: Model fabricates information
Fix: Add "Only use information provided. Say 'I don't know' if uncertain."
Problem: Model produces too much text
Fix: Add "Be concise. Maximum 3 sentences." + format constraints
Problem: Output doesn't match required format
Fix: Add explicit examples + "Follow this exact format:"
Problem: Model loses track in long conversations
Fix: Add periodic context summaries + clear role reminders
What it looks like: Cramming every possible instruction into one prompt Why wrong: Dilutes important instructions, confuses model Instead: Prioritize 3-5 key constraints, use progressive disclosure
What it looks like: "Write something good about our product" Why wrong: No measurable criteria, inconsistent outputs Instead: Specific requirements with examples
What it looks like: 50+ rules the model must follow Why wrong: Model can't prioritize, contradictions emerge Instead: Essential constraints only, test for necessity
What it looks like: Complex format with no concrete examples Why wrong: Model interprets instructions differently Instead: Always include 2-3 representative examples
| Metric | How to Measure | Target |
|---|---|---|
| Consistency | Same input, same output quality | >90% |
| Accuracy | Correct information | >95% |
| Format Compliance | Follows specified format | >98% |
| Latency | Time to first token | <2s |
| Token Efficiency | Output tokens per task | -20% waste |
Use for:
Do NOT use for:
Core insight: Great prompts are like great specifications—specific enough to eliminate ambiguity, flexible enough to handle variation, and tested against adversarial inputs.
Use with: ai-engineer (production apps) | automatic-stateful-prompt-improver (automation) | agent-creator (new agents)
What SKILL.md sets; muted values are Claude Code's defaults
2 plugins ship this exact skill · first indexed Aug 15, 2026
npx claudepluginhub curiositech/some_claude_skills --plugin prompt-engineerOther plugins' skills for the same job