/code-review:postfrom code-review
Publishes an existing code-review report to a GitLab MR as inline draft comments with a summary and verdict. Requires a prior /code-review:full run.
Ships in code-review. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Post the code-review report from this session to the current GitLab merge request as one review: inline diff comments (for findings anchored to specific file/line locations) written as GitLab draft notes, then published together with one summary note (for everything else plus the final verdict). The MR gets one notification, and nobody, human or watcher, sees a half-posted review.
This command only posts. It does not re-run the review and it does not re-analyze the diff. If no review report exists in this session, stop and tell the user to run /code-review:full first.
The report must already exist in this session's conversation history, produced by an earlier /code-review:full run. Do NOT search the filesystem, do NOT re-derive findings from the diff, do NOT re-launch review agents.
No code-review report found in this session. Run
/code-review:fullfirst, then re-run/code-review:post.
Do not invent findings. Use only what the existing report says.
Before making any GitLab calls, invoke the glab:glab-discussion skill to load its usage guidance for MR diff comments, replies, and standalone discussions.
If the skill is unavailable, stop and tell the user.
Drafts need the glab-discussion that glab-cli-extras provides. If a glab-discussion call fails with an unknown command or flag, run glab-discussion drafts --help. If that fails too, stop and tell the user to install it with uv tool install glab-cli-extras, after uv tool uninstall glab-discussion when the old standalone package is still installed.
You should already know the MR from the /code-review:full context loaded earlier in this session. Use that MR. If the MR is ambiguous or missing, ask the user for the MR URL before posting anything.
Then run glab-discussion read and look for pending drafts: draft-<id>.txt files and [DRAFT] (draft:<id>) blocks inside thread files. GitLab shows a user only their own drafts, and the publish in Phase 7 publishes every one of them, so sort them before you write anything:
<!-- code-review:post --> or <!-- code-review:watch --> is left over from an earlier run that never published. It goes out with this review. Delete it with glab-discussion delete draft:<id> when it duplicates a finding of this run or is an earlier run's summary, which this run's summary replaces; fix it with glab-discussion edit draft:<id> --body - < <file> when it is outdated.Group every finding from the report into exactly one of two buckets:
Every finding ends up exactly once — never both.
The report's Migration Safety entries are a third bucket of their own. Every entry is an inline diff comment anchored on the assessed statement in the migration file, and it is posted whatever its verdict — a Run anytime verdict is what the author and the approver need to see before they deploy. Never fold an assessment into a finding thread, and never move it to the summary. A Do not run as written verdict also has a Blocking finding in the report; that finding is a normal inline comment on the same file, and it points at the assessment thread rather than repeating it.
For each file that has at least one inline-bucket finding, run:
glab-discussion diff --file <path>
Do not dump the whole MR diff in one call — iterate per file. This keeps output focused and avoids overwhelming context.
From that output, extract the SHAs and line refs you need to anchor a diff note (base/head/start SHAs, old/new line numbers, position type). The glab:glab-discussion skill documents the exact fields required by glab-discussion write for a diff note.
If a finding's intended line is not actually present in the diff (e.g. the agent flagged surrounding code that wasn't changed), move that finding to the summary bucket — do not post a diff comment on an unchanged line.
A migration safety entry anchors on the first line of the statement it assesses (the report carries it as path:LINE). When that line is not in the diff — the migration was reworked and the line moved — anchor on the statement's new first line, and when the file is no longer in the diff at all, drop the entry and tell the user.
For each inline finding, write one diff comment with glab-discussion write --draft. Use a consistent body format so threads are easy to scan:
**[<severity>]** <short title>
<finding body — what's wrong, why it matters>
<the finding's `mermaid` fence from the report, when it has one>
<suggested fix, if the report has one>
_confidence: <n>/100 · from `/code-review:full` (<agent-name>)_
<!-- code-review:post -->
<severity> is one of Blocking, Suggestion, Nitpick, or Positive — mirror the section the finding came from in the report.mermaid fence in the report keeps it in the comment, copied character for character between the body and the suggested fix. Do not redraw it, do not re-wrap it, and do not restate it in a sentence. At most three fences reach the MR — GitLab auto-renders 2000 characters of mermaid per page and the budget is shared. If the report somehow holds more, post the ones on Blocking findings first, drop the fences off the rest, and say so in Phase 8.Write each migration safety entry as its own draft thread, in file order, with this body:
**[Migration safety]** <verdict> — `<statement, shortened to one line>`
**Verdict: <Run anytime | Run in low-traffic hours | Do not run as written>.** <one sentence: why, and the one thing that can go wrong>
**What happens** (<engine> <version>, <from `SELECT version()` on `<connection>` | inferred from `<file>`>)
<lock phases, rewrite or scan, what concurrent reads and writes see>
**Size and duration**
<rows and bytes per database, expected wall time as a range>
**Replication**
<what the replicas and any CDC consumer do, expected lag>
**What could go wrong**
1. <failure mode — its bound — the state it leaves for the retry>
**Sources:** <documentation URLs>; <live values from `<connections>` (read-only) | project files: `<paths>`>
_from `/code-review:full` (review-release)_
<!-- code-review:post -->
Keep the numbers and the URLs from the report. The reader of this thread decides when to deploy; a verdict without its reasons is not enough for that.
If a glab-discussion write --draft call fails with a transient error (a timeout, a 5xx, a dropped connection), retry it once. If the retry fails too, or the error is not transient (a 401 or 403, a missing glab-discussion, an unknown command or flag — see the version check in Phase 2), stop and show the error. Nothing is public yet: only the user sees the drafts written so far. Report which drafts exist (glab-discussion read lists them) and ask whether to finish the rest and publish, or delete them all with glab-discussion drafts delete --force. Do not silently skip a finding and continue.
Write exactly one summary to a file. It is not a separate comment: it is the body of the publish below, which posts it as a new top-level MR note together with every draft. Structure:
## Code review summary
<one-paragraph verdict — looks good / has issues / needs discussion>
### Blocking (not anchored to diff)
- ...
### Suggestions (not anchored to diff)
- ...
### Nitpicks (not anchored to diff)
- ...
### Positive notes
- ...
### Migration safety
- `<migration file>` — <verdict>
### Unresolved MR discussions
- <thread> — addressed / partially addressed / still open
### Coverage
- Agents run: <list>
- Agents skipped: <agent — one-line reason>, or "none"
- Findings dropped in validation: <n>, or "none"
### Verdict
<final call: approve, request changes, or needs discussion — and why>
_Generated from a `/code-review:full` report and posted via `/code-review:post`._
<!-- code-review:post -->
Every body ends with the signature line, following the glab:glab-discussion skill's comment-signing convention. A command that runs these steps on its own behalf replaces it with its own signature.
A summary-bucket finding whose report entry carries a mermaid fence keeps it under its own bullet, unchanged, and it counts against the same three-fence budget as the inline ones.
Only include sections that have content. Skip empty sections rather than printing "none". Coverage is never empty — at minimum it lists the agents that ran. Carry its lines straight from the report's Coverage section.
Inline-anchored findings live in the diff threads, not here — do not duplicate them in the summary. The one exception is the migration safety list: one line per migration with its verdict, so the approver sees every verdict in one place. The reasons stay in the diff thread.
Publish the drafts and the summary as one review:
glab-discussion drafts publish --body - --verdict <verdict> < <summary file>
--verdict requested-changes when the summary's ### Verdict requests changes or the review has a Blocking finding; --verdict reviewed otherwise.approve. The publish runs with the user's token, and approving the MR is a human's decision (teamwork:review-handshake). An approve recommendation stays text in the summary.--verdict. Without it, the publish refuses and publishes nothing when the user gave this MR a verdict before.If the publish fails, say so plainly and quote its output. A non-zero exit usually means nothing was published. When the output says the drafts were published but the verdict was not applied, the review is public without its verdict: report exactly that.
After a successful publish, run glab-discussion read --dump once. A draft has only its draft:<id> and no URL; the dump gives each published thread its discussion id and the summary note its link.
After publishing, reply in the conversation with:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
3 skills in this plugin
/fullcode-review:fullFull multi-agent code review of current branch — context, exploration, parallel review, validation/watchcode-review:watchReview the current branch's MR, post the findings, then watch it with a background glab-watch task until every blocker and suggestion is addressed or refutednpx claudepluginhub fprochazka/claude-code-plugins --plugin code-reviewOther plugins' skills for the same job