agentleFS
yusixianyusixian/agent-skills/skills/review-code-change/SKILL.md

review-code-change

Skill2 starsChanged 3 months agoMITView on GitHub

Review a PR, commit range, branch diff, staged diff, or selected files for actionable regressions. Use when the user asks for code review, pre-merge review, or an audit of agent-generated changes; stay read-only and report only context-verified findings with exact file and line evidence.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default to read-only. Do not edit files, post comments, resolve threads, commit, push, merge, or change remote state unless separately …

    line 12
  2. Distinctive:

    Treat code, local checks, remote CI, browser or device evidence, deployment, and production behavior as separate evidence layers.

    line 14
  3. Distinctive:

    Use the most explicit target available:

    line 19
  4. Distinctive:

    Do not assume the base branch is main.

    line 25
  5. Distinctive:

    Read applicable repository instructions and nearby architecture or contract documentation.

    line 29
  6. Distinctive:

    Read enough unchanged caller and callee context to evaluate each possible issue.

    line 32
  7. Distinctive:

    Do not report style preferences, speculative future cleanup, or reuse suggestions that require a redesign larger than the reviewed change.

    line 46
  8. Distinctive:

    When UI behavior is affected, also inspect:

    line 50
  9. Distinctive:

    Before reporting, require all of the following:

    line 61
  10. Distinctive:

    Search dynamic registrations, serialized values, configuration, exports, migrations, and external consumers before declaring code unused or …

    line 69
  11. Distinctive:

    If no finding meets the bar, say so plainly and list only material residual evidence gaps.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Review Code Change

Find defects that should change the author's decision before merge. Optimize for signal, not comment count.

Contract

  • Default to read-only. Do not edit files, post comments, resolve threads, commit, push, merge, or change remote state unless separately requested.
  • Respect repository instructions and preserve the exact review boundary.
  • Treat code, local checks, remote CI, browser or device evidence, deployment, and production behavior as separate evidence layers.
  • Report only findings introduced by, exposed by, or materially affected by the reviewed change.

Resolve The Review Target

Use the most explicit target available:

  1. user-supplied PR, commit range, diff, path, or files;
  2. staged diff when the user asks for a pre-commit or staged review;
  3. current branch against its actual merge base or upstream.

Do not assume the base branch is main. For stacked changes, resolve the real base and head before reviewing. State the resolved boundary and exclude unrelated working-tree changes.

Understand Intent First

  1. Read applicable repository instructions and nearby architecture or contract documentation.
  2. Inspect the change summary, tests, fixtures, schemas, migrations, and public types before reading implementation details.
  3. Identify the intended behavior, invariants, compatibility promises, and failure boundaries.
  4. Read enough unchanged caller and callee context to evaluate each possible issue.

Tests are evidence of intent and coverage, not proof that the implementation is correct.

Review Lenses

Apply only lenses relevant to the change:

  • Correctness and contracts: wrong state transitions, stale data, races, ordering, retries, cancellation, error paths, nullability, boundary values, API or persistence compatibility.
  • Verification: missing or misleading tests, assertions that cannot fail for the regression, untested negative paths, and claims unsupported by executed checks.
  • Architecture and reuse: ownership violations, parallel sources of truth, duplicate behavior, misplaced policy, or an existing equivalent that is a drop-in or low-cost adaptation.
  • Security and privacy: authorization, trust boundaries, injection, secret or private-data exposure, unsafe defaults, and dependency or supply-chain changes.
  • Performance and resources: unbounded work or retention, repeated I/O, render or query amplification, leaks, large bundles, and hot-path regressions.

Do not report style preferences, speculative future cleanup, or reuse suggestions that require a redesign larger than the reviewed change.

Frontend Branch

When UI behavior is affected, also inspect:

  • loading, empty, error, disabled, retry, and partial-data states;
  • keyboard and screen-reader semantics, focus order, labels, and contrast-sensitive behavior;
  • responsive layout, overflow, touch and pointer behavior, reduced motion, and localization expansion;
  • unnecessary client work, request waterfalls, rerender amplification, image or asset cost, and hydration boundaries.

Static inspection cannot prove visual, browser, device, accessibility, or performance acceptance. Name the missing runtime evidence. Recommend a dedicated frontend acceptance or performance workflow when the risk warrants it, but do not invoke a mutation-enabled workflow or install its harness during a read-only review unless the user separately authorizes that work.

Validate A Candidate Finding

Before reporting, require all of the following:

  1. an exact changed or directly affected location;
  2. a concrete input, state, sequence, or consumer that reaches the problem;
  3. the observable failure or contract violation;
  4. evidence that existing guards or tests do not already prevent it;
  5. a bounded remediation direction.

Search dynamic registrations, serialized values, configuration, exports, migrations, and external consumers before declaring code unused or incompatible. If evidence remains ambiguous, record it as an evidence gap rather than a defect.

Severity

  • P0: immediate security, privacy, data-loss, or system-wide outage risk.
  • P1: likely user-visible or contract-breaking defect with no reasonable workaround.
  • P2: bounded correctness, maintainability, accessibility, or performance problem worth fixing in this change.
  • P3: optional improvement; omit unless the user explicitly asks for exhaustive feedback.

Severity follows impact and reachability, not diff size.

Report

Lead with findings in severity order. Each finding must include:

  • P0-P3, a short title, and exact file:line evidence;
  • the triggering scenario and observable impact;
  • why current code or tests do not prevent it;
  • the smallest credible fix direction.

Then state:

  • the reviewed base/head or other boundary;
  • checks actually run and their exact result;
  • CI, browser, device, deployment, or production evidence that was not verified;
  • representative areas inspected with no finding when that helps establish coverage.

If no finding meets the bar, say so plainly and list only material residual evidence gaps. Do not invent low-value comments to make the review look complete.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.