# Address Reviewer Inputs on a GitLab Merge Request

Address all open reviewer comments on one GitLab merge request as a single coupled fix set, then reply in each thread. The deliverable is a conventional commit with a mapped input set and coupled changes that pass the final-delta audit.

**Canonical URL:** https://skillshunter.net/skills/discovered-f292e56774b58efa722f611e56bc36b0d2e52aa89999c11f

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-f292e56774b58efa722f611e56bc36b0d2e52aa89999c11f

**Markdown URL:** https://skillshunter.net/skills/discovered-f292e56774b58efa722f611e56bc36b0d2e52aa89999c11f.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-f292e56774b58efa722f611e56bc36b0d2e52aa89999c11f/download

**Category:** Software & Development

**Source URL:** https://gitlab.com/radbatnag/claude-skills/-/blob/05b55872e4e98b79bc052be748b3abd6dccbabe6/skills/address-reviewer-inputs/SKILL.md

**Source commit:** 05b55872e4e98b79bc052be748b3abd6dccbabe6

**Listing approved at:** 2026-11-28

**Created at:** 2026-11-28T07:59:56.000000Z

**Updated at:** 2026-11-28T18:37:52.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Before running, ensure the MR is yours by executing `glab-read.py mine <iid>`. Prepare a session record file named `~/tmp/cc-address-reviewer-inputs-<iid>.md` to track each open discussion, and ensure the `mr-reviews` directory exists for review reports.

### When to use it

- Automatically address all open reviewer comments on a GitLab merge request
- Map reviewer inputs to a single coupled fix set
- Run required tests and linters before committing changes
- Generate a conventional commit with a body when required by project hooks

## Skill instructions

---
name: address-reviewer-inputs
description: Address all open reviewer comments on one GitLab merge request as one coupled fix set, then reply in each thread. Use when the user invokes /address-reviewer-inputs with an MR URL or IID, or asks to address reviewer inputs, review comments, or feedback holistically before replying or re-requesting review.
argument-hint: "<mr-url-or-iid> [--interactive]"
---

# Address Reviewer Inputs

Address the open reviewer input on one GitLab merge request as a single change
set. Run one pass; do not poll. Do not fix or reply to a thread before you map
the complete input set and the coupled changes pass the final-delta audit.

The target is `$ARGUMENTS`. If it is empty, ask the user for the MR. The
`--interactive` flag turns on step 2a, which settles each input with the user
one at a time.

This skill edits source files, commits, pushes, updates MR metadata, and posts
thread replies. The invocation authorizes the local edits and the commit. Get a
separate confirmation before the push and the GitLab writes (step 5, or step 4 of the
deferral path).

## Tool rules

- Read MR fields and threads with `glab-read.py`. It is read-only and calls
  `glab` itself, so the rtk filter never touches its output.
- Run every other `glab` call whose output you must read verbatim through
  `rtk proxy`. The rtk hook filters `glab` output and can show stale data.
- Read patches with `rtk proxy git diff`. A filtered diff drops lines without
  a warning.
- The Bash tool runs zsh. Iterate over lists with `jq -r ... | while read -r`,
  not `for x in $list`.
- Put every scratch file in the session scratchpad directory, with the IID in
  the name.
- Use Read, Edit, and Write for source and ledger edits.
- Ask each decision with `AskUserQuestion`, one topic per question.

## 1. Resolve and pin the MR

Resolve the project and IID from an MR URL. For a bare IID, use the GitLab
project of the current repository.

Before anything else, check that the MR is yours:

```sh
~/.claude/skills/glab-read/scripts/glab-read.py mine <iid> [-R <group>/<project>]
```

If it exits 1, stop and show its line, which names the author and the
title. A mistyped IID is the usual cause.

Read the MR. Record its target branch, source branch, head SHA, description,
author, reviewers, state, and pipeline status.

```bash
~/.claude/skills/glab-read/scripts/glab-read.py mr <iid> -R <group>/<project> \
  --fields iid,state,author,reviewers,source_branch,target_branch,sha,pipeline
```

List the open threads with their reactions. The script drops system notes,
resolved threads, and non-resolvable threads. `--emoji` prints the reaction
names on each root note.
Drop every thread whose reactions include `robot`. The robot reaction marks a
thread that an earlier run handled.

```bash
~/.claude/skills/glab-read/scripts/glab-read.py threads <iid> -R <group>/<project> \
  --unresolved --emoji
```

For each input, record the discussion ID, the root note ID, the author, the
body, the position, the latest reply, and the `confidential` flag (the header
line ends with `confidential`).

If no unhandled review input remains, report that result and stop.

Check the deferral conditions below. Without `--interactive`, when all hold,
skip to the deferral path and ignore steps 2 through 7. Otherwise continue
with step 2. With `--interactive`, always continue with step 2; step 2a
proposes deferral for each row that qualifies.

Fetch the source branch. Run `say "Ta ta tap the key"` immediately before the
fetch when SSH can ask for the hardware key. Confirm that the fetched tip
matches the API head SHA. Work only on the MR source branch.

## 2. Build the input ledger

Write `~/tmp/cc-address-reviewer-inputs-<iid>.md`. Keep this file as the
session record. Make one row for each open discussion.

| ID | Reviewer input | Direct change | Coupled source effects | MR metadata effects | External owner or carrier | Disposition | Status | Skill gap |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |

Leave Disposition empty unless step 2a runs. Without it, every row is a fix.

Fill Skill gap from the author's own review reports for this MR, which sit
in `~/projects/notes/mr-reviews/` as `mr-<iid>-*.md`. The name holds no
project, so a report counts only when the MR title in its heading matches
this MR's. Use `caught` when a report holds a finding for the same defect,
`missed` when reports exist and none does, `no report` when none exists, and
`n/a` for a question or a preference that no check could ask, and for every
row when `~/projects/notes/mr-reviews/` doesn't exist. A report that is older
than the code the thread names doesn't count as `caught`.

To re-read one thread, run `glab-read.py threads <iid> --id <discussion-id-prefix>`,
or `--note <note-id>` when you hold a note ID. Do not filter the discussions
JSON by hand.

Read the cited source and its surrounding section. Read each plan, spec,
issue, or linked MR that the input names. When the plan or a linked carrier
can settle ownership, read it; do not infer ownership from a description.

For each row, identify:

- the exact behavior or wording that the reviewer asks for;
- the source files and sections that need a direct change;
- other passages that use the same term, count, cardinality, owner, or
  antecedent;
- changes to the MR description, scope, dependencies, linked issue, or
  related work;
- the plan step, issue, or MR that owns work outside this MR.

Group rows only when one edit resolves the same claim. When one source line
carries two distinct claims, keep two rows.

Ask the user before an edit in these cases:

- The input has more than one valid design.
- The input contradicts another input.
- The input expands scope past the MR.
- The input needs an owner decision.

Quote the input and state the decision that the user must make.

## 2a. Discuss each input (interactive only)

Run this step only with `--interactive`. It starts after the whole ledger
exists, because an input's coupled effects aren't known until every row is
read. No edit happens before the last row has a disposition.

Take the rows one at a time, in ledger order. For each row, write in plain
text: the quoted input and where it sits, what you read it as asking, the
coupled effects from the ledger, and the disposition you propose with its
reason. Propose Defer for a row that meets the deferral thread conditions
(a `suggestion (non-blocking):` thread from an approver, not confidential),
and Fix for every other row. Then ask the row's question with
`AskUserQuestion`, with the proposal first and marked "(Recommended)":

- **Fix as proposed**: apply the ledger row's change.
- **Fix differently**: the user gives the wording or approach.
- **Defer to a follow-up issue**: file it with the other deferred rows.
- **Decline with a reason**: reply with the reasoning agreed here.

An "Other" answer, a question, or an objection is the chat. Answer it in
plain text, update the row, and ask the same question again. Don't move to the
next row until the user picks a disposition. For Fix differently, settle the
wording in text and update the row's direct change and coupled effects. For
Decline, settle the reply's reasoning in text; it goes into the reply
unchanged.

Write each agreed disposition into the ledger at once. When a later answer
changes the coupled effects of an earlier row, say so and reopen that row.

What each disposition does after the walk:

- **Fix:** steps 3 through 5 apply to these rows. With no Fix row, skip the
  edits, the audit, the commit, and the push; the GitLab writes below still
  run after one confirmation.
- **Defer:** draft one combined issue as in the deferral path (steps 2
  and 3 there), with one task item per deferred row. The confirmation shows
  it, and the write order is the deferral path's. Reply with the issue
  ref. Resolve the thread only when it meets the deferral thread
  conditions; otherwise leave it open for the reviewer.
- **Decline:** reply with the agreed reasoning and don't resolve. The
  reviewer decides whether the reasoning holds. Add nothing to the issue.
  A review bot's thread is the exception: step 6 resolves it after the reply.
- **Merge when the pipeline succeeds** is set only when every row is Defer
  and the deferral conditions hold, as on the deferral path. A mixed set
  never sets it.

## 3. Apply the coupled fix set

Apply every clear fix before any reply. Make the smallest coherent edit.

A reviewer's request for precision isn't applied as written. When an input
asks committed prose to carry a number, a step or MR iid, a section name of
another document, or a status ("open until it merges"), resolve the finding
by cutting the claim, pointing at its source ("the flag cache's lifetime"),
or describing the behavior without naming the other document's part. Each
such addition is a second copy that goes false when its source changes, and
the next round flags it. Say so in the thread reply and give the
replacement. Deferred work is the exception: it names its carrier.

After each source edit, grep the edit's subject (the rule, owner, term, or
count) across the whole document, and read every hit. A passage elsewhere
that says the opposite is a defect, even when it sits far from the edit.
Then check the nearby paragraphs for these defects:

- a pronoun or antecedent that now points at the wrong thing;
- a count, list, or acceptance criterion that is now stale;
- a duplicate statement of a log, audit, error, ownership, or ordering rule;
- a dependency that names an undefined, wrong, or competing landing point;
- a comment or description that no longer matches the code or document.

When an edit changes a code contract (an error's identity or wrap chain, an
exported signature, a return value), grep the changed symbol as a whole word
across its package and the package's tests, and read every hit. A fuzz oracle,
test helper, or table row that still asserts the old contract is a defect. It
can stay green, because `go test` runs a fuzz target's seed corpus only.

Update the MR metadata in the same fix set. Build the change inventory again
from the final diff. Do not write it from memory, and do not append only the
effects of the last thread.

Check that the MR description names these items:

- every material change in the final diff;
- the actual carrier for deferred work;
- the correct plan-step owner for each booked dependency;
- the required issue link and the scope boundary.

Edit only the files that the reviewer inputs and their coupled effects need.

## 4. Final-delta audit

Freeze edits before this audit. `REVIEWED_SHA` is the MR head from step 1.
Compare `REVIEWED_SHA..HEAD` plus uncommitted changes, not the diff from the
target branch.

```bash
git diff --check
git diff --name-only <reviewed-sha>
rtk proxy git diff <reviewed-sha>
```

Update the ledger from the final text and metadata. Mark each row `PASS`,
`NEEDS DECISION`, or `UNRESOLVED` only after these checks:

1. The requested change exists in the final source or metadata.
2. The fix introduced no broken antecedent, stale count, duplicate rule, or
   conflicting owner.
3. Each coupled passage uses the same terms and cardinality.
4. The MR description lists every material change in the final diff.
5. Deferred work names its actual issue or MR carrier. A prose
   cross-reference to an unmerged step or MR names neither: step 3 says
   to describe the behavior instead.
6. After a code-contract change, every reference to the changed symbol was
   re-read and agrees with the new contract.

If any row is `NEEDS DECISION` or `UNRESOLVED`, stop before the commit and ask
the user.

## 5. Verify, commit, and push

Run the checks that the changed files and the repository rules require. For a
documentation-only change, let a normal commit run the format and prose hooks.
For a code change, run the relevant tests and linters before the commit.
If the touched package has a `Fuzz*` target, read its CI job's `-fuzztime`
from `.gitlab-ci.yml` and its includes, and run the target locally for at
least twice that. An edit to a fuzz oracle or an error contract always needs
this run.

Read `git status`, the staged diff, and the recent commit messages before the
commit. Write a conventional commit, with a body when the project hooks need
one. Do not use `--no-verify`, except for the documented test-first
exception of the repository.

After the commit and before the confirmation, review the fix itself, gated
on what `<reviewed-sha>..HEAD` changed. A change under `docs/specs/`,
`docs/plans/`, or `docs/adr/` always gets `/review-spec --delta
<reviewed-sha>`. A Go change gets `/review-branch --delta <reviewed-sha>`
only when it changes a contract: an exported signature, an error's identity
or wrap chain, or a return value. Other Go changes skip it; say so in the
step 7 report. Fix its BLOCKING findings in a new commit and
re-run the step 4 audit on that commit. Put its WARNINGs and OBSERVATIONs in
the ledger and the step 7 report. A delta review is terminal: don't review
the fix again. A BLOCKING finding from `/review-branch --delta` sends that
skill's branch back to a full review, so make it a `NEEDS DECISION` row and
ask the user instead of starting one.

Confirm with `AskUserQuestion` before the first GitLab write. Show the commit
subject, the MR description diff, the text of each reply, and the bot threads
step 6 will resolve. With deferred
rows (step 2a), also show the issue title and body. Make "Push and post" the
recommended option.

Before the push, confirm three facts:

- The worktree is clean.
- HEAD is on the MR source branch.
- The remote source branch still points at `REVIEWED_SHA`.

```bash
git ls-remote origin refs/heads/<source-branch>
say "Ta ta tap the key"
git push origin HEAD
```

Run the `say` line only when SSH can ask for the hardware key. If the remote
branch moved, stop and ask the user. Never rebase or overwrite the changes of
another person.

Write the MR description from a file, then read it back and compare it to
the file.

```bash
glab api --method PUT "projects/<url-encoded-project>/merge_requests/<iid>" \
  --field description=@<scratchpad>/description-<iid>.md
```

## 6. Reply after the shared audit

Post replies only after the pushed head and the MR metadata match the audited
state. Post one reply in each addressed discussion. Reply inside the existing
thread, never as a top-level note. For a confidential thread, such as an
AppSec review, this rule keeps the finding confidential.

Write each reply body to a file and pass it with `--field`. The `--raw-field`
form sends the literal path as the body, and GitLab still answers 201.

```bash
glab api --method POST "projects/<url-encoded-project>/merge_requests/<iid>/discussions/<discussion-id>/notes" \
  --field body=@<scratchpad>/reply-<iid>-<discussion-id>.md
```

Read the new note back and compare its body to the file. A 201 status does not
prove that the right text landed. After the reply checks out, add a robot
reaction to the root note of the discussion.

```bash
glab api --method POST "projects/<url-encoded-project>/merge_requests/<iid>/notes/<note-id>/award_emoji" \
  --field name=robot
```

Each reply states the final result, not an intention. Name the exact source
passage, MR-description section, or linked carrier that resolves the input.
For a source change, give the pushed short SHA. Keep one reply to one review
input. Do not claim that the reviewer accepted the result. Resolve a
discussion only when the user asks or the project workflow allows it. The
deferral path's confirmation counts as the user asking.

Resolve each review bot's thread after its reply checks out. A bot opened it
when its root note's author is `GitLabDuo`, `duo-security-review-gitlab-org`,
or `ai-appsec-security-mr-reviewer-gitlab-org`. No one comes back to resolve a
bot's thread, and an open one blocks the merge. The step 5 confirmation
authorizes these resolves. A row still waiting for a decision gets no reply,
so its thread stays open.

```bash
glab api --method PUT "projects/<url-encoded-project>/merge_requests/<iid>/discussions/<discussion-id>" \
  --field resolved=true
```

Read the discussion back and confirm `resolved` is true on its notes.

## 7. Report

Report these items:

- the pushed SHA and the MR URL;
- the number of reviewed inputs and the number of replies posted;
- the rows that wait for a decision;
- with `--interactive`, each row's disposition and the issue URL, if filed;
- the checks that you ran;
- the bot threads resolved and the discussions that remain open;
- the rows whose Skill gap is `missed` or `no report`, as a count.

Append one line for each of those rows to
`~/projects/notes/skill-gap-candidates.md`, skipping a row whose project, MR
iid, and discussion id are already there. Create the file with this header
when it is missing, and write no other file for this:

```markdown
| Date | Project | MR | Thread | Gap | Report state |
| --- | --- | --- | --- | --- | --- |
```

`Project` is the `<group>/<project>` path from step 1, `Gap` is one sentence
naming what the reviewer found, in the reviewer's terms, and `Report state`
is `missed` or `no report`. When `~/projects/notes/` doesn't exist, skip the
append and say in the report that the gap log was skipped. `/skills-retro` and a
later skill refinement read this file; this skill never edits a skill.

Also append every row whose Skill gap is `caught` or `missed` to
`~/projects/notes/review-thread-tags.md`, under the same skip rule and the
same missing-directory rule. `/skills-retro` scores how often the author's own
review reports missed what a human found, so a `caught` row counts as much as a
`missed` one. Create it with
this header when it is missing:

```markdown
| Date | Project | MR | Thread | Tag |
| --- | --- | --- | --- | --- |
```

`MR` is `!<iid>`, `Thread` is the discussion id, and `Tag` is `caught` or
`missed`.

Re-request review only when the user asks.

## Deferral path

An approval with only non-blocking suggestions needs no fix, commit, or
push. File the suggestions as follow-up work, answer each thread with the
issue ref, resolve the threads, and set the MR to merge.

### Conditions

All of these must hold. Each is a check on API data, so no judgment call is
involved.

- Every open thread's root note starts with `suggestion (non-blocking):`
  and isn't confidential.
- Each thread's author approved the MR. Read the approvers with
  `rtk proxy glab api projects/<url-encoded-project>/merge_requests/<iid>/approvals`.
- No "added … commit" system note postdates the approval's system note, so
  the approval covers the pinned head.

A blocking, unlabeled, or confidential thread, or an approval that doesn't
cover the head, fails the check. Take the step 2 path. A confidential
finding must not be copied into an issue.

### Steps

1. Write the ledger as in step 2, one row per thread. Put "deferred to
   issue" in the direct-change column and leave the source columns empty.
   Read no source files and edit nothing.
2. Search for an existing carrier first. For each root note ID, run
   `glab-read.py search issues <note-id> -R <group>/<project>`. A hit is an
   issue from an earlier, interrupted run. Reuse it and skip the create.
3. Draft one issue for the whole review pass, in
   `<scratchpad>/issue-<iid>.md`. Write it with `natural-writing-style`.
   Open with the MR link and the reason it's deferred. Add one task-list
   item for each suggestion: the file and section, the quoted claim, the
   reviewer's wording or request, and the thread URL
   (`<mr-url>#note_<root-note-id>`). Copy the MR's labels. Set no assignee.
   Don't split it; the user splits at the confirmation.
4. Confirm with `AskUserQuestion`, in one question. Show the issue title and
   body, the text of each reply, the thread resolves, and the merge. Make
   "File, reply, resolve, merge" the recommended option.
5. Write in this order. A resolve is what releases the merge when the
   project requires resolved threads, so it comes after the issue and the
   replies.
   1. Create the issue, then read it back and compare its description to the
      file.
      ```bash
      glab api --method POST "projects/<url-encoded-project>/issues" \
        --field title="<title>" --field labels="<labels>" \
        --field description=@<scratchpad>/issue-<iid>.md
      ```
   2. Reply in each thread as in step 6, with the issue ref
      (`<group>/<project>#<issue-iid>`) and one clause naming the deferred
      change. Don't write "done" or claim acceptance. Read each reply back.
   3. Resolve each thread after its reply checks out.
      ```bash
      glab api --method PUT "projects/<url-encoded-project>/merge_requests/<iid>/discussions/<discussion-id>" \
        --field resolved=true
      ```
   4. Set merge when the pipeline succeeds, pinned to the head.
      ```bash
      glab mr merge <iid> -R <group>/<project> --auto-merge --sha <head-sha> --yes
      ```
      Skip it when auto-merge is already set. Skip it, and say why, when the
      MR is a Draft, has conflicts, or has a failed pipeline. A running
      pipeline is fine.
6. Report the issue URL, the replies posted, the threads resolved, and the
   merge state. Don't add the robot reaction; a resolved thread already
   drops out of the step 1 listing.

