Code review

From wowsignal-io/pedro · View interactive version

Code review is an AI agent skill from the GitHub repository wowsignal-io/pedro. Review the code and run quick checks.

How to use this skill

Skill file

Code Review

This skill specifies how to review the code on a local feature branch or a range of commits.

Optionally can take into account PR comments.

When to Use This Skill

Instructions

Follow these steps exactly:

Phase 1: Gather Context

  1. Run ${CLAUDE_PLUGIN_ROOT}/scripts/diff.sh to get lines under review. If the user specified

commits or ranges, pass them as arguments.

  1. Launch a sonnet agent to view the diff and commit messages and generate a summary of changes.
  2. Launch a haiku agent to collect existing unresolved PR comments, if any. The agent should run

${CLAUDE_PLUGIN_ROOT}/scripts/comments.sh list.

  1. Launch a haiku agent to collect a list of applicable CLAUDE.md files, which share a path with any

files under review.

Phase 2: Review

Launch 5 agents in parallel to independently review the changes. Each agent should return a list of

issues, with each issue including a description, the reason it was flagged and confidence. The

agents should do the following:

Agent 1: Sonnet CLAUDE.md compliance agent Audit changes for CLAUDE.md compliance. Only consider

CLAUDE.md files that share a path with the file under review.

Agent 2: Opus bug agent Scan for bugs. Focus only on the diff itself without reading extra context.

Flag only significant bugs; ignore nitpicks and likely false positives. Do not flag issues that you

cannot validate without looking at content outside of the git diff.

Agent 3: Opus bug agent Look for problems that exist in the introduced code. Include security

issues, incorrect logic, etc. Only look for issues that are related to the changed code. Consult

non-exhaustive checklists in reference/, but do not be limited by them.

Agent 4: Opus architecture & style agent Look for deviations from the project architecture and

style. Primary concerns: (1) file organization (2) testing strategy (3) architecture and design (4)

maintainability. Agent should flag code that is overly complex, explanations that are too verbose,

tests that are redundant. The threshold for confidence is high: do not flag issues that are

subjective or uncertain.

Agent 5: Opus performance optimizer Look for opportunities to optimize the code. Focus on the

performance checklist in reference/

Important: We only want high-signal issues. This means:

We specifically do not want:

In addition to the above, each subagent should be told the change summary to communicate author

intent and important context.

Phase 3: Double-check and consider comments

For each issue found in the previous phase, launch parallel subagents to validate the issue. These

subagents should get the change summary and a description of the issue. The agent's job is to review

the issue and validate that the stated issue is real and significant. For example, if an issue such

as "variable is not defined", then the subagent's job would be to validate that is actually true in

the code.

For each comment on the PR, launch parallel subagents to investigate. Assign high confidence to

human comments and low confidence to bot comments. The agent's job is to review the issues and

validate that it's real and significant.

Use Opus agents for bugs, logic issues and PR comments and Sonnet agents for CLAUDE.md violations.

Phase 4: Filter

Filter out any issues that were not validated in phase 3. This will give us the final list of

high-signal issues for review.

Phase 5: Present findings

Present the user with a summary. For each issue include:

Phase 6: Resolve Comments, if any

After discussing findings with the user and addressing any valid concerns:

  1. Use ${CLAUDE_PLUGIN_ROOT}/scripts/comments.sh resolve --bot to resolve bot comments.
  2. For human comments, confirm with the user before resolving, then use

comments.sh resolve --human or resolve individually as appropriate.

Review Techniques

Key questions:

Effective feedback is:

Checklists

Use non-exhaustive checklists for consistency and thoroughness. They include:

Important: The checklists are not complete. They point out common issues, but are not a

replacement for a thorough review.

Utility Scripts

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.