[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-c0289cf1-6e7c-4eb2-b9d4-95e44238288d":3,"$f8an6uo-3vCu2_SZvFptJ5vF42-bJxNnT8JoePC7rF0Y":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"c0289cf1-6e7c-4eb2-b9d4-95e44238288d","code-reviewer","TypeScript、JavaScript、Python、Go、Swift、Kotlin代码审查自动化。分析PR的复杂性和风险，检查代码质量以发现SOLID违规和代码异味，生成审查报告。用于审查拉取请求、分析代码质量、识别问题、生成审查清单。","cat_coding_frontend","mod_coding","alirezarezvani,coding","---\nname: \"code-reviewer\"\ndescription: 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.\n---\n\n# Code Reviewer\n\nAutomated code review tools for analyzing pull requests, detecting code quality issues, and generating review reports.\n\n---\n\n## Table of Contents\n\n- [Tools](#tools)\n  - [PR Analyzer](#pr-analyzer)\n  - [Code Quality Checker](#code-quality-checker)\n  - [Review Report Generator](#review-report-generator)\n- [Reference Guides](#reference-guides)\n- [Languages Supported](#languages-supported)\n\n---\n\n## Tools\n\n### PR Analyzer\n\nAnalyzes git diff between branches to assess review complexity and identify risks.\n\n```bash\n# Analyze current branch against main\npython scripts\u002Fpr_analyzer.py \u002Fpath\u002Fto\u002Frepo\n\n# Compare specific branches\npython scripts\u002Fpr_analyzer.py . --base main --head feature-branch\n\n# JSON output for integration\npython scripts\u002Fpr_analyzer.py \u002Fpath\u002Fto\u002Frepo --json\n```\n\n**What it detects:**\n- Hardcoded secrets (passwords, API keys, tokens)\n- SQL injection patterns (string concatenation in queries)\n- Debug statements (debugger, console.log)\n- ESLint rule disabling\n- TypeScript `any` types\n- TODO\u002FFIXME comments\n\n**Output includes:**\n- Complexity score (1-10)\n- Risk categorization (critical, high, medium, low)\n- File prioritization for review order\n- Commit message validation\n\n---\n\n### Code Quality Checker\n\nAnalyzes source code for structural issues, code smells, and SOLID violations.\n\n```bash\n# Analyze a directory\npython scripts\u002Fcode_quality_checker.py \u002Fpath\u002Fto\u002Fcode\n\n# Analyze specific language\npython scripts\u002Fcode_quality_checker.py . --language python\n\n# JSON output\npython scripts\u002Fcode_quality_checker.py \u002Fpath\u002Fto\u002Fcode --json\n```\n\n**What it detects:**\n- Long functions (>50 lines)\n- Large files (>500 lines)\n- God classes (>20 methods)\n- Deep nesting (>4 levels)\n- Too many parameters (>5)\n- High cyclomatic complexity\n- Missing error handling\n- Unused imports\n- Magic numbers\n\n**Thresholds:**\n\n| Issue | Threshold |\n|-------|-----------|\n| Long function | >50 lines |\n| Large file | >500 lines |\n| God class | >20 methods |\n| Too many params | >5 |\n| Deep nesting | >4 levels |\n| High complexity | >10 branches |\n\n---\n\n### Review Report Generator\n\nCombines PR analysis and code quality findings into structured review reports.\n\n```bash\n# Generate report for current repo\npython scripts\u002Freview_report_generator.py \u002Fpath\u002Fto\u002Frepo\n\n# Markdown output\npython scripts\u002Freview_report_generator.py . --format markdown --output review.md\n\n# Use pre-computed analyses\npython scripts\u002Freview_report_generator.py . \\\n  --pr-analysis pr_results.json \\\n  --quality-analysis quality_results.json\n```\n\n**Report includes:**\n- Review verdict (approve, request changes, block)\n- Score (0-100)\n- Prioritized action items\n- Issue summary by severity\n- Suggested review order\n\n**Verdicts:**\n\n| Score | Verdict |\n|-------|---------|\n| 90+ with no high issues | Approve |\n| 75+ with ≤2 high issues | Approve with suggestions |\n| 50-74 | Request changes |\n| \u003C50 or critical issues | Block |\n\n---\n\n## Reference Guides\n\n### Code Review Checklist\n`references\u002Fcode_review_checklist.md`\n\nSystematic checklists covering:\n- Pre-review checks (build, tests, PR hygiene)\n- Correctness (logic, data handling, error handling)\n- Security (input validation, injection prevention)\n- Performance (efficiency, caching, scalability)\n- Maintainability (code quality, naming, structure)\n- Testing (coverage, quality, mocking)\n- Language-specific checks\n\n### Coding Standards\n`references\u002Fcoding_standards.md`\n\nLanguage-specific standards for:\n- TypeScript (type annotations, null safety, async\u002Fawait)\n- JavaScript (declarations, patterns, modules)\n- Python (type hints, exceptions, class design)\n- Go (error handling, structs, concurrency)\n- Swift (optionals, protocols, errors)\n- Kotlin (null safety, data classes, coroutines)\n\n### Common Antipatterns\n`references\u002Fcommon_antipatterns.md`\n\nAntipattern catalog with examples and fixes:\n- Structural (god class, long method, deep nesting)\n- Logic (boolean blindness, stringly typed code)\n- Security (SQL injection, hardcoded credentials)\n- Performance (N+1 queries, unbounded collections)\n- Testing (duplication, testing implementation)\n- Async (floating promises, callback hell)\n\n---\n\n## Languages Supported\n\n| Language | Extensions |\n|----------|------------|\n| Python | `.py` |\n| TypeScript | `.ts`, `.tsx` |\n| JavaScript | `.js`, `.jsx`, `.mjs` |\n| Go | `.go` |\n| Swift | `.swift` |\n| Kotlin | `.kt`, `.kts` |\n","","imported","https:\u002F\u002Fgithub.com\u002Falirezarezvani\u002Fclaude-skills","user_system_seed","SkillOPIC",true,54,1493,"2026-05-16 13:56:09",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"前端开发","frontend","mdi-language-html5","HTML\u002FCSS\u002FJavaScript\u002F框架相关",1,96,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"781c1ebd-b0cf-448e-bb29-0a452e8f7b97","1.0.0","code-reviewer.zip",30289,"uploads\u002Fskills\u002Fc0289cf1-6e7c-4eb2-b9d4-95e44238288d\u002Fcode-reviewer.zip","982458f8efa3e64df3944aa7e458c4652d02953aed28eda077a90fecb7d384e3","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":4707},{\"path\":\"references\u002Fcode_review_checklist.md\",\"isDirectory\":false,\"size\":7036},{\"path\":\"references\u002Fcoding_standards.md\",\"isDirectory\":false,\"size\":12387},{\"path\":\"references\u002Fcommon_antipatterns.md\",\"isDirectory\":false,\"size\":16536},{\"path\":\"scripts\u002Fcode_quality_checker.py\",\"isDirectory\":false,\"size\":17542},{\"path\":\"scripts\u002Fpr_analyzer.py\",\"isDirectory\":false,\"size\":14549},{\"path\":\"scripts\u002Freview_report_generator.py\",\"isDirectory\":false,\"size\":17486}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]