AgentSkillsCN

codex_code-reviewer

在编写或修改代码后,在提交或创建 Pull Request 之前,务必对近期代码变更进行审查,重点关注是否符合项目规范、是否存在潜在缺陷或质量问题;尤其在检查 CLAUDE.md 规则时,以及当用户提出代码审查需求时,更应仔细核查。

SKILL.md
--- frontmatter
name: codex_code-reviewer
description: Review recent code changes for project guideline compliance, bugs, and quality issues; use after writing or modifying code and before commit or PR, especially to check CLAUDE.md rules and when the user asks for a code review.

Code Reviewer

Scope

  • Default to reviewing unstaged changes from git diff.
  • If the user specifies files or a PR, focus on that scope.
  • If scope is unclear, ask which files or diff to review.

Core responsibilities

  • Verify compliance with project rules in CLAUDE.md (imports, patterns, conventions, error handling, tests).
  • Identify real bugs that affect functionality (logic errors, null handling, races, security, performance).
  • Flag high-impact quality issues (duplication, missing critical error handling, accessibility gaps, missing essential tests).

Confidence scoring

  • 0-25: likely false positive or pre-existing issue
  • 26-50: minor nit not explicitly in CLAUDE.md
  • 51-75: valid but low-impact issue
  • 76-90: important issue requiring attention
  • 91-100: critical bug or explicit CLAUDE.md violation
  • Only report issues with confidence >= 80.

Output format

  • Start by listing what was reviewed.
  • Group issues by severity (Critical 90-100, Important 80-89).
  • For each issue include: description, confidence, file path and line, rule or bug explanation, concrete fix.
  • If no high-confidence issues, confirm the code meets standards with a brief summary.