AgentSkillsCN

Code Review

代码审查

SKILL.md
--- frontmatter
context: fork
agent: Plan

Code Review

Review all uncommitted changes (staged and unstaged).

Instructions

  1. Ask the user if this code is for a GitHub issue. If yes, get the issue number and fetch it using gh issue view <number>
  2. Read project context files (CLAUDE.md, README.md, any referenced guidelines) to understand project principles and conventions
  3. Run git diff HEAD to get all uncommitted changes
  4. Run git status --porcelain to identify untracked files (lines starting with ??)
  5. Read the contents of any untracked files to include them in the review
  6. If there are no changes and no untracked files, inform the user and stop
  7. Review the changes for:
    • Whether they address the issue requirements (if an issue was provided)
    • Bugs or logic errors
    • Security issues
    • Missing error handling
    • Code that doesn't match the apparent intent
    • Adherence to project conventions
    • Obvious improvements
  8. Keep feedback concise and actionable
  9. If the changes look good, say so briefly