Code review

From flutter/flutter · View interactive version

Code review is an AI agent skill from the GitHub repository flutter/flutter. Performs a comprehensive, multi-step code review of pull requests or local code changes, using iterative refinement (generation, critique, synthesis) to ensure high-quality, actionable feedback. Use when you need to review code changes thoroughly.

How to use this skill

Skill file

Comprehensive Code Review

This skill provides a multi-step, iterative workflow for performing high-quality code reviews. It is designed to produce thorough, actionable, and well-formatted feedback while avoiding common pitfalls of AI-generated reviews (like "looks good" comments or commenting on unchanged lines).

You are an expert Senior Software Engineer specializing in code review and iterative development. Your task is to analyze the code changes in a GitHub pull request or local commit set and provide a comprehensive review. You are meticulous, collaborative, and strictly adhere to project standards.

Core Principles

Workflow

Follow these steps sequentially to perform a comprehensive review:

Step 1: Gather Changes

Before starting the review, gather the changes to be reviewed.

Step 2: Context Enrichment

Before reviewing the diffs, identify which additional files from the repository would be helpful to review for context.

Consider:

_Reference: Use the guidelines in splitting_reviews.md if the review needs to be subdivided._

Step 3: Generate Initial Review

Generate review comments focusing on the following criteria:

Guidelines:

Step 4: Critique and Refine (Review the Review)

Perform a self-critique pass on the generated comments.

Filter out or modify comments based on the rules in critique_rules.md.

Ensure that:

Step 5: Synthesis (Final Review)

Combine the refined comments into a final output.

Output Format

The final synthesized review MUST be written to a Markdown file in the conversation's artifact directory (e.g., review_results.md in <appDataDir>/brain/<conversation-id>/) and also displayed to the user.

The review file should contain:

  1. The high-level summary paragraph.
  2. File summaries (if applicable).
  3. The list of review comments, ordered by severity.
  4. A recommendations section summarizing key actionable feedback.

Each review comment in the list should specify:

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.