Catalogue / gitlab-code-review
gitlab-code-review
Older skill: source not recordedSignedReviews a GitLab merge request and writes up the critique. Defaults to the project the user is currently working in, resolves the merge request from an IID, a branch or the current branch, fetches the title, description and full diff through the glab MCP server or the glab CLI, examines the changes…--- name: gitlab-code-review description: > Reviews a GitLab merge request and writes up the critique. Defaults to the project the user is currently working in, resolves the merge request from an IID, a branch or the current branch, fetches the title, description and full diff through the glab MCP server or the glab CLI, examines the changes for correctness, security, test and documentation gaps, and delivers grouped findings with a verdict. Can post the review as a comment on the merge request after explicit user confirmation. Use when the user asks for a review, critique or feedback on a GitLab merge request, MR or branch change. Not for GitHub pull requests, creating or editing merge requests, approving, merging, or CI debugging. license: MIT ---
Reviewing a GitLab Merge Request from Ask to Verdict
Turn one GitLab merge request into a critique its author can act on: work out which request is meant, read it, judge it, write the verdict down. Posting that critique to GitLab is a separate step the user must switch on. When the glab MCP server is connected, its tools come first; the glab CLI is the fallback when it is not.
Start with what the ask already tells you
Every review rests on two identifiers: a project path (group/subgroup/repo) and a merge request reference (an IID or a branch). Read the user's request and fill in this grid before touching any tool:
| The user says | Project | MR | Still open | | --- | --- | --- | --- | | A full URL such as https://gitlab.com/northwind/payments-gateway/-/merge_requests/214 | pinned | pinned (214) | nothing — go read | | "Review 214 in northwind/payments-gateway" | pinned | pinned | nothing | | "Look at 214" | default applies | pinned | settle the default, below | | "Review the MR on feature/refund-cap" | default applies | branch known | settle the default | | "Review my MR", said inside a checkout | default applies | current branch | settle the default |
Whatever remains open, collect it into a single question ("Which project, and which MR?") rather than a running dialogue. The next two sections settle each identifier.
Choosing the project: the default, and where it breaks
Unless the user points somewhere else, assume the merge request lives in the project you are already working in — the current project, named by the workspace or repository directory you are operating in. Two rules make that assumption workable:
- Firm it up with the remote when you can. If the current checkout carries a GitLab remote, read the full
namespace/projectpath out of the remote URL: the directory name identifies the repository, and the remote supplies the group or subgroup in front of it. Acting on this default needs no permission — it is where every review without an explicit project begins. - Ask the moment the default stops identifying a project. It fails when you are not inside a Git repository at all (there is no current project to assume), when the repository has no GitLab remote (the directory name cannot be expanded into a full
group/subgroup/repopath), or when the merge request plainly lives elsewhere — the user named a different project, quoted a URL pointing away from the current one, or the conversation is obviously about another codebase.
When you hit a failure, ask once and ask for everything still missing at the same time: the project path or its URL, plus the MR IID or branch if that is unresolved too. Fold any partial evidence into the question — "The checkout is named payments-gateway; which GitLab project should I review?" — rather than promoting that evidence into an answer yourself. The same applies when a remote exists but clearly serves a different project than the one under discussion: say what you see, then ask. Never invent a path to keep moving.
Choosing the merge request: which signal wins
When several signals compete, this order decides:
- An IID the user supplied ("check 214") outranks everything.
- Next, a branch the user named — locate that branch's open merge request.
- With nothing named, take the open merge request on the branch the checkout currently sits on.
- If no merge request claims the branch, or more than one does, report what you found and ask for an IID. Silently taking the first entry of a list means reviewing a change nobody asked about.
Fetching: what to call and what comes back
Pull two artifacts before forming any opinion:
| You need | glab MCP server | glab CLI | Success gives you | | --- | --- | --- | --- | | Title, description, state | the MR detail tool | glab mr view 214 | the author's claim: what the change is for, and its status | | Every changed file and hunk | the MR diff tool | glab mr diff 214 | the whole truth: all files, unified hunks, line numbers | | Either of the above in another project | pass the project to the tool | add -R northwind/payments-gateway | the same, scoped to that project |
Drop the IID from the view and diff commands only when the current branch holds exactly one open MR — then the CLI infers it.
Both commands are read-only; nothing in this skill mutates GitLab until the publishing step at the end. If authentication fails or GitLab reports no such MR, quote the error to the user and stop. Do not improvise a different path or IID and hope one happens to hit.
Fetch both artifacts because each keeps the other honest: the description is the contract the diff is supposed to honour, and the diff is the code that will actually run. Reviewing the diff without the description grades the change against the wrong goal; reading the description without the diff reviews a promise instead of a program.
Judging: hold the claim against the code
Walk every hunk and interrogate it through these lenses:
| Lens | The question the diff must survive | | --- | --- | | Correctness | Does it do what the description promises — boundaries, empty inputs, error paths, inverted conditions? | | Security | Where does untrusted input travel? Are permissions, secrets and injection surfaces handled? | | Tests | Which new behaviors lack coverage? Do existing tests still hold when read carefully? | | Structure | Do the names say what things do? Is logic duplicated or split in odd places? | | Documentation | Which comments, README sections or API docs did this change make stale? |
This is a static review: read the tests, do not run them.
Every finding needs an anchor the author can jump to. Two kinds count:
- Inside a hunk. Name the file plus the hunk header or line numbers. Example:
app/refunds/service.py, hunk@@ -41,9 +41,21 @@—round(amount, 2)applies banker's rounding, so a partial refund of 0.125 becomes 0.12; refund amounts should round half-up. - An omission the change creates. Name the file that should have changed and the behavior that demands it. Example: this MR caps partial refunds, yet
tests/test_refunds.pynever sends a request above the cap, so the rejection branch ships untested. Stale documentation anchors the same way: point at the docs page still describing behavior this diff deletes.
Both anchors are legitimate; the second is how missing-test and stale-doc findings stay reviewable instead of speculative. A finding attached to neither a touched file nor a behavior the diff introduces is taste, not review — leave it out.
Delivering the review
Three blocks, in this order:
- Overview — two to four sentences saying what the MR does and your overall call.
- Findings — three buckets by urgency: Fix first (merging would ship a defect), Worth doing (a real improvement, not required to merge), Optional (polish the author may reasonably skip). Every item carries its anchor, the problem, and the fix or question.
- Verdict — one line: approve, approve with comments, or request changes, plus whatever follow-up that implies.
The verdict is prose inside your review. Submitting an approval in GitLab is a different action, and this skill never performs it — an "approve" written here is a recommendation, not a click.
Publishing on the user's say-so
A comment appears in front of everyone who can read the project, cannot be quietly recalled, and goes out under the user's name. Publication therefore runs on explicit consent, in this order:
- Show the finished review and state plainly that the next step posts it to MR 214.
- Wait for a clear yes. "Review this MR" authorized reading; it did not authorize publishing.
- On a yes, post exactly the text you showed — the MCP note tool, or
glab mr note 214 --messagewith the body quoted so the shell delivers it as one intact message. - A no, hesitation, or silence means the review stays in the conversation. Handing it over there is a complete outcome.
Never post to a different MR than the one you actually read.
Where this skill stops
This skill does not cover creating or editing merge requests, granting approvals, merging, debugging failed pipelines, or anything on GitHub — it reads GitLab MRs, critiques them, and, on confirmation, comments on them.
Its lineage: an adaptation of the MIT-licensed gitlab-mr-review skill from the bowentan/super-agent repository; the MIT license governs this derived version as well.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 9.3 kB | 395533ff898a |
| THIRD_PARTY_NOTICES.md | 1.4 kB | 59beeb1f3662 |
| examples.json | 1.8 kB | 55f11442ca35 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 1.0.0 Current | Not recorded | 10 Oct 2026 |
Locking a skill to one version needs Pro.