/optimize-prompt
Rewrite and optimize an AI prompt for better performance and reliability.
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/optimize-prompt
Context preview
What this command does when you run it.
Rewrite and optimize an AI prompt for better performance and reliability.
Command definition
optimize-prompt.md/optimize-prompt - Optimize AI Prompt
Rewrite and optimize an AI prompt for better performance and reliability.
Steps
1. Read the original prompt and understand its intended purpose 2. Identify the target model and use case (chat, completion, function calling) 3. Restructure the prompt with clear sections: role, context, task, constraints, format 4. Rewrite ambiguous instructions with specific, measurable language 5. Add or improve output format specification with examples 6. Include edge case handling instructions 7. Add few-shot examples if the task benefits from them 8. Implement chain-of-thought reasoning for complex tasks 9. Add guardrails: what the model should not do, how to handle uncertainty 10. Optimize token usage: remove redundant words, consolidate instructions 11. A/B test the original vs optimized prompt with sample inputs 12. Present the optimized prompt with annotations explaining each change
Rules
- Preserve the original intent; do not change what the prompt is trying to achieve
- Use imperative language for instructions (do X, not "you should X")
- Place the most important instructions at the beginning and end of the prompt
- Use XML tags or markdown headers to separate prompt sections
- Include a fallback instruction for when the model cannot complete the task
- Test with adversarial inputs to verify robustness
- Keep the optimized prompt as concise as possible while maintaining effectiveness
Read more
/optimize-prompt - Optimize AI Prompt
Rewrite and optimize an AI prompt for better performance and reliability.
Steps
1. Read the original prompt and understand its intended purpose 2. Identify the target model and use case (chat, completion, function calling) 3. Restructure the prompt with clear sections: role, context, task, constraints, format 4. Rewrite ambiguous instructions with specific, measurable language 5. Add or improve output format specification with examples 6. Include edge case handling instructions 7. Add few-shot examples if the task benefits from them 8. Implement chain-of-thought reasoning for complex tasks 9. Add guardrails: what the model should not do, how to handle uncertainty 10. Optimize token usage: remove redundant words, consolidate instructions 11. A/B test the original vs optimized prompt with sample inputs 12. Present the optimized prompt with annotations explaining each change
Rules
- Preserve the original intent; do not change what the prompt is trying to achieve
- Use imperative language for instructions (do X, not "you should X")
- Place the most important instructions at the beginning and end of the prompt
- Use XML tags or markdown headers to separate prompt sections
- Include a fallback instruction for when the model cannot complete the task
- Test with adversarial inputs to verify robustness
- Keep the optimized prompt as concise as possible while maintaining effectiveness
The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.
Repo: rohitg00/awesome-claude-code-toolkit
Other commands on rohitg00-claude-code-toolkit.
- /adr
Write an Architecture Decision Record documenting a significant technical decision.
Open command - /design-review
Conduct a structured design review of a module, feature, or system component.
Open command - /diagram
Generate Mermaid diagrams from codebase analysis or description.
Open command - /migrate
Plan and execute a framework or library migration incrementally.
Open command - /plan
Create a structured implementation plan for the requested feature or change.
Open command - /refactor
Perform a systematic refactoring of the specified code area.
Open command

