SuperAPI AI Directory

code-reviewer

Coding & development

View repository

Updated 10-16 01:37

About this skill

Code Review

Use a context-isolated subagent to perform an in-depth code review.

Trigger Conditions

  • The user requests a code review
  • The user mentions keywords such as "code review", "code review", "review code", etc.
  • The user requests a check of security, performance, or code quality

Steps

Step 1: Collect the review scope

Determine the target the user wants reviewed:

  • Specific file paths or directories
  • Current git changes (uncommitted or most recent commit)
  • PR number

If the user does not specify explicitly, review the current git changes by default:

git diff --name-only HEAD~1

Step 2: Launch the review subagent

Read the code-reviewer.md in this directory to get the full review prompt, then use the Agent tool to spawn a subagent:

  • description: "In-depth code review"
  • prompt: Use the content of code-reviewer.md as the system prompt, attaching the code content or change scope to be reviewed
  • model: Read code-reviewer.md in the frontmatter's model field to decide (if unspecified, default to sonnet)

Step 3: Output the review results

Output the review results returned by the subagent directly to the user, without summarizing or abbreviating.