
Claude Code Custom Slash Commands: Automate Your Repetitive Workflows
Claude Code Custom Slash Commands: Automate Your Repetitive Workflows What Are Custom Slash Commands? Claude Code lets you create your own commands like /commit , /review-pr , etc. Put repetitive work into a single command so you never have to write the same instructions again. How It Works Just place Markdown files in .claude/commands/ : .claude/ commands/ review.md → /review deploy-check.md → /deploy-check db-migrate.md → /db-migrate Example 1: Code Review Command .claude/commands/review.md : # Code Review Review current changes ( `git diff HEAD` ): 1. **Bug risks** : Crash or data corruption potential 2. **Security** : OWASP Top 10 perspective 3. **Performance** : N+1 queries, unnecessary loops 4. **Readability** : Variable names, function length, complexity 5. **Tests** : Coverage gaps Include file:line numbers for each issue. Severity: 🔴 must fix / 🟡 recommended / 🟢 suggestion claude /review Example 2: Pre-Deploy Checklist .claude/commands/deploy-check.md : # Pre-Deploy Checklist
Continue reading on Dev.to
Opens in a new tab



