AgentSkillsCN

code-reviewer

构建覆盖TypeScript、JavaScript、Python、Swift、Kotlin和Go语言的全方位代码评审流程。适用于审查Pull Request或本地差异、提供代码反馈、识别Bug与性能问题、检验最佳实践与安全风险,并生成结构化的评审清单与报告。内置脚本可分析Git差异、扫描常见问题,并自动生成评审报告。

SKILL.md
--- frontmatter
name: code-reviewer
description: Comprehensive code review workflow for TypeScript, JavaScript, Python, Swift, Kotlin, and Go. Use when reviewing pull requests or local diffs, providing code feedback, identifying bugs/performance issues, checking best practices, security risks, and generating structured review checklists/reports. Includes scripts to analyze git diffs, scan for common issues, and output a review report.

Code Reviewer

Use this skill to do consistent, high-signal reviews across languages.

What to do (workflow)

  1. Scope the change
  • What’s the goal? What are the user-visible effects?
  • Identify risk areas: auth, payments, data loss, concurrency, migrations.
  1. Run automated checks (optional but recommended) From repo root:
bash
# 1) PR / diff analyzer
python3 scripts/pr_analyzer.py

# 2) Quality + security-ish scanner
python3 scripts/code_quality_checker.py . --verbose

# 3) Generate a markdown review report
python3 scripts/review_report_generator.py --out REVIEW_REPORT.md
  1. Manual review passes
  • Correctness: edge cases, error handling, race conditions.
  • Architecture: boundaries, duplication, naming, testability.
  • Security: input validation, secrets, logging PII, authz.
  • Performance: hot paths, unnecessary work, N+1, allocation churn.
  • UX (if UI): accessibility, loading/empty/error states.

What to produce

  • A short summary
  • Blockers (must-fix)
  • Suggestions (nice-to-have)
  • Test plan (what you ran / what to run)

References

  • Checklist: references/code_review_checklist.md
  • Coding standards workflow: references/coding_standards.md
  • Common antipatterns: references/common_antipatterns.md