Analyze the performance of this code and suggest three specific optimizations:
Usage: /optimize
Claude receives the expanded prompt and analyzes the code in context.
All generated slash commands should use XML tags in the body (after YAML frontmatter) for clarity and consistency.
- What the command does and why it matters
What needs to happen and why this matters.
Context about who uses this and what it accomplishes.
or - How to execute the command
Sequential steps to accomplish the objective:
1. First step
2. Second step
3. Final step
- How to know the command succeeded
Clear, measurable criteria for successful completion.
- When loading dynamic state or files
Current state: ! git status
Relevant files: @ package.json
(Note: Remove the space after @ in actual usage)
- When producing artifacts that need checking
Before completing, verify:
- Specific test or check to perform
- How to confirm it works
- When running tests is part of the workflow
Run tests: ! npm test
Check linting: ! npm run lint