Repository Code Review
Perform a comprehensive code quality review of an entire repository, analyzing architecture, security, performance, and testing practices. This is for reviewing a whole codebase — for PR-level reviews, use the code-review-skill instead.
Instructions
1. Repository Analysis
- Read
CLAUDE.md, README.md, and CONTRIBUTING.md for project context and conventions.
- Examine the repository structure and identify the primary language/framework.
- Check configuration files (
package.json, requirements.txt, Cargo.toml, go.mod, etc.) to understand the tech stack.
- Identify the project's build system, test framework, and linting setup.
2. Code Quality Assessment
- Scan for code smells, anti-patterns, and potential bugs across the codebase.
- Check for consistent coding style and naming conventions.
- Identify unused imports, variables, dead code, or abandoned files.
- Review error handling and logging practices — are errors caught and handled consistently?
- Run the project's linter if available and report violations.
3. Security Review
- Check for hardcoded secrets, API keys, or passwords. Flag as CRITICAL if found.
- Look for common vulnerabilities: SQL injection, XSS, command injection, path traversal.
- Review authentication and authorization logic for correctness.
- Examine input validation and sanitization at system boundaries.
- Check for insecure dependencies (
npm audit, pip audit, or equivalent).
4. Performance Analysis
- Identify potential performance bottlenecks (inefficient algorithms, N+1 queries, missing indexes).
- Review memory usage patterns and potential leaks.
- Check for unnecessary synchronous blocking, missing caching, or excessive network calls.
- Analyze bundle size and dependency weight where applicable.
5. Architecture & Design
- Evaluate code organization and separation of concerns.
- Check for proper abstraction and modularity — are responsibilities cleanly divided?
- Review dependency management and coupling between modules.
- Assess scalability: will the current architecture support growth?
- Identify architectural debt and areas needing refactoring.
6. Testing Coverage
- Assess existing test coverage: what percentage of critical paths are tested?
- Evaluate test quality — are tests testing behavior or just implementation details?
- Identify areas lacking proper testing (error paths, edge cases, integration points).
- Review test structure and organization for maintainability.
7. Documentation Review
- Evaluate code comments and inline documentation — are complex sections explained?
- Check API documentation completeness.
- Review README accuracy: are setup instructions current and correct?
- Identify undocumented public APIs, configuration options, or architectural decisions.
8. Findings and Recommendations
Structure the output as follows:
Summary
2-3 sentences on overall codebase health and maturity.
Findings
Organize by severity:
CRITICAL — Security vulnerabilities, exposed secrets, data loss risks. Must address immediately.
HIGH — Significant bugs, architectural issues, missing error handling. Should address soon.
MEDIUM — Code quality issues, missing tests, design improvements. Address in normal workflow.
LOW — Style inconsistencies, minor optimizations, documentation gaps. Address opportunistically.
For each finding, include:
- Location — File path(s) and line numbers where applicable
- Issue — Clear description of the problem
- Impact — Why it matters and what could go wrong
- Recommendation — Specific, actionable fix with code example if helpful
Strengths
Call out what the codebase does well — good patterns, clean modules, thorough tests.
Priority Actions
A ranked list of the top 5-10 improvements that would have the highest impact on codebase quality.
1---2name: code-review3description: Whole-repository code quality review covering architecture, security, performance, and testing4---56# Repository Code Review78Perform a comprehensive code quality review of an entire repository, analyzing architecture, security, performance, and testing practices. This is for reviewing a whole codebase — for PR-level reviews, use the `code-review-skill` instead.910## Instructions1112### 1. Repository Analysis1314- Read `CLAUDE.md`, `README.md`, and `CONTRIBUTING.md` for project context and conventions.15- Examine the repository structure and identify the primary language/framework.16- Check configuration files (`package.json`, `requirements.txt`, `Cargo.toml`, `go.mod`, etc.) to understand the tech stack.17- Identify the project's build system, test framework, and linting setup.1819### 2. Code Quality Assessment2021- Scan for code smells, anti-patterns, and potential bugs across the codebase.22- Check for consistent coding style and naming conventions.23- Identify unused imports, variables, dead code, or abandoned files.24- Review error handling and logging practices — are errors caught and handled consistently?25- Run the project's linter if available and report violations.2627### 3. Security Review2829- Check for hardcoded secrets, API keys, or passwords. **Flag as CRITICAL if found.**30- Look for common vulnerabilities: SQL injection, XSS, command injection, path traversal.31- Review authentication and authorization logic for correctness.32- Examine input validation and sanitization at system boundaries.33- Check for insecure dependencies (`npm audit`, `pip audit`, or equivalent).3435### 4. Performance Analysis3637- Identify potential performance bottlenecks (inefficient algorithms, N+1 queries, missing indexes).38- Review memory usage patterns and potential leaks.39- Check for unnecessary synchronous blocking, missing caching, or excessive network calls.40- Analyze bundle size and dependency weight where applicable.4142### 5. Architecture & Design4344- Evaluate code organization and separation of concerns.45- Check for proper abstraction and modularity — are responsibilities cleanly divided?46- Review dependency management and coupling between modules.47- Assess scalability: will the current architecture support growth?48- Identify architectural debt and areas needing refactoring.4950### 6. Testing Coverage5152- Assess existing test coverage: what percentage of critical paths are tested?53- Evaluate test quality — are tests testing behavior or just implementation details?54- Identify areas lacking proper testing (error paths, edge cases, integration points).55- Review test structure and organization for maintainability.5657### 7. Documentation Review5859- Evaluate code comments and inline documentation — are complex sections explained?60- Check API documentation completeness.61- Review README accuracy: are setup instructions current and correct?62- Identify undocumented public APIs, configuration options, or architectural decisions.6364### 8. Findings and Recommendations6566Structure the output as follows:6768#### Summary692-3 sentences on overall codebase health and maturity.7071#### Findings7273Organize by severity:7475**CRITICAL** — Security vulnerabilities, exposed secrets, data loss risks. Must address immediately.7677**HIGH** — Significant bugs, architectural issues, missing error handling. Should address soon.7879**MEDIUM** — Code quality issues, missing tests, design improvements. Address in normal workflow.8081**LOW** — Style inconsistencies, minor optimizations, documentation gaps. Address opportunistically.8283For each finding, include:84- **Location** — File path(s) and line numbers where applicable85- **Issue** — Clear description of the problem86- **Impact** — Why it matters and what could go wrong87- **Recommendation** — Specific, actionable fix with code example if helpful8889#### Strengths90Call out what the codebase does well — good patterns, clean modules, thorough tests.9192#### Priority Actions93A ranked list of the top 5-10 improvements that would have the highest impact on codebase quality.