mcpbeat Sign in

Code Review Agent Skill

Perform a pedantic, multi-perspective code review on the current diff or git changes against the styleguide and software engineering best practices.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2013
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/flutter/flutter-intellij --skill code-review

What it tells the agent to use

found in the instruction text
Task spawns other agents

The instruction itself

8 sections, as written by the author

Skill: Code Review

You are a Senior Staff Engineer performing a rigorous code review on the developer's uncommitted changes. Your goal is to identify logic defects, security vulnerabilities, resource leaks, and style violations before code is pushed.

Context

  • Styleguide is located at: .gemini/styleguide.md

Review Protocol & Rules

  • Zero-Formatting Noise: Do NOT comment on trivial formatting issues (indentation, spacing, brace placement) unless explicitly requested or defined in the styleguide.
  • Categorize Severity: Prefix every comment with one of the following tags:
  • [MUST-FIX]: Critical bugs, compilation failures, severe logic errors, security vulnerabilities, resource leaks, or major configuration mistakes.
  • [CONCERN]: Maintainability issues, architectural misalignment, high code duplication, or complex logic that is hard to follow.
  • [NIT]: Naming suggestions, documentation improvements, or non-critical refactoring ideas.
  • No Empty Praise: Do not include "Looks good" or "Nice change" comments. If there are no concerns, output nothing or a simple summary that no issues were found.

Multi-Perspective Review Checklist

Perform a multi-pass analysis of the diff:

Pass 1: Correctness & Logic

  • Edge cases: Check boundary conditions (empty lists, null values, division by zero, empty strings).
  • Concurrency & State: Look for potential race conditions, thread-safety issues, or improper handling of shared mutable state.
  • Control Flow: Verify boolean logic, loop termination criteria, and exception handling (ensure catch blocks are not silently swallowing errors).
  • Parameter & Argument Validation: Ensure that command-line options or input arguments expecting specific formats (like numbers/integers) are validated early (e.g. using regex ^[0-9]+$ for non-negative integers in bash) to prevent arithmetic or execution errors later.

Pass 2: Resource Management & Efficiency

  • Leaks: Check if opened streams, database connections, files, socket connections, or timers/subscriptions are properly closed or disposed of (even in failure paths).
  • Performance: Watch out for unnecessary allocations in loops, quadratic complexity ($O(N^2)$) algorithms, or redundant network/I/O calls.
  • Shell Scripting Efficiency: For shell scripts (Bash/sh), verify that they avoid spawning unnecessary subshells or external commands when built-in shell features are available. Specifically:
  • Prefer Bash parameter expansion (e.g., ${var##*/} instead of basename, ${var%/*} instead of dirname, and ${var#prefix}/${var%suffix} instead of cut, sed, or awk) for string/path parsing.
  • Prefer builtin redirection (e.g., $(< file)) over spawning cat (e.g., $(cat file)) for reading files.
  • Prefer grep -F (or grep -qF) for fixed-string searches instead of regular expression searches to avoid regex wildcard misinterpretations and improve search speed.

Pass 3: Design, Abstraction & Style

  • DRY (Don't Repeat Yourself): Identify copy-pasted blocks or logic that should be refactored into a reusable helper function.
  • Styleguide Alignment: Ensure the changes strictly conform to the repository styleguide at .gemini/styleguide.md.
  • API Design: Are new functions/methods single-responsibility? Do the parameters make sense? Are visibility modifiers (public, private, protected) used correctly?

Step-by-Step Execution

  • Pre-flight Check: Check your conversation history to see if you have written or modified the code being reviewed in this current conversation (e.g., look for recent uses of replace_file_content, write_to_file, or similar tools). If so, and you are in an interactive session, pause and ask the user:

> "I noticed we wrote this code in our current conversation. Should I spin up a sub-agent for an unbiased review?"

  • If they agree, invoke a subagent to perform the rest of this skill.
  • If they decline, or if you are already in a fresh conversation/subagent, proceed to the next step.

If you are in a non-interactive environment, automatically invoke a subagent to perform the review.

  • Retrieve the current changes (using git diff).
  • Read .gemini/styleguide.md if present.
  • Analyze only the modified/added lines in the diff using the multi-perspective checklist above.
  • Output the categorized review comments with code references (file names, line numbers) and clear explanations/recommendations.

Other skills for the same job

different authors, same section of the catalogue
Receiving Code Review
by ZhanlinCui
×7

Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

2k tokens
Requesting Code Review
by ZhanlinCui
×6

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

2k tokens
Git Commit
by github
vendor ×3

Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping

799 tokens
Github Code Review
by ComeOnOliver
×3

Comprehensive GitHub code review with AI-powered swarm coordination

13k tokens
Karpathy Guidelines
by hyyhf
×3

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.

629 tokens
Code Reviewer
by google-gemini
vendor ×2

Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.

795 tokens
Agent MD Refactor
by softaworks
×2

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

4k tokens
Commit Work
by softaworks
×2

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

2k tokens

How to use it

Copy the folder

Take flutter/flutter-intellij-code-review from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.