Perform a thorough code review of specified files or recent changes. Checks for bugs, security issues, and best practices.
Commands are custom slash commands that extend Claude Code's functionality. They're markdown files in .claude/commands/ that define reusable prompts or workflows. Invoke them with /command-name in Claude Code. Commands can accept arguments and automate complex multi-step tasks.
Save as `.claude/commands/review.md` and use `/review <file-or-changes>`
Perform a comprehensive code review: ## Review Checklist ### 1. Logic & Correctness - [ ] Code does what it claims to do - [ ] Edge cases are handled - [ ] No obvious bugs or logic errors ### 2. Security - [ ] No SQL injection vulnerabilities - [ ] Input validation present - [ ] No exposed secrets or credentials - [ ] XSS prevention in place ### 3. Performance - [ ] No N+1 query patterns - [ ] Appropriate caching - [ ] No memory leaks - [ ] Efficient algorithms ### 4. Maintainability - [ ] Clear naming conventions - [ ] Functions are focused (single responsibility) - [ ] No excessive nesting - [ ] Comments explain "why" not "what" ### 5. Testing - [ ] Tests cover happy path - [ ] Edge cases tested - [ ] Mocks used appropriately ## Output Format Provide feedback in categories: - Critical: Must fix before merge - Warning: Should fix, non-blocking - Suggestion: Nice to have improvements - Good: Highlight excellent patterns
Generate comprehensive documentation for code, APIs, or components. Creates markdown docs following best practices.
Generate conventional commit messages following the project style. Analyzes staged changes and creates properly formatted commits.
Create and execute a phases-based plan for complex tasks. Divides work into structured phases with individual step tracking.