code-review
Run a code review.
Modes
- Full (default): Review for quality, security, conventions, simplicity, and best practices
- Fast: Review for quality and simplicity only
- Performance: Focus on performance optimization
Process
-
Identify context:
- If code changes are involved: run
jj diff -sfirst to see changed files; then usejj diff -- pathto restrict to specific files/directories - If the user specified specific files or paths, focus on those
- If code changes are involved: run
-
Determine mode based on user request (default to Full)
-
Review the code:
Full Mode — analyze each aspect:
- Quality: Check for bugs, logic errors, error handling issues, and edge cases
- Security: Check for OWASP risks, injection vulnerabilities, auth issues, data exposure
- Conventions: Check naming consistency, code organization, and style adherence
- Simplicity: Check for over-engineering, unnecessary abstractions, and dead code
- Best practices: Research patterns and idioms for the libraries/frameworks in use (use WebSearch/WebFetch as needed)
Fast Mode:
- Quality: Check for bugs, logic errors, and error handling issues
- Simplicity: Check for over-engineering and unnecessary complexity
Performance Mode:
- Analyze for performance bottlenecks, algorithmic complexity, and memory usage
- Suggest concrete optimizations with benchmarks where possible
-
Synthesize findings into a unified report
Output
- Executive Summary
- Critical Issues (Must fix)
- Security Analysis (Full mode only)
- Quality & Logic
- Simplicity & Convention
- Performance & Best Practices
- Quick Wins
More from sirn/dotfiles
code-commit
Commit current changes using jj. Analyzes changes, suggests commit messages following repository conventions, proposes splits if needed, and creates commits. Use ONLY when user explicitly asks to commit changes or create commits.
18gemini-reference
Reference for calling the Gemini CLI agent from other agents. ALWAYS read BEFORE invoking Gemini to ensure correct JSON protocol, session management, and subtask delegation patterns.
18code-quality
Run comprehensive quality checks by orchestrating review, verification, testing, and linting. Use when user asks to check code quality, run full checks, or verify code health.
18context7
Retrieve up-to-date documentation context for libraries using the Context7 API. Use when needing current library documentation (React, Python stdlib, Rust, etc.) BEFORE implementing or writing code.
17code-setup-project
Sets up project development environment (wrapper scripts and/or Nix flake). Use when user wants to set up a development environment, create wrapper scripts, or add a Nix flake.
17code-debug
Debug issues by researching errors and proposing minimal fixes. Use when user asks to troubleshoot or debug a failure.
17