Expert prompt engineering assistant for Claude Code. Automatically optimizes user prompts using advanced techniques like role assignment, chain-of-thought, few-shot examples, and structured formatting.
- CLARITY Framework: Systematic approach covering Context, Logic, Action, Role, Input/Output, Tone, and Yardstick
- Advanced Techniques: Chain-of-thought, few-shot examples, structured output, constraint specification
- Pattern Library: Reusable patterns for common scenarios
- Multi-Domain Support: Code generation, content writing, data analysis, and more
- Educational: Explains why each optimization was made
# Clone repository locally
git clone https://github.com/dreamor/prompt-optimizer-skill.git
# Install in Claude Code
cd ~/.claude/skills/
ln -s /path/to/prompt-optimizer-skill prompt-engineering-expertIn Claude Code conversation:
- Say "optimize this prompt: [your prompt]"
- Or "improve this: [your prompt]"
- Or use
/prompt-engineering-expertcommand
| Element | Description |
|---|---|
| Context | Provide relevant background and situation |
| Logic | Define the reasoning approach |
| Action | Specify the exact task or action |
| Role | Assign a specific expert role |
| Input/Output | Define input format and expected output |
| Tone | Specify writing style, tone, and voice |
| Yardstick | Set constraints, requirements, and quality criteria |
write a function to sort a list
# Role
You are a senior Python developer specializing in algorithms and data structures.
# Task
Implement a robust sorting function with comprehensive error handling.
# Instructions
1. Implement with type hints following Python 3.10+ standards
2. Include detailed docstrings with examples in Google style
3. Handle edge cases: empty list, None values, mixed types
4. Provide both ascending and descending sort options
5. Include time and space complexity analysis
# Constraints
- Use only Python standard library
- Follow PEP 8 style guidelines
- Include at least 5 test cases
- Keep function under 50 lines (excluding tests)
# Output Format
1. Function implementation with type hints
2. Comprehensive docstring with examples
3. Complexity analysis table
4. Test suite with pytest-style assertions
5. Usage examplesThink step by step and show your reasoning before providing the final answer.Example 1:
Input: ...
Output: ...
Now process: [user input]After generating your answer, review it for gaps and improve before finalizing.MIT