code-reviewer
by @alirezarezvani
Code review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin. Analyzes PRs for complexity and risk, checks code quality for SOLID violations...
clawhub install cs-code-reviewerπ About This Skill
name: "code-reviewer" description: 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.
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/repoCompare specific branches
python scripts/pr_analyzer.py . --base main --head feature-branchJSON output for integration
python scripts/pr_analyzer.py /path/to/repo --json
What it detects:
any typesOutput includes:
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/codeAnalyze specific language
python scripts/code_quality_checker.py . --language pythonJSON output
python scripts/code_quality_checker.py /path/to/code --json
What it detects:
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/repoMarkdown output
python scripts/review_report_generator.py . --format markdown --output review.mdUse pre-computed analyses
python scripts/review_report_generator.py . \
--pr-analysis pr_results.json \
--quality-analysis quality_results.json
Report includes:
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.mdSystematic checklists covering:
Coding Standards
references/coding_standards.mdLanguage-specific standards for:
Common Antipatterns
references/common_antipatterns.mdAntipattern catalog with examples and fixes:
Languages Supported
| Language | Extensions |
|----------|------------|
| Python | .py |
| TypeScript | .ts, .tsx |
| JavaScript | .js, .jsx, .mjs |
| Go | .go |
| Swift | .swift |
| Kotlin | .kt, .kts |