Skip to content
Development
Command

/optimize-prompt

Rewrite and optimize an AI prompt for better performance and reliability.

From plugin
rohitg00-claude-code-toolkit
2.8k199 skills138 agents199 commands
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-code

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
@rohitg00
Ships withrohitg00-claude-code-toolkit

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.

2.8k40 skills138 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2.8k
Star history of rohitg00/awesome-claude-code-toolkit on GitHub, a chart by star-history.com

Other commands on rohitg00-claude-code-toolkit.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command