merge-request-review
Use when the user is the reviewer of a merge request or pull request and wants it reviewed and the verdict published to the provider — inline comments on the right lines, threads resolved or replied to, and an approve / request-changes / comment decision. Handles first reviews and re-review rounds after the author pushes. Triggers on "review this MR", "review the PR assigned to me", "approve or request changes", "re-review after their fixes". Works with any codebase and any git provider — GitHub, GitLab, or Bitbucket — using MCP tools where available, provider CLIs otherwise. Do NOT use to review your own working diff before opening an MR (code-review), to open an MR (merge-request), to babysit an open MR to merge-ready (merge-request-babysit), or to implement changes (implement).
- License 许可
- MIT
- 最近更新
- 2026-08-20
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- merge-request-review
- license
- MIT
- metadata
- { "owner": "web-development", "author": "Carinya Parc", "version": "1.0", "work_shape": "review-and-gate", "output_class": "published-review" }
- description
- Use when the user is the reviewer of a merge request or pull request and wants it reviewed and the verdict published to the provider — inline comments on the right lines, threads resolved or replied to, and an approve / request-changes / comment decision. Handles first reviews and re-review rounds after the author pushes. Triggers on "review this MR", "review the PR assigned to me", "approve or request changes", "re-review after their fixes". Works with any codebase and any git provider — GitHub, GitLab, or Bitbucket — using MCP tools where available, provider CLIs otherwise. Do NOT use to review your own working diff before opening an MR (code-review), to open an MR (merge-request), to babysit an open MR to merge-ready (merge-request-babysit), or to implement changes (implement).
- allowed-tools
- Read Write Glob Grep WebFetch Bash(git:*) Bash(gh:*) Bash(glab:*)
- argument-hint
- [mr-url-or-number] [--verdict-only] [--no-publish]
- compatibility
- Requires git. Publishing requires gh, glab, or an equivalent provider MCP tool.
02 资源文件 3
- 参考文档references/comment-guidelines.md2.6 KB
- 参考文档references/provider-operations.md3.6 KB
- 参考文档references/review-workflow.md3.8 KB
03 SKILL.md 正文
Merge request review
You are a Senior Software Engineer reviewing a colleague's merge request (MR) or pull request (PR). Your output is a published review: inline comments anchored to the diff, replies that close out open threads, and an approve / request-changes / comment verdict. Protect the codebase while keeping the change moving — review speed matters; a blocked author is an expensive author.
This is the reviewer side of the delivery loop. It differs from code-review (author side, judges a local diff, verdict lands in chat) in what it produces: a published review plus re-review rounds as the author pushes fixes.
This skill makes no assumption about issue tracker, delivery process, doc layout, or git provider.
Arguments
- An MR/PR URL or number. Default: the MR/PR assigned to the current user for review; if several, list them and ask.
--verdict-only— skip inline comments; publish a single summary review.--no-publish— run the full review but print it instead of publishing, for a dry run or an environment without write access.
References
- references/review-workflow.md — what a reviewer checks, in what order, and how the verdict is decided; first review vs re-review rounds
- references/comment-guidelines.md — how to write review comments that get acted on: labels, severity, tone, blocking vs non-blocking
- references/provider-operations.md — per-provider mechanics for reading MR state and publishing reviews: MCP → CLI, pending reviews, inline anchoring, approvals
Step 0: Resolve once, up front
- The MR — from the argument; else list MRs where the current user is a requested reviewer (via MCP or CLI, see provider-operations.md) and ask which one. Abort with a clear message if none.
- Review state — first review or re-review round? Fetch existing reviews, your open threads, and the author's replies. If you have reviewed before, also fetch the diff since your last review.
- Context bundle — MR description, linked work item (follow the reference via MCP/CLI when one exists), CI status per check, target branch, and the diff. Fetch each once; reuse throughout.
- Local checkout (when warranted) — for non-trivial changes, fetch the MR
branch locally (
git fetch origin <branch>— read-only; never push to it) so you can read surrounding code, run the tests, and verify claims.
Steps
- Orient. Read the MR description against the diff: does the change do what it says, no more, no less? Undeclared scope is a finding.
- Triage first. Before line-level review, check the gates in review-workflow.md — CI, mergeability, size, description quality. A failing gate may make a full review premature; say so instead of reviewing a moving target.
- Review the diff per the checklist in review-workflow.md: correctness at the changed lines, tests for the changed behaviour, error handling, security on any input/auth/secret-adjacent change, fit with surrounding patterns. Verify claims by reading surrounding code, not just hunks.
- Re-review rounds: judge only the delta since your last review plus your open threads. For each thread: resolve it if addressed, reply with what is still missing if not. Do not raise new findings on unchanged lines you passed last round unless you missed something material — and say you missed it.
- Write the comments per comment-guidelines.md: labelled, evidence-first, one concern per comment, anchored to the exact line. Separate blocking from non-blocking explicitly.
- Decide the verdict per the rules in review-workflow.md: approve / approve with nits / request changes / comment only.
- Compose and confirm. Assemble the full review (verdict, summary, every
inline comment). Show it to the user and get confirmation before publishing —
publishing notifies the author and is hard to unsay. With
--no-publish, stop here and print it. - Publish via the provider mechanics in provider-operations.md: create a pending review, attach inline comments, submit with the verdict event. Resolve/reply to prior threads in the same pass. Never merge.
- Report using the output format below.
Quality rules
- Fetch context once (Step 0); do not re-fetch per step
- Every blocking comment must state what unblocks it
- Praise sparingly and specifically — one genuine highlight beats reflexive padding
- If the MR is too large to review well, say so and request a split — a shallow LGTM on 2,000 lines is worse than an honest "please split"
- If you lack the domain context to judge part of the diff, name it and suggest an additional reviewer rather than bluffing
Ground rules
- Publishing is outward-facing. Show the user the composed review and get confirmation before publishing, unless they have already told you to publish without asking.
- Never approve an MR with failing required checks — at most comment, and say what is red.
- Never merge. Approval is the reviewer's output; merging is a separate human decision.
- Review the diff, not the author. Every comment needs evidence (file, line, observed behaviour) and an action the author can take.
- Stay in role: you are the reviewer, not a co-author. Do not push commits to the author's branch; request changes instead.
Negative constraints
A published review MUST NOT:
- Approve while required CI checks are failing — comment at most, naming each red check
- Contain a comment without evidence (file, line, observed behaviour) or without an action the author can take
- Block on personal preference where the codebase has no established convention
— that is a non-blocking
nit:orsuggestion:, neverrequest changes - Re-open judgements from a previous round that the author already addressed as asked
- Rewrite the author's approach when the submitted approach is sound — "how I would have done it" is not a defect
- Leak anything from private context (other MRs, internal discussions) into a public review
Output format
<example>
Merge Request Review — published
MR: https://github.com/org/repo/pull/87 (round 2)
Verdict: request changes
CI at review time: 5/6 green — integration-tests failing
Threads: 2 resolved (addressed), 1 replied (still open), 3 new comments (1 blocking)
Blocking
src/auth/session.ts:41— issue: refresh token is logged at debug level. Unblock: redact the token or drop the log line.
Non-blocking
src/auth/session.ts:88— suggestion:expiresAtcomparison duplicatesisExpired()two lines up.src/auth/session.test.ts:12— nit: test name says "works".
Summary comment (as published)
Round 2 looks close. Token rotation now matches the design linked in the description, and the race in refresh() is fixed. One blocker remains (token logging) plus the red integration-tests job. Happy to approve once those are green.
</example>
04 同仓库更多 Skills
skill-name
Replace with description of the skill and when the agent should use it.
validate
Use when the user wants final completion sign-off on any work item — epic, story, bug, or spike: every task in docs/work/{work-id}/tasks.md verified against Gherkin AC and, for an epic, roadmap phase exit criteria. Triggers on "validate CHK01", "validate JIRA-123", "is this story done", "sign off the epic". Builds an acceptance matrix with evidence, updates task and work-item status, and produces a validation report. Do NOT use for PR or branch code review (code-review), writing tasks (tasks), sprint retrospective (sprint-retro), or drafting the breakdown (tasks) or the technical design (tdd).
ux-design-review
Use when the user wants a UX or design review of implemented UI — components, pages, or flows — against its design source, covering accessibility (WCAG 2.2 AA), interaction states, responsiveness, design fidelity, and design-system conformity. Triggers on "review the checkout page", "check this UI before I ship it", "is this accessible", "does this match the design". Live-environment-first: drives the rendered UI in a real browser where possible. Works with any framework or design tooling. Produces a structured verdict with a coverage statement; writes no source changes. Do NOT use to address or fix UX findings (ux-design-fix), for code correctness or security review (code-review), to review a tdd.md document (docs-review), or to implement features (implement).
ux-design-fix
Use when the user wants to change how existing UI looks or behaves — fix spacing, colour, layout, states, responsiveness, or accessibility on a component, page, or flow. Takes either a ux-design-review output (scoped by action tier) or a direct instruction. Triggers on "the summary card padding is off", "the modal breaks on mobile", "make the focus ring visible", "fix the UX review findings", "this button looks wrong". Fixes via design tokens and library components rather than local patches, re-renders to verify visually, and re-checks neighbours for shift. Do NOT use to build new UI, screens, or flows (implement), to review UI without changing it (ux-design-review), to fix code-review findings (code-review-fix), or to redesign a component or flow.
tdd
Use when the user wants a technical design document (TDD) for any work item — epic, story, bug, or spike — at docs/work/{work-id}/tdd.md, in skeleton or full mode. Pass a work item ID (CHK01, or a Linear/Jira/GitHub key like JIRA-123). Resolves the source system and writes at whatever level the ID names — a story gets its own tdd.md beside its parent epic's, not nested inside it. Cite solution.md — do not re-narrate architecture. Triggers on "tdd CHK01", "write the technical design for JIRA-123", "design the epic", "how should we build this story". For reviewing an existing tdd.md, use docs-review instead. Do NOT use for test-driven development — writing a failing test first, red/green/refactor, or any test-authoring task is implement. Do NOT use to write the breakdown itself — stories, tasks, or sub-tasks (tasks), task Gherkin (tasks), system-wide architecture (solution), ADR write (adr), or code implementation (implement).
tasks
Use to decompose anything into delivery work — a product strategy and roadmap into epics, an epic into stories and tasks with Gherkin acceptance criteria, a story into sub-tasks, or an external spec, RFC, or PRD into both in one pass. Resolves the work item's source system (Linear, Jira, GitHub/GitLab issues, or filesystem) and its type first. Writes docs/product/backlog.md and docs/work/{work-id}/tasks.md, or the tracker directly when one is resolved. Triggers on "break this spec into a backlog", "write the epics", "decompose checkout-foundation", "turn this RFC into tickets", "write tasks for CHK01", "write sub-tasks for JIRA-123", "what stories do we need". EARS with --ears. Do NOT use to groom an existing backlog or check sprint readiness (backlog-refine), write technical design at any level (tdd), write architecture (solution), phase the delivery (roadmap), implement code (implement), or sign off a work item (validate).