/review
Comprehensive code review with context-aware analysis and architectural insights
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/review
Context preview
What this command does when you run it.
Comprehensive code review with context-aware analysis and architectural insights
Command definition
review.mdallowed-tools: Read, Grep, Task, Bash(rg:*), Bash(fd:*), Bash(git:*), Bash(deno:*), Bash(cargo:*), Bash(go:*), Bash(npm:*)
name: "Review"
description: "Comprehensive code review with context-aware analysis and architectural insights"
author: "wcygan"
tags: ["tool"]
version: "1.0.0"
created_at: "2025-07-14T00:00:00Z"
updated_at: "2025-07-14T00:00:00Z"
/review
Context
- Session ID: !`gdate +%s%N || date +%s%N`
- Project type: !`fd -t f 'package.json|deno.json|Cargo.toml|go.mod|pom.xml' -d 1 | head -1 | xargs basename || echo 'unknown'`
- Git status: !`git status --porcelain | head -10 || echo 'Not a git repository'`
- Recent changes: !`git log --oneline -5 --since='1 week ago' || echo 'No recent commits'`
- Current branch: !`git branch --show-current || echo 'No current branch'`
- Build status: !`test -f deno.json && deno check . 2>&1 | tail -3 || test -f Cargo.toml && cargo check --quiet 2>&1 | tail -3 || test -f package.json && npm run build --silent 2>&1 | tail -3 || echo 'No build system detected'`
- Test status: !`test -f deno.json && deno test --quiet 2>&1 | tail -1 || test -f Cargo.toml && cargo test --quiet 2>&1 | tail -1 || test -f package.json && npm test 2>&1 | tail -1 || echo 'No test runner detected'`
- File count: !`fd -t f . | wc -l || find . -type f | wc -l`
- Code files: !`fd -e ts -e js -e rs -e go -e java -e py | wc -l || find . -name '*.ts' -o -name '*.js' -o -name '*.rs' -o -name '*.go' -o -name '*.java' -o -name '*.py' | wc -l`
Your task
STEP 1: Initialize review session
- Load target files from $ARGUMENTS or analyze entire project if no specific targets
- Create session state file: /tmp/review-state-$SESSION_ID.json
- IF analyzing large codebase (>50 files):
**CRITICAL: Deploy parallel sub-agents for maximum performance (10x faster comprehensive review)**
IMMEDIATELY launch 8 specialized parallel review agents:
- **Agent 1: Architecture & Design Patterns**: Analyze system architecture, design patterns, and structural integrity
- Focus: Component relationships, abstraction layers, separation of concerns, architectural violations
- Tools: Dependency analysis, pattern recognition, architectural metrics
- Expected: Architectural assessment with improvement recommendations
- **Agent 2: Security Vulnerability Assessment**: Comprehensive security analysis across all attack vectors
- Focus: Input validation, authentication, authorization, data exposure, injection vulnerabilities
- Tools: Security pattern analysis, vulnerability scanning, OWASP compliance
- Expected: Security risk assessment with prioritized remediation plan
- **Agent 3: Performance & Optimization Review**: Identify performance bottlenecks and optimization opportunities
- Focus: Algorithm efficiency, database queries, memory usage, caching strategies
- Tools: Complexity analysis, profiling patterns, resource utilization assessment
- Expected: Performance optimization roadmap with impact estimates
- **Agent 4: Testing Coverage & Quality Analysis**: Evaluate test completeness, quality, and maintainability
- Focus: Test coverage gaps, test quality metrics, testing strategies, mock usage
- Tools: Coverage analysis, test pattern evaluation, assertion quality assessment
- Expected: Testing improvement plan with coverage targets
- **Agent 5: Dependencies & Technical Debt Evaluation**: Assess dependency health and technical debt accumulation
- Focus: Dependency vulnerabilities, version currency, license compliance, debt patterns
- Tools: Dependency analysis, debt quantification, update impact assessment
- Expected: Dependency management strategy with debt reduction plan
- **Agent 6: Code Quality & Maintainability**: Analyze code quality metrics and maintainability factors
- Focus: Code complexity, duplication, readability, documentation completeness
- Tools: Quality metrics calculation, complexity analysis, documentation assessment
- Expected: Code quality improvement recommendations with refactoring priorities
- **Agent 7: API & Interface Design**: Review API design, interface consistency, and integration patterns
- Focus: API contracts, versioning, backwards compatibility, interface design principles
- Tools: API analysis, contract validation, integration pattern assessment
- Expected: API design recommendations with versioning strategy
- **Agent 8: Configuration & DevOps Review**: Analyze build, deployment, and operational configurations
- Focus: Build scripts, CI/CD pipelines, environment configurations, operational readiness
- Tools: Configuration analysis, pipeline assessment, operational pattern review
- Expected: DevOps optimization recommendations with deployment improvements
**Sub-Agent Coordination:**
- Each agent saves findings to `/tmp/review-agents-$SESSION_ID/`
- Parallel execution provides 10x speed improvement over sequential review
- Cross-agent correlation identifies systemic issues across multiple domains
- Results synthesized into comprehensive review report with actionable priorities
- ELSE:
- Proceed with focused single-agent comprehensive analysis
STEP 2: Context gathering
- Load project configuration files automatically:
- @package.json @deno.json @Cargo.toml @go.mod @pom.xml
- @tsconfig.json @*.d.ts
- @README.md @CLAUDE.md @CHANGELOG.md
- @docker-compose.yml @.env.example
- Discover test files: @**/_.test._ @**/_.spec._
- Identify configuration and infrastructure files
- Map project structure and dependencies
STEP 3: Multi-dimensional analysis
FOR EACH target file or component:
**Architecture Analysis:**
- Design patterns and architectural decisions
- Separation of concerns and modularity
- Code organization and structure
- Interface design and abstractions
**Security Assessment:**
- Input validation and sanitization
- Authentication and authorization
- Data handling and storage
- Potential vulnerabilities and attack vectors
**Performance Evaluation:**
- Algorithm efficiency and complexity
Read more
allowed-tools: Read, Grep, Task, Bash(rg:*), Bash(fd:*), Bash(git:*), Bash(deno:*), Bash(cargo:*), Bash(go:*), Bash(npm:*) name: "Review" description: "Comprehensive code review with context-aware analysis and architectural insights" author: "wcygan" tags: ["tool"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
/review
Context
- Session ID: !`gdate +%s%N || date +%s%N`
- Project type: !`fd -t f 'package.json|deno.json|Cargo.toml|go.mod|pom.xml' -d 1 | head -1 | xargs basename || echo 'unknown'`
- Git status: !`git status --porcelain | head -10 || echo 'Not a git repository'`
- Recent changes: !`git log --oneline -5 --since='1 week ago' || echo 'No recent commits'`
- Current branch: !`git branch --show-current || echo 'No current branch'`
- Build status: !`test -f deno.json && deno check . 2>&1 | tail -3 || test -f Cargo.toml && cargo check --quiet 2>&1 | tail -3 || test -f package.json && npm run build --silent 2>&1 | tail -3 || echo 'No build system detected'`
- Test status: !`test -f deno.json && deno test --quiet 2>&1 | tail -1 || test -f Cargo.toml && cargo test --quiet 2>&1 | tail -1 || test -f package.json && npm test 2>&1 | tail -1 || echo 'No test runner detected'`
- File count: !`fd -t f . | wc -l || find . -type f | wc -l`
- Code files: !`fd -e ts -e js -e rs -e go -e java -e py | wc -l || find . -name '*.ts' -o -name '*.js' -o -name '*.rs' -o -name '*.go' -o -name '*.java' -o -name '*.py' | wc -l`
Your task
STEP 1: Initialize review session
- Load target files from $ARGUMENTS or analyze entire project if no specific targets
- Create session state file: /tmp/review-state-$SESSION_ID.json
- IF analyzing large codebase (>50 files):
**CRITICAL: Deploy parallel sub-agents for maximum performance (10x faster comprehensive review)**
IMMEDIATELY launch 8 specialized parallel review agents:
- **Agent 1: Architecture & Design Patterns**: Analyze system architecture, design patterns, and structural integrity
- Focus: Component relationships, abstraction layers, separation of concerns, architectural violations
- Tools: Dependency analysis, pattern recognition, architectural metrics
- Expected: Architectural assessment with improvement recommendations
- **Agent 2: Security Vulnerability Assessment**: Comprehensive security analysis across all attack vectors
- Focus: Input validation, authentication, authorization, data exposure, injection vulnerabilities
- Tools: Security pattern analysis, vulnerability scanning, OWASP compliance
- Expected: Security risk assessment with prioritized remediation plan
- **Agent 3: Performance & Optimization Review**: Identify performance bottlenecks and optimization opportunities
- Focus: Algorithm efficiency, database queries, memory usage, caching strategies
- Tools: Complexity analysis, profiling patterns, resource utilization assessment
- Expected: Performance optimization roadmap with impact estimates
- **Agent 4: Testing Coverage & Quality Analysis**: Evaluate test completeness, quality, and maintainability
- Focus: Test coverage gaps, test quality metrics, testing strategies, mock usage
- Tools: Coverage analysis, test pattern evaluation, assertion quality assessment
- Expected: Testing improvement plan with coverage targets
- **Agent 5: Dependencies & Technical Debt Evaluation**: Assess dependency health and technical debt accumulation
- Focus: Dependency vulnerabilities, version currency, license compliance, debt patterns
- Tools: Dependency analysis, debt quantification, update impact assessment
- Expected: Dependency management strategy with debt reduction plan
- **Agent 6: Code Quality & Maintainability**: Analyze code quality metrics and maintainability factors
- Focus: Code complexity, duplication, readability, documentation completeness
- Tools: Quality metrics calculation, complexity analysis, documentation assessment
- Expected: Code quality improvement recommendations with refactoring priorities
- **Agent 7: API & Interface Design**: Review API design, interface consistency, and integration patterns
- Focus: API contracts, versioning, backwards compatibility, interface design principles
- Tools: API analysis, contract validation, integration pattern assessment
- Expected: API design recommendations with versioning strategy
- **Agent 8: Configuration & DevOps Review**: Analyze build, deployment, and operational configurations
- Focus: Build scripts, CI/CD pipelines, environment configurations, operational readiness
- Tools: Configuration analysis, pipeline assessment, operational pattern review
- Expected: DevOps optimization recommendations with deployment improvements
**Sub-Agent Coordination:**
- Each agent saves findings to `/tmp/review-agents-$SESSION_ID/`
- Parallel execution provides 10x speed improvement over sequential review
- Cross-agent correlation identifies systemic issues across multiple domains
- Results synthesized into comprehensive review report with actionable priorities
- ELSE:
- Proceed with focused single-agent comprehensive analysis
STEP 2: Context gathering
- Load project configuration files automatically:
- @package.json @deno.json @Cargo.toml @go.mod @pom.xml
- @tsconfig.json @*.d.ts
- @README.md @CLAUDE.md @CHANGELOG.md
- @docker-compose.yml @.env.example
- Discover test files: @**/_.test._ @**/_.spec._
- Identify configuration and infrastructure files
- Map project structure and dependencies
STEP 3: Multi-dimensional analysis
FOR EACH target file or component:
**Architecture Analysis:**
- Design patterns and architectural decisions
- Separation of concerns and modularity
- Code organization and structure
- Interface design and abstractions
**Security Assessment:**
- Input validation and sanitization
- Authentication and authorization
- Data handling and storage
- Potential vulnerabilities and attack vectors
**Performance Evaluation:**
- Algorithm efficiency and complexity
A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Other commands on claude-cmd.
- /agent-browser-automation
Automate browser interactions for development testing using Puppeteer MCP
Open command - /agent-prep-merge
Prepare branches for merging across multiple worktrees and coordinate integration
Open command - /agent-persona-accessibility-expert
Transform into accessibility expert for WCAG compliance and inclusive design
Open command - /agent-persona-api-designer
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Open command - /agent-persona-backend-specialist
Transform into backend specialist for scalable API and system design
Open command - /agent-persona-cloud-architect
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies
Open command

