review
The review slash command analyzes code for quality issues across bugs, security, performance, and readability. It examines either specified files or current git diff changes, then delivers structured feedback organized by severity levels (critical, warnings, suggestions) with specific locations and explanations. Use this command when seeking comprehensive code quality assessment before committing changes or during pull request preparation.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/huangjia2019/claude-code-engineering/HEAD/05-Commands/projects/01-basic-commands/.claude/commands/review.md -o ~/.claude/commands/review.mdreview.md
Review code and provide feedback. Target: $ARGUMENTS (or current git diff if not specified) ## Review Focus Areas 1. **Bugs & Errors**: Logic errors, null checks, edge cases 2. **Security**: Input validation, injection risks, sensitive data 3. **Performance**: Obvious inefficiencies, N+1 queries 4. **Readability**: Naming, complexity, documentation needs ## Steps 1. If file path provided, read that file 2. If no path, run `git diff` to see current changes 3. Analyze the code against the focus areas 4. Provide structured feedback ## Output Format ```markdown ## Code Review ### Summary [One sentence overall assessment] ### Issues Found #### Critical (Must Fix) - [issue]: [location] - [brief explanation] #### Warnings (Should Fix) - [issue]: [location] - [brief explanation] #### Suggestions (Nice to Have) - [suggestion]: [location] - [brief explanation] ### What's Good - [positive observation] ``` ## Guidelines - Be specific about locations (file:line if possible) - Provide actionable feedback - Don't nitpick style unless it impacts readability - Acknowledge good patterns you see
Review code changes for quality, security, and best practices. Proactively use this after code modifications.
Run tests and report results concisely. Use this after code changes to verify everything works.
Analyze log files and extract actionable insights. Use when troubleshooting issues or investigating incidents.
Explore and analyze API-related code. Use when investigating endpoints, routing, or HTTP handling.
Explore and analyze authentication-related code. Use when investigating auth flows, session management, or security.
Explore and analyze database-related code. Use when investigating data models, queries, or persistence.
Analyze root cause of bugs after location is identified. Second step in bug investigation.
Implement bug fixes after analysis is complete. Third step in bug fix pipeline.