Day 10
Custom Slash Commands
Build your own /commands to automate your most common workflows.
0 / 8 tasks
What are slash commands?
You can define custom slash commands in CLAUDE.md that trigger specific workflows. Type `/review` and Claude runs your predefined code review process. Type `/pr` and it generates a pull request description. These are team-shareable, version-controlled shortcuts.
Defining commands
markdown
## Custom Commands
### /review
Perform a code review on the staged git changes. Check for:
1. Logic errors and edge cases
2. Security vulnerabilities (injection, auth, secrets)
3. Missing error handling
4. Test coverage gaps
5. Performance issues
Format as a numbered list. Be specific, not generic.
### /pr
Generate a pull request description from the current git diff.
Include: Summary (2-3 bullets), Test Plan (checklist), and Breaking Changes (if any).
Keep it under 300 words.
### /test-plan
Review the current changes and generate a manual test plan.
List specific scenarios to test, including edge cases and error conditions.
### /changelog
Generate a CHANGELOG.md entry for the commits since the last tag.
Group changes as: Added, Changed, Fixed, Removed.