agentleFS
kinhluankinhluan/skills/skills/merge-request-review/SKILL.md

merge-request-review

Skill6 starsChanged 6 months agoMITView on GitHub

Review a GitHub pull request, GitLab merge request, or local proposed change against its stated intent, or prepare your own PR for review. Use when the user asks for a PR/MR review, issue-link verification, risk assessment, an approve/request-changes recommendation, or help authoring and answering review comments.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read repository instructions and the PR/MR description.

    line 29
  2. Distinctive:

    Read linked issues and acceptance criteria when accessible.

    line 31
  3. Distinctive:

    Check fit: does the change belong in this component or bounded context?

    line 32
  4. Distinctive:

    Read tests before production code.

    line 33
  5. Distinctive:

    Check validation, documentation, compatibility, security, and rollback.

    line 35
  6. Very specific:

    If the working tree is dirty, avoid checkout operations that could overwrite user changes.

    line 38
  7. Distinctive:

    Do not label preferences as defects.

    line 53
  8. Very specific:

    Use question: when you lack context instead of a fake blocker.

    line 98
  9. Distinctive:

    If no findings exist, say so and name residual risks or tests not run.

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Merge Request Review

Review evidence before style. A review request authorizes read-only inspection; it does not authorize posting comments, changing branches, approving, merging, or modifying the change unless the user asks.

User sovereignty: the agent proposes findings, comments, and a verdict. The user (or a designated maintainer) decides and merges. Never merge on your own initiative, and never override a red build to "just ship".

Authoring your own PR or answering review comments? Follow the PR author guide.

Role Boundaries

ConcernOwnerDo not do here
Correctness, design, tests, readabilityThis review—
Coverage thresholds, Sonar, SAST gatecode-quality-gateDo not pass a PR on lint score alone
Threat model, vulnerability class, secrets policysecurity-analysis, threat-modelingDo not claim a security sign-off
Architecture drift, C4 vs codearchitecture-reviewDo not relitigate an accepted ADR

Language details: python-development, javascript-typescript, golang-development. Design checks: clean-architecture, ddd-tactical. Tests first: tdd-red-green-refactor.

Workflow

  1. Read repository instructions and the PR/MR description.
  2. Identify the base and head revisions without disturbing unrelated local work.
  3. Read linked issues and acceptance criteria when accessible. If you cannot restate the intent in one sentence, say so and stop: the PR is not ready.
  4. Check fit: does the change belong in this component or bounded context? A new dependency, table, or public API may need an ADR.
  5. Read tests before production code. Would they fail for the right reason if the code broke? Missing tests for the claimed behavior is a blocker.
  6. Inspect the complete diff, then trace high-risk behavior into surrounding code.
  7. Check validation, documentation, compatibility, security, and rollback.
  8. Report only actionable findings supported by a concrete failure mode.

If the working tree is dirty, avoid checkout operations that could overwrite user changes. Prefer platform APIs, git diff <base>...<head>, or an isolated worktree when authorized.

Timebox a human-sized review to 30–45 minutes. Needing much longer usually means the PR should be split; recommend the split instead of hero-reviewing it. On a follow-up push, re-review the delta unless the intent changed.

Finding Standard

Each blocking finding must contain:

  • severity and concise title;
  • file and precise location;
  • behavior that fails;
  • conditions that trigger it;
  • impact;
  • the smallest credible fix or test.

Do not label preferences as defects. Avoid requesting broad refactors unless the current change is unsafe or incorrect without them.

Severity

Blocker — must change before merge:

  • behavior contradicts the stated intent;
  • missing or misleading tests for the claimed behavior;
  • broken invariant (aggregate consistency, money/time units, authorization in the wrong layer);
  • dependency rule violation (framework or ORM leaking into the domain);
  • data loss, race, or resource leak;
  • secrets or PII in the diff.

Should-fix — request changes unless the author records a reason:

  • duplication or dead code the change just introduced;
  • an API that makes an invalid state representable when a type could prevent it;
  • a swallowed error path (except: pass, ignored err);
  • a breaking on-disk or schema change without a migration or flag.

Nit — non-blocking; prefix nit: so the author can batch or skip.

Review Priorities

  1. correctness and data integrity;
  2. security and permissions;
  3. concurrency, failure handling, and operational risk;
  4. compatibility and migration safety;
  5. tests that would catch regressions;
  6. maintainability and readability;
  7. style not enforced automatically.

Comment Style

One comment, one action: say what, why, and what done looks like, on the line that should change.

blocker: allocate() still admits a second patient when capacity is 1.
Add test_allocate_rejects_when_capacity_exceeded, then reject in the aggregate, not the HTTP handler.
question: is ESI-1 meant to bypass this cap?

Use question: when you lack context instead of a fake blocker. Offer a suggestion diff rather than a lecture. No sarcasm, and no "this is messy" without a concrete fix.

Verdict

  • Approve: no material findings remain, and you would ship it. Never approve code you did not read.
  • Comment: questions or non-blocking improvements only, or a partial review.
  • Request changes: at least one material, reproducible defect remains. Do not request changes on nits alone.

If no findings exist, say so and name residual risks or tests not run. Never claim a command or CI check passed unless it was actually run or verified.

Output

Lead with findings ordered by severity. Follow with assumptions/questions, then a short change summary and verification note. Keep praise and recap subordinate to defects.

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.