Note: Bundled scripts ship as Markdown reference (.md) — copy the code out of the .md file to run it.
Code Reviewer
Automated code review tools for analyzing pull requests, detecting code quality issues, and generating review reports.
Table of Contents
Tools
PR Analyzer
Analyzes git diff between branches to assess review complexity and identify risks.
# Analyze current branch against main
python scripts/pr_analyzer.py /path/to/repo
# Compare specific branches
python scripts/pr_analyzer.py . --base main --head feature-branch
# JSON output for integration
python scripts/pr_analyzer.py /path/to/repo --json
What it detects:
- Hardcoded secrets (passwords, API keys, tokens)
- SQL injection patterns (string concatenation in queries)
- Debug statements (debugger, console.log)
- ESLint rule disabling
- TypeScript
any types
- TODO/FIXME comments
Output includes:
- Complexity score (1-10)
- Risk categorization (critical, high, medium, low)
- File prioritization for review order
- Commit message validation
Code Quality Checker
Analyzes source code for structural issues, code smells, and SOLID violations.
# Analyze a directory
python scripts/code_quality_checker.py /path/to/code
# Analyze specific language
python scripts/code_quality_checker.py . --language python
# JSON output
python scripts/code_quality_checker.py /path/to/code --json
What it detects:
- Long functions (>50 lines)
- Large files (>500 lines)
- God classes (>20 methods)
- Deep nesting (>4 levels)
- Too many parameters (>5)
- High cyclomatic complexity
- Missing error handling
- Unused imports
- Magic numbers
Thresholds:
| Issue |
Threshold |
| Long function |
>50 lines |
| Large file |
>500 lines |
| God class |
>20 methods |
| Too many params |
>5 |
| Deep nesting |
>4 levels |
| High complexity |
>10 branches |
Review Report Generator
Combines PR analysis and code quality findings into structured review reports.
# Generate report for current repo
python scripts/review_report_generator.py /path/to/repo
# Markdown output
python scripts/review_report_generator.py . --format markdown --output review.md
# Use pre-computed analyses
python scripts/review_report_generator.py . \
--pr-analysis pr_results.json \
--quality-analysis quality_results.json
Report includes:
- Review verdict (approve, request changes, block)
- Score (0-100)
- Prioritized action items
- Issue summary by severity
- Suggested review order
Verdicts:
| Score |
Verdict |
| 90+ with no high issues |
Approve |
| 75+ with ≤2 high issues |
Approve with suggestions |
| 50-74 |
Request changes |
| <50 or critical issues |
Block |
Reference Guides
Code Review Checklist
references/code_review_checklist.md
Systematic checklists covering:
- Pre-review checks (build, tests, PR hygiene)
- Correctness (logic, data handling, error handling)
- Security (input validation, injection prevention)
- Performance (efficiency, caching, scalability)
- Maintainability (code quality, naming, structure)
- Testing (coverage, quality, mocking)
- Language-specific checks
Coding Standards
references/coding_standards.md
Language-specific standards for:
- TypeScript (type annotations, null safety, async/await)
- JavaScript (declarations, patterns, modules)
- Python (type hints, exceptions, class design)
- Go (error handling, structs, concurrency)
- Swift (optionals, protocols, errors)
- Kotlin (null safety, data classes, coroutines)
Common Antipatterns
references/common_antipatterns.md
Antipattern catalog with examples and fixes:
- Structural (god class, long method, deep nesting)
- Logic (boolean blindness, stringly typed code)
- Security (SQL injection, hardcoded credentials)
- Performance (N+1 queries, unbounded collections)
- Testing (duplication, testing implementation)
- Async (floating promises, callback hell)
Languages Supported
| Language |
Extensions |
| Python |
.py |
| TypeScript |
.ts, .tsx |
| JavaScript |
.js, .jsx, .mjs |
| Go |
.go |
| Swift |
.swift |
| Kotlin |
.kt, .kts |
1---2name: code-reviewer3description: Code review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin. Analyzes PRs for complexity and risk, checks code quality for SOLID violations and code smells, generates review reports. Use when reviewing pull requests, analyzing code quality, identifying issues, generating review checklists.4metadata:5 source: https://skillmd.com/skills/neekware/code-reviewer6---78> **Note:** Bundled scripts ship as Markdown reference (`.md`) — copy the code out of the `.md` file to run it.910# Code Reviewer1112Automated code review tools for analyzing pull requests, detecting code quality issues, and generating review reports.1314---1516## Table of Contents1718- [Tools](#tools)19 - [PR Analyzer](#pr-analyzer)20 - [Code Quality Checker](#code-quality-checker)21 - [Review Report Generator](#review-report-generator)22- [Reference Guides](#reference-guides)23- [Languages Supported](#languages-supported)2425---2627## Tools2829### PR Analyzer3031Analyzes git diff between branches to assess review complexity and identify risks.3233```bash34# Analyze current branch against main35python scripts/pr_analyzer.py /path/to/repo3637# Compare specific branches38python scripts/pr_analyzer.py . --base main --head feature-branch3940# JSON output for integration41python scripts/pr_analyzer.py /path/to/repo --json42```4344**What it detects:**4546- Hardcoded secrets (passwords, API keys, tokens)47- SQL injection patterns (string concatenation in queries)48- Debug statements (debugger, console.log)49- ESLint rule disabling50- TypeScript `any` types51- TODO/FIXME comments5253**Output includes:**5455- Complexity score (1-10)56- Risk categorization (critical, high, medium, low)57- File prioritization for review order58- Commit message validation5960---6162### Code Quality Checker6364Analyzes source code for structural issues, code smells, and SOLID violations.6566```bash67# Analyze a directory68python scripts/code_quality_checker.py /path/to/code6970# Analyze specific language71python scripts/code_quality_checker.py . --language python7273# JSON output74python scripts/code_quality_checker.py /path/to/code --json75```7677**What it detects:**7879- Long functions (>50 lines)80- Large files (>500 lines)81- God classes (>20 methods)82- Deep nesting (>4 levels)83- Too many parameters (>5)84- High cyclomatic complexity85- Missing error handling86- Unused imports87- Magic numbers8889**Thresholds:**9091| Issue | Threshold |92| --------------- | ------------ |93| Long function | >50 lines |94| Large file | >500 lines |95| God class | >20 methods |96| Too many params | >5 |97| Deep nesting | >4 levels |98| High complexity | >10 branches |99100---101102### Review Report Generator103104Combines PR analysis and code quality findings into structured review reports.105106```bash107# Generate report for current repo108python scripts/review_report_generator.py /path/to/repo109110# Markdown output111python scripts/review_report_generator.py . --format markdown --output review.md112113# Use pre-computed analyses114python scripts/review_report_generator.py . \115 --pr-analysis pr_results.json \116 --quality-analysis quality_results.json117```118119**Report includes:**120121- Review verdict (approve, request changes, block)122- Score (0-100)123- Prioritized action items124- Issue summary by severity125- Suggested review order126127**Verdicts:**128129| Score | Verdict |130| ----------------------- | ------------------------ |131| 90+ with no high issues | Approve |132| 75+ with ≤2 high issues | Approve with suggestions |133| 50-74 | Request changes |134| <50 or critical issues | Block |135136---137138## Reference Guides139140### Code Review Checklist141142`references/code_review_checklist.md`143144Systematic checklists covering:145146- Pre-review checks (build, tests, PR hygiene)147- Correctness (logic, data handling, error handling)148- Security (input validation, injection prevention)149- Performance (efficiency, caching, scalability)150- Maintainability (code quality, naming, structure)151- Testing (coverage, quality, mocking)152- Language-specific checks153154### Coding Standards155156`references/coding_standards.md`157158Language-specific standards for:159160- TypeScript (type annotations, null safety, async/await)161- JavaScript (declarations, patterns, modules)162- Python (type hints, exceptions, class design)163- Go (error handling, structs, concurrency)164- Swift (optionals, protocols, errors)165- Kotlin (null safety, data classes, coroutines)166167### Common Antipatterns168169`references/common_antipatterns.md`170171Antipattern catalog with examples and fixes:172173- Structural (god class, long method, deep nesting)174- Logic (boolean blindness, stringly typed code)175- Security (SQL injection, hardcoded credentials)176- Performance (N+1 queries, unbounded collections)177- Testing (duplication, testing implementation)178- Async (floating promises, callback hell)179180---181182## Languages Supported183184| Language | Extensions |185| ---------- | --------------------- |186| Python | `.py` |187| TypeScript | `.ts`, `.tsx` |188| JavaScript | `.js`, `.jsx`, `.mjs` |189| Go | `.go` |190| Swift | `.swift` |191| Kotlin | `.kt`, `.kts` |