255 lines
6.5 KiB
Markdown
255 lines
6.5 KiB
Markdown
|
|
# Prompt Engineering Expert Skill - Summary
|
||
|
|
|
||
|
|
## What Was Created
|
||
|
|
|
||
|
|
A comprehensive Claude Skill for **prompt engineering expertise** with deep knowledge of:
|
||
|
|
- Prompt writing best practices
|
||
|
|
- Custom instructions design
|
||
|
|
- Prompt optimization and refinement
|
||
|
|
- Advanced techniques (CoT, few-shot, XML tags, etc.)
|
||
|
|
- Evaluation frameworks and testing
|
||
|
|
- Anti-pattern recognition
|
||
|
|
- Multimodal prompting
|
||
|
|
|
||
|
|
## Skill Structure
|
||
|
|
|
||
|
|
```
|
||
|
|
~/Documents/prompt-engineering-expert/
|
||
|
|
├── SKILL.md # Skill metadata & overview
|
||
|
|
├── CLAUDE.md # Main skill instructions
|
||
|
|
├── README.md # User guide & getting started
|
||
|
|
├── docs/
|
||
|
|
│ ├── BEST_PRACTICES.md # Comprehensive best practices (from official docs)
|
||
|
|
│ ├── TECHNIQUES.md # Advanced techniques guide
|
||
|
|
│ └── TROUBLESHOOTING.md # Common issues & solutions
|
||
|
|
└── examples/
|
||
|
|
└── EXAMPLES.md # 10 real-world examples & templates
|
||
|
|
```
|
||
|
|
|
||
|
|
## Key Files
|
||
|
|
|
||
|
|
### 1. **SKILL.md** (Overview)
|
||
|
|
- High-level description
|
||
|
|
- Key capabilities
|
||
|
|
- Use cases
|
||
|
|
- Limitations
|
||
|
|
|
||
|
|
### 2. **CLAUDE.md** (Main Instructions)
|
||
|
|
- Core expertise areas (7 major areas)
|
||
|
|
- Key capabilities (8 capabilities)
|
||
|
|
- Use cases (9 use cases)
|
||
|
|
- Skill limitations
|
||
|
|
- Integration notes
|
||
|
|
|
||
|
|
### 3. **README.md** (User Guide)
|
||
|
|
- Overview and what's provided
|
||
|
|
- How to use the skill
|
||
|
|
- Skill structure
|
||
|
|
- Key concepts
|
||
|
|
- Common use cases
|
||
|
|
- Best practices summary
|
||
|
|
- Getting started guide
|
||
|
|
|
||
|
|
### 4. **docs/BEST_PRACTICES.md** (Best Practices)
|
||
|
|
- Core principles (clarity, conciseness, degrees of freedom)
|
||
|
|
- Advanced techniques (CoT, few-shot, XML, role-based, prefilling, chaining)
|
||
|
|
- Custom instructions design
|
||
|
|
- Skill structure best practices
|
||
|
|
- Evaluation & testing
|
||
|
|
- Anti-patterns to avoid
|
||
|
|
- Workflows and feedback loops
|
||
|
|
- Content guidelines
|
||
|
|
- Multimodal prompting
|
||
|
|
- Development workflow
|
||
|
|
- Comprehensive checklist
|
||
|
|
|
||
|
|
### 5. **docs/TECHNIQUES.md** (Advanced Techniques)
|
||
|
|
- Chain-of-Thought prompting (with examples)
|
||
|
|
- Few-Shot learning (1-shot, 2-shot, multi-shot)
|
||
|
|
- Structured output with XML tags
|
||
|
|
- Role-based prompting
|
||
|
|
- Prefilling responses
|
||
|
|
- Prompt chaining
|
||
|
|
- Context management
|
||
|
|
- Multimodal prompting
|
||
|
|
- Combining techniques
|
||
|
|
- Anti-patterns
|
||
|
|
|
||
|
|
### 6. **docs/TROUBLESHOOTING.md** (Troubleshooting)
|
||
|
|
- 8 common issues with solutions:
|
||
|
|
1. Inconsistent outputs
|
||
|
|
2. Hallucinations
|
||
|
|
3. Vague responses
|
||
|
|
4. Wrong length
|
||
|
|
5. Wrong format
|
||
|
|
6. Refuses to respond
|
||
|
|
7. Prompt too long
|
||
|
|
8. Doesn't generalize
|
||
|
|
- Debugging workflow
|
||
|
|
- Quick reference table
|
||
|
|
- Testing checklist
|
||
|
|
|
||
|
|
### 7. **examples/EXAMPLES.md** (Real-World Examples)
|
||
|
|
- 10 practical examples:
|
||
|
|
1. Refining vague prompts
|
||
|
|
2. Custom instructions for agents
|
||
|
|
3. Few-shot classification
|
||
|
|
4. Chain-of-thought analysis
|
||
|
|
5. XML-structured prompts
|
||
|
|
6. Iterative refinement
|
||
|
|
7. Anti-pattern recognition
|
||
|
|
8. Testing framework
|
||
|
|
9. Skill metadata template
|
||
|
|
10. Optimization checklist
|
||
|
|
|
||
|
|
## Core Expertise Areas
|
||
|
|
|
||
|
|
1. **Prompt Writing Best Practices**
|
||
|
|
- Clarity and directness
|
||
|
|
- Structure and formatting
|
||
|
|
- Specificity
|
||
|
|
- Context management
|
||
|
|
- Tone and style
|
||
|
|
|
||
|
|
2. **Advanced Prompt Engineering Techniques**
|
||
|
|
- Chain-of-Thought (CoT) prompting
|
||
|
|
- Few-Shot prompting
|
||
|
|
- XML tags
|
||
|
|
- Role-based prompting
|
||
|
|
- Prefilling
|
||
|
|
- Prompt chaining
|
||
|
|
|
||
|
|
3. **Custom Instructions & System Prompts**
|
||
|
|
- System prompt design
|
||
|
|
- Custom instructions
|
||
|
|
- Behavioral guidelines
|
||
|
|
- Personality and voice
|
||
|
|
- Scope definition
|
||
|
|
|
||
|
|
4. **Prompt Optimization & Refinement**
|
||
|
|
- Performance analysis
|
||
|
|
- Iterative improvement
|
||
|
|
- A/B testing
|
||
|
|
- Consistency enhancement
|
||
|
|
- Token optimization
|
||
|
|
|
||
|
|
5. **Anti-Patterns & Common Mistakes**
|
||
|
|
- Vagueness
|
||
|
|
- Contradictions
|
||
|
|
- Over-specification
|
||
|
|
- Hallucination risks
|
||
|
|
- Context leakage
|
||
|
|
- Jailbreak vulnerabilities
|
||
|
|
|
||
|
|
6. **Evaluation & Testing**
|
||
|
|
- Success criteria definition
|
||
|
|
- Test case development
|
||
|
|
- Failure analysis
|
||
|
|
- Regression testing
|
||
|
|
- Edge case handling
|
||
|
|
|
||
|
|
7. **Multimodal & Advanced Prompting**
|
||
|
|
- Vision prompting
|
||
|
|
- File-based prompting
|
||
|
|
- Embeddings integration
|
||
|
|
- Tool use prompting
|
||
|
|
- Extended thinking
|
||
|
|
|
||
|
|
## Key Capabilities
|
||
|
|
|
||
|
|
1. **Prompt Analysis** - Review and improve existing prompts
|
||
|
|
2. **Prompt Generation** - Create new prompts from scratch
|
||
|
|
3. **Prompt Refinement** - Iteratively improve prompts
|
||
|
|
4. **Custom Instruction Design** - Create specialized instructions
|
||
|
|
5. **Best Practice Guidance** - Teach prompt engineering principles
|
||
|
|
6. **Anti-Pattern Recognition** - Identify and correct mistakes
|
||
|
|
7. **Testing Strategy** - Develop evaluation frameworks
|
||
|
|
8. **Documentation** - Create clear usage documentation
|
||
|
|
|
||
|
|
## How to Use This Skill
|
||
|
|
|
||
|
|
### For Prompt Analysis
|
||
|
|
```
|
||
|
|
"Review this prompt and suggest improvements:
|
||
|
|
[YOUR PROMPT]"
|
||
|
|
```
|
||
|
|
|
||
|
|
### For Prompt Generation
|
||
|
|
```
|
||
|
|
"Create a prompt that:
|
||
|
|
- [Requirement 1]
|
||
|
|
- [Requirement 2]
|
||
|
|
- [Requirement 3]"
|
||
|
|
```
|
||
|
|
|
||
|
|
### For Custom Instructions
|
||
|
|
```
|
||
|
|
"Design custom instructions for an agent that:
|
||
|
|
- [Role/expertise]
|
||
|
|
- [Key responsibilities]"
|
||
|
|
```
|
||
|
|
|
||
|
|
### For Troubleshooting
|
||
|
|
```
|
||
|
|
"This prompt isn't working:
|
||
|
|
[PROMPT]
|
||
|
|
|
||
|
|
Issues: [DESCRIBE ISSUES]
|
||
|
|
|
||
|
|
How can I fix it?"
|
||
|
|
```
|
||
|
|
|
||
|
|
## Best Practices Included
|
||
|
|
|
||
|
|
### Do's ✅
|
||
|
|
- Be clear and specific
|
||
|
|
- Provide examples
|
||
|
|
- Specify format
|
||
|
|
- Define constraints
|
||
|
|
- Test thoroughly
|
||
|
|
- Document assumptions
|
||
|
|
- Use progressive disclosure
|
||
|
|
- Handle edge cases
|
||
|
|
|
||
|
|
### Don'ts ❌
|
||
|
|
- Be vague or ambiguous
|
||
|
|
- Assume understanding
|
||
|
|
- Skip format specification
|
||
|
|
- Ignore edge cases
|
||
|
|
- Over-specify constraints
|
||
|
|
- Use jargon without explanation
|
||
|
|
- Hardcode values
|
||
|
|
- Ignore error handling
|
||
|
|
|
||
|
|
## Documentation Quality
|
||
|
|
|
||
|
|
- **Comprehensive**: Covers all major aspects of prompt engineering
|
||
|
|
- **Practical**: Includes real-world examples and templates
|
||
|
|
- **Well-Organized**: Clear structure with progressive disclosure
|
||
|
|
- **Actionable**: Specific guidance with step-by-step instructions
|
||
|
|
- **Tested**: Based on official Anthropic documentation
|
||
|
|
- **Reusable**: Templates and checklists for common tasks
|
||
|
|
|
||
|
|
## Integration Points
|
||
|
|
|
||
|
|
Works well with:
|
||
|
|
- Claude Code (for testing prompts)
|
||
|
|
- Agent SDK (for implementing instructions)
|
||
|
|
- Files API (for analyzing documentation)
|
||
|
|
- Vision capabilities (for multimodal design)
|
||
|
|
- Extended thinking (for complex reasoning)
|
||
|
|
|
||
|
|
## Next Steps
|
||
|
|
|
||
|
|
1. **Upload the skill** to Claude using the Skills API or Claude Code
|
||
|
|
2. **Test with sample prompts** to verify functionality
|
||
|
|
3. **Iterate based on feedback** to refine and improve
|
||
|
|
4. **Share with team** for collaborative prompt engineering
|
||
|
|
5. **Extend as needed** with domain-specific examples
|
||
|
|
|
||
|
|
## Files Location
|
||
|
|
|
||
|
|
All files are located in: `~/Documents/prompt-engineering-expert/`
|
||
|
|
|
||
|
|
Ready to use with Claude's Skills feature!
|