All skills
flutter avatar

/code-review

@7712f53 official
by flutterflutter/skills3k stars
182

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.

Use this Skill: https://skilld.dev/gh/flutter/skills/code-review

This session only. Nothing lands on disk.

referencessplitting_reviews.md

≈704 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Splitting Reviews

This reference document provides guidance on how to subdivide a large or complex code review into smaller, manageable chunks to maintain high quality and avoid context overload.

When to Split a Review

Consider splitting a review when:

  • The diff is large (e.g., > 500 lines or > 10 files).
  • The changes span multiple distinct components or layers (e.g., frontend, backend, database).
  • The PR contains multiple unrelated features or bug fixes (though ideally these should be separate PRs, sometimes they are combined).
  • You notice that your review comments are becoming superficial or missing details in later files.

Strategies for Splitting

1. By File or Component

The most common approach is to review files in logical groups:

  • By Directory: Review files folder by folder if the project is well-organized by feature or component.
  • By Layer: Review database changes first, then backend logic, then frontend UI, then tests. This helps build context sequentially.
  • By File Type: Review core logic files (.ts, .java, .go) separately from configuration files or documentation.

2. By Concern or Perspective

You can also make multiple passes over the same set of changes focusing on different concerns:

  • Pass 1: Correctness and Architecture: Focus solely on whether the code does what it is supposed to do and fits the overall design.
  • Pass 2: Style and Maintainability: Focus on readability, naming conventions, and adherence to style guides.
  • Pass 3: Security and Performance: Focus on potential vulnerabilities and optimization opportunities.

Tooling Support

To assist with splitting large diffs, use the provided Python script: scripts/split_diff.py (inside the directory the SKILL.md is in)

This script can:

  • Read a diff from stdin or a file.
  • Extract a diff from a JSON file (useful if the diff is wrapped in JSON).
  • Split the diff into separate files per changed file in a specified output directory.

Usage Example:

python3 agents/skills/code-review/scripts/split_diff.py --output-dir scratch/diff_chunks < diff.txt

For JSON inputs:

python3 agents/skills/code-review/scripts/split_diff.py --json --json-key diff --output-dir scratch/diff_chunks < input.json

How to Combine Subdivided Reviews

After performing subdivided reviews, use the Synthesis step to create the final output:

  1. Deduplicate: Ensure that the same issue found in multiple passes or files is not reported multiple times unless it manifests differently.
  2. Prioritize: Group comments by severity. Ensure critical and high-severity issues are highlighted at the top.
  3. Cohesiveness: Ensure the tone and style of all comments are consistent, following the natural writing skill.

Source: SKILL.md on GitHub

1 warning1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill performs multi-step code reviews using Git and GitHub CLI. It includes a Python script for managing large diffs. While functionally safe, it processes untrusted code changes which presents a potential surface for indirect prompt injection.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 7712f53. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 5 months ago

README badge

README badge for flutter/skills/code-review

Performs a comprehensive, multi-step code review of pull requests or local code changes using an iterative workflow—generation, critique, and synthesis—to produce actionable feedback on correctness, efficiency, maintainability, and security. Targets the review process itself, avoiding generic praise and focusing only on issues found in modified lines.

Generated from the current SKILL.md.

Does this skill work with GitHub pull requests and local git changes?
Yes. It supports reviewing GitHub PRs using `gh pr view` and `gh pr diff`, and local changes using `git status`, `git diff`, and `git log -p`.
What does this skill focus on when reviewing code?
It checks correctness, efficiency, maintainability, and security. It only adds comments for actual issues or improvement opportunities, not validation or explanation of unchanged code.
Does this skill integrate with other skills?
Yes. It references specialized skills like `api-review` for API design feedback, `code-documentation` for documentation standards, and language/framework-specific skills to align with project best practices.
What format does the final review output use?
Reviews are written as Markdown files with a high-level summary, file summaries, comments ordered by severity (critical, high, medium, low), and a recommendations section with actionable feedback.

Generated from the current SKILL.md. These answers refresh after source changes.