{"data":{"slug":"discovered-f292e56774b58efa722f611e56bc36b0d2e52aa89999c11f","title":"Address Reviewer Inputs on a GitLab Merge Request","summary":"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.","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","download_url":"https:\/\/skillshunter.net\/skills\/discovered-f292e56774b58efa722f611e56bc36b0d2e52aa89999c11f\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_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.","instructions":"---\nname: address-reviewer-inputs\ndescription: 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.\nargument-hint: \"<mr-url-or-iid> [--interactive]\"\n---\n\n# Address Reviewer Inputs\n\nAddress the open reviewer input on one GitLab merge request as a single change\nset. Run one pass; do not poll. Do not fix or reply to a thread before you map\nthe complete input set and the coupled changes pass the final-delta audit.\n\nThe target is `$ARGUMENTS`. If it is empty, ask the user for the MR. The\n`--interactive` flag turns on step 2a, which settles each input with the user\none at a time.\n\nThis skill edits source files, commits, pushes, updates MR metadata, and posts\nthread replies. The invocation authorizes the local edits and the commit. Get a\nseparate confirmation before the push and the GitLab writes (step 5, or step 4 of the\ndeferral path).\n\n## Tool rules\n\n- Read MR fields and threads with `glab-read.py`. It is read-only and calls\n  `glab` itself, so the rtk filter never touches its output.\n- Run every other `glab` call whose output you must read verbatim through\n  `rtk proxy`. The rtk hook filters `glab` output and can show stale data.\n- Read patches with `rtk proxy git diff`. A filtered diff drops lines without\n  a warning.\n- The Bash tool runs zsh. Iterate over lists with `jq -r ... | while read -r`,\n  not `for x in $list`.\n- Put every scratch file in the session scratchpad directory, with the IID in\n  the name.\n- Use Read, Edit, and Write for source and ledger edits.\n- Ask each decision with `AskUserQuestion`, one topic per question.\n\n## 1. Resolve and pin the MR\n\nResolve the project and IID from an MR URL. For a bare IID, use the GitLab\nproject of the current repository.\n\nBefore anything else, check that the MR is yours:\n\n```sh\n~\/.claude\/skills\/glab-read\/scripts\/glab-read.py mine <iid> [-R <group>\/<project>]\n```\n\nIf it exits 1, stop and show its line, which names the author and the\ntitle. A mistyped IID is the usual cause.\n\nRead the MR. Record its target branch, source branch, head SHA, description,\nauthor, reviewers, state, and pipeline status.\n\n```bash\n~\/.claude\/skills\/glab-read\/scripts\/glab-read.py mr <iid> -R <group>\/<project> \\\n  --fields iid,state,author,reviewers,source_branch,target_branch,sha,pipeline\n```\n\nList the open threads with their reactions. The script drops system notes,\nresolved threads, and non-resolvable threads. `--emoji` prints the reaction\nnames on each root note.\nDrop every thread whose reactions include `robot`. The robot reaction marks a\nthread that an earlier run handled.\n\n```bash\n~\/.claude\/skills\/glab-read\/scripts\/glab-read.py threads <iid> -R <group>\/<project> \\\n  --unresolved --emoji\n```\n\nFor each input, record the discussion ID, the root note ID, the author, the\nbody, the position, the latest reply, and the `confidential` flag (the header\nline ends with `confidential`).\n\nIf no unhandled review input remains, report that result and stop.\n\nCheck the deferral conditions below. Without `--interactive`, when all hold,\nskip to the deferral path and ignore steps 2 through 7. Otherwise continue\nwith step 2. With `--interactive`, always continue with step 2; step 2a\nproposes deferral for each row that qualifies.\n\nFetch the source branch. Run `say \"Ta ta tap the key\"` immediately before the\nfetch when SSH can ask for the hardware key. Confirm that the fetched tip\nmatches the API head SHA. Work only on the MR source branch.\n\n## 2. Build the input ledger\n\nWrite `~\/tmp\/cc-address-reviewer-inputs-<iid>.md`. Keep this file as the\nsession record. Make one row for each open discussion.\n\n| ID | Reviewer input | Direct change | Coupled source effects | MR metadata effects | External owner or carrier | Disposition | Status | Skill gap |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- |\n\nLeave Disposition empty unless step 2a runs. Without it, every row is a fix.\n\nFill Skill gap from the author's own review reports for this MR, which sit\nin `~\/projects\/notes\/mr-reviews\/` as `mr-<iid>-*.md`. The name holds no\nproject, so a report counts only when the MR title in its heading matches\nthis MR's. Use `caught` when a report holds a finding for the same defect,\n`missed` when reports exist and none does, `no report` when none exists, and\n`n\/a` for a question or a preference that no check could ask, and for every\nrow when `~\/projects\/notes\/mr-reviews\/` doesn't exist. A report that is older\nthan the code the thread names doesn't count as `caught`.\n\nTo re-read one thread, run `glab-read.py threads <iid> --id <discussion-id-prefix>`,\nor `--note <note-id>` when you hold a note ID. Do not filter the discussions\nJSON by hand.\n\nRead the cited source and its surrounding section. Read each plan, spec,\nissue, or linked MR that the input names. When the plan or a linked carrier\ncan settle ownership, read it; do not infer ownership from a description.\n\nFor each row, identify:\n\n- the exact behavior or wording that the reviewer asks for;\n- the source files and sections that need a direct change;\n- other passages that use the same term, count, cardinality, owner, or\n  antecedent;\n- changes to the MR description, scope, dependencies, linked issue, or\n  related work;\n- the plan step, issue, or MR that owns work outside this MR.\n\nGroup rows only when one edit resolves the same claim. When one source line\ncarries two distinct claims, keep two rows.\n\nAsk the user before an edit in these cases:\n\n- The input has more than one valid design.\n- The input contradicts another input.\n- The input expands scope past the MR.\n- The input needs an owner decision.\n\nQuote the input and state the decision that the user must make.\n\n## 2a. Discuss each input (interactive only)\n\nRun this step only with `--interactive`. It starts after the whole ledger\nexists, because an input's coupled effects aren't known until every row is\nread. No edit happens before the last row has a disposition.\n\nTake the rows one at a time, in ledger order. For each row, write in plain\ntext: the quoted input and where it sits, what you read it as asking, the\ncoupled effects from the ledger, and the disposition you propose with its\nreason. Propose Defer for a row that meets the deferral thread conditions\n(a `suggestion (non-blocking):` thread from an approver, not confidential),\nand Fix for every other row. Then ask the row's question with\n`AskUserQuestion`, with the proposal first and marked \"(Recommended)\":\n\n- **Fix as proposed**: apply the ledger row's change.\n- **Fix differently**: the user gives the wording or approach.\n- **Defer to a follow-up issue**: file it with the other deferred rows.\n- **Decline with a reason**: reply with the reasoning agreed here.\n\nAn \"Other\" answer, a question, or an objection is the chat. Answer it in\nplain text, update the row, and ask the same question again. Don't move to the\nnext row until the user picks a disposition. For Fix differently, settle the\nwording in text and update the row's direct change and coupled effects. For\nDecline, settle the reply's reasoning in text; it goes into the reply\nunchanged.\n\nWrite each agreed disposition into the ledger at once. When a later answer\nchanges the coupled effects of an earlier row, say so and reopen that row.\n\nWhat each disposition does after the walk:\n\n- **Fix:** steps 3 through 5 apply to these rows. With no Fix row, skip the\n  edits, the audit, the commit, and the push; the GitLab writes below still\n  run after one confirmation.\n- **Defer:** draft one combined issue as in the deferral path (steps 2\n  and 3 there), with one task item per deferred row. The confirmation shows\n  it, and the write order is the deferral path's. Reply with the issue\n  ref. Resolve the thread only when it meets the deferral thread\n  conditions; otherwise leave it open for the reviewer.\n- **Decline:** reply with the agreed reasoning and don't resolve. The\n  reviewer decides whether the reasoning holds. Add nothing to the issue.\n  A review bot's thread is the exception: step 6 resolves it after the reply.\n- **Merge when the pipeline succeeds** is set only when every row is Defer\n  and the deferral conditions hold, as on the deferral path. A mixed set\n  never sets it.\n\n## 3. Apply the coupled fix set\n\nApply every clear fix before any reply. Make the smallest coherent edit.\n\nA reviewer's request for precision isn't applied as written. When an input\nasks committed prose to carry a number, a step or MR iid, a section name of\nanother document, or a status (\"open until it merges\"), resolve the finding\nby cutting the claim, pointing at its source (\"the flag cache's lifetime\"),\nor describing the behavior without naming the other document's part. Each\nsuch addition is a second copy that goes false when its source changes, and\nthe next round flags it. Say so in the thread reply and give the\nreplacement. Deferred work is the exception: it names its carrier.\n\nAfter each source edit, grep the edit's subject (the rule, owner, term, or\ncount) across the whole document, and read every hit. A passage elsewhere\nthat says the opposite is a defect, even when it sits far from the edit.\nThen check the nearby paragraphs for these defects:\n\n- a pronoun or antecedent that now points at the wrong thing;\n- a count, list, or acceptance criterion that is now stale;\n- a duplicate statement of a log, audit, error, ownership, or ordering rule;\n- a dependency that names an undefined, wrong, or competing landing point;\n- a comment or description that no longer matches the code or document.\n\nWhen an edit changes a code contract (an error's identity or wrap chain, an\nexported signature, a return value), grep the changed symbol as a whole word\nacross its package and the package's tests, and read every hit. A fuzz oracle,\ntest helper, or table row that still asserts the old contract is a defect. It\ncan stay green, because `go test` runs a fuzz target's seed corpus only.\n\nUpdate the MR metadata in the same fix set. Build the change inventory again\nfrom the final diff. Do not write it from memory, and do not append only the\neffects of the last thread.\n\nCheck that the MR description names these items:\n\n- every material change in the final diff;\n- the actual carrier for deferred work;\n- the correct plan-step owner for each booked dependency;\n- the required issue link and the scope boundary.\n\nEdit only the files that the reviewer inputs and their coupled effects need.\n\n## 4. Final-delta audit\n\nFreeze edits before this audit. `REVIEWED_SHA` is the MR head from step 1.\nCompare `REVIEWED_SHA..HEAD` plus uncommitted changes, not the diff from the\ntarget branch.\n\n```bash\ngit diff --check\ngit diff --name-only <reviewed-sha>\nrtk proxy git diff <reviewed-sha>\n```\n\nUpdate the ledger from the final text and metadata. Mark each row `PASS`,\n`NEEDS DECISION`, or `UNRESOLVED` only after these checks:\n\n1. The requested change exists in the final source or metadata.\n2. The fix introduced no broken antecedent, stale count, duplicate rule, or\n   conflicting owner.\n3. Each coupled passage uses the same terms and cardinality.\n4. The MR description lists every material change in the final diff.\n5. Deferred work names its actual issue or MR carrier. A prose\n   cross-reference to an unmerged step or MR names neither: step 3 says\n   to describe the behavior instead.\n6. After a code-contract change, every reference to the changed symbol was\n   re-read and agrees with the new contract.\n\nIf any row is `NEEDS DECISION` or `UNRESOLVED`, stop before the commit and ask\nthe user.\n\n## 5. Verify, commit, and push\n\nRun the checks that the changed files and the repository rules require. For a\ndocumentation-only change, let a normal commit run the format and prose hooks.\nFor a code change, run the relevant tests and linters before the commit.\nIf the touched package has a `Fuzz*` target, read its CI job's `-fuzztime`\nfrom `.gitlab-ci.yml` and its includes, and run the target locally for at\nleast twice that. An edit to a fuzz oracle or an error contract always needs\nthis run.\n\nRead `git status`, the staged diff, and the recent commit messages before the\ncommit. Write a conventional commit, with a body when the project hooks need\none. Do not use `--no-verify`, except for the documented test-first\nexception of the repository.\n\nAfter the commit and before the confirmation, review the fix itself, gated\non what `<reviewed-sha>..HEAD` changed. A change under `docs\/specs\/`,\n`docs\/plans\/`, or `docs\/adr\/` always gets `\/review-spec --delta\n<reviewed-sha>`. A Go change gets `\/review-branch --delta <reviewed-sha>`\nonly when it changes a contract: an exported signature, an error's identity\nor wrap chain, or a return value. Other Go changes skip it; say so in the\nstep 7 report. Fix its BLOCKING findings in a new commit and\nre-run the step 4 audit on that commit. Put its WARNINGs and OBSERVATIONs in\nthe ledger and the step 7 report. A delta review is terminal: don't review\nthe fix again. A BLOCKING finding from `\/review-branch --delta` sends that\nskill's branch back to a full review, so make it a `NEEDS DECISION` row and\nask the user instead of starting one.\n\nConfirm with `AskUserQuestion` before the first GitLab write. Show the commit\nsubject, the MR description diff, the text of each reply, and the bot threads\nstep 6 will resolve. With deferred\nrows (step 2a), also show the issue title and body. Make \"Push and post\" the\nrecommended option.\n\nBefore the push, confirm three facts:\n\n- The worktree is clean.\n- HEAD is on the MR source branch.\n- The remote source branch still points at `REVIEWED_SHA`.\n\n```bash\ngit ls-remote origin refs\/heads\/<source-branch>\nsay \"Ta ta tap the key\"\ngit push origin HEAD\n```\n\nRun the `say` line only when SSH can ask for the hardware key. If the remote\nbranch moved, stop and ask the user. Never rebase or overwrite the changes of\nanother person.\n\nWrite the MR description from a file, then read it back and compare it to\nthe file.\n\n```bash\nglab api --method PUT \"projects\/<url-encoded-project>\/merge_requests\/<iid>\" \\\n  --field description=@<scratchpad>\/description-<iid>.md\n```\n\n## 6. Reply after the shared audit\n\nPost replies only after the pushed head and the MR metadata match the audited\nstate. Post one reply in each addressed discussion. Reply inside the existing\nthread, never as a top-level note. For a confidential thread, such as an\nAppSec review, this rule keeps the finding confidential.\n\nWrite each reply body to a file and pass it with `--field`. The `--raw-field`\nform sends the literal path as the body, and GitLab still answers 201.\n\n```bash\nglab api --method POST \"projects\/<url-encoded-project>\/merge_requests\/<iid>\/discussions\/<discussion-id>\/notes\" \\\n  --field body=@<scratchpad>\/reply-<iid>-<discussion-id>.md\n```\n\nRead the new note back and compare its body to the file. A 201 status does not\nprove that the right text landed. After the reply checks out, add a robot\nreaction to the root note of the discussion.\n\n```bash\nglab api --method POST \"projects\/<url-encoded-project>\/merge_requests\/<iid>\/notes\/<note-id>\/award_emoji\" \\\n  --field name=robot\n```\n\nEach reply states the final result, not an intention. Name the exact source\npassage, MR-description section, or linked carrier that resolves the input.\nFor a source change, give the pushed short SHA. Keep one reply to one review\ninput. Do not claim that the reviewer accepted the result. Resolve a\ndiscussion only when the user asks or the project workflow allows it. The\ndeferral path's confirmation counts as the user asking.\n\nResolve each review bot's thread after its reply checks out. A bot opened it\nwhen its root note's author is `GitLabDuo`, `duo-security-review-gitlab-org`,\nor `ai-appsec-security-mr-reviewer-gitlab-org`. No one comes back to resolve a\nbot's thread, and an open one blocks the merge. The step 5 confirmation\nauthorizes these resolves. A row still waiting for a decision gets no reply,\nso its thread stays open.\n\n```bash\nglab api --method PUT \"projects\/<url-encoded-project>\/merge_requests\/<iid>\/discussions\/<discussion-id>\" \\\n  --field resolved=true\n```\n\nRead the discussion back and confirm `resolved` is true on its notes.\n\n## 7. Report\n\nReport these items:\n\n- the pushed SHA and the MR URL;\n- the number of reviewed inputs and the number of replies posted;\n- the rows that wait for a decision;\n- with `--interactive`, each row's disposition and the issue URL, if filed;\n- the checks that you ran;\n- the bot threads resolved and the discussions that remain open;\n- the rows whose Skill gap is `missed` or `no report`, as a count.\n\nAppend one line for each of those rows to\n`~\/projects\/notes\/skill-gap-candidates.md`, skipping a row whose project, MR\niid, and discussion id are already there. Create the file with this header\nwhen it is missing, and write no other file for this:\n\n```markdown\n| Date | Project | MR | Thread | Gap | Report state |\n| --- | --- | --- | --- | --- | --- |\n```\n\n`Project` is the `<group>\/<project>` path from step 1, `Gap` is one sentence\nnaming what the reviewer found, in the reviewer's terms, and `Report state`\nis `missed` or `no report`. When `~\/projects\/notes\/` doesn't exist, skip the\nappend and say in the report that the gap log was skipped. `\/skills-retro` and a\nlater skill refinement read this file; this skill never edits a skill.\n\nAlso append every row whose Skill gap is `caught` or `missed` to\n`~\/projects\/notes\/review-thread-tags.md`, under the same skip rule and the\nsame missing-directory rule. `\/skills-retro` scores how often the author's own\nreview reports missed what a human found, so a `caught` row counts as much as a\n`missed` one. Create it with\nthis header when it is missing:\n\n```markdown\n| Date | Project | MR | Thread | Tag |\n| --- | --- | --- | --- | --- |\n```\n\n`MR` is `!<iid>`, `Thread` is the discussion id, and `Tag` is `caught` or\n`missed`.\n\nRe-request review only when the user asks.\n\n## Deferral path\n\nAn approval with only non-blocking suggestions needs no fix, commit, or\npush. File the suggestions as follow-up work, answer each thread with the\nissue ref, resolve the threads, and set the MR to merge.\n\n### Conditions\n\nAll of these must hold. Each is a check on API data, so no judgment call is\ninvolved.\n\n- Every open thread's root note starts with `suggestion (non-blocking):`\n  and isn't confidential.\n- Each thread's author approved the MR. Read the approvers with\n  `rtk proxy glab api projects\/<url-encoded-project>\/merge_requests\/<iid>\/approvals`.\n- No \"added \u2026 commit\" system note postdates the approval's system note, so\n  the approval covers the pinned head.\n\nA blocking, unlabeled, or confidential thread, or an approval that doesn't\ncover the head, fails the check. Take the step 2 path. A confidential\nfinding must not be copied into an issue.\n\n### Steps\n\n1. Write the ledger as in step 2, one row per thread. Put \"deferred to\n   issue\" in the direct-change column and leave the source columns empty.\n   Read no source files and edit nothing.\n2. Search for an existing carrier first. For each root note ID, run\n   `glab-read.py search issues <note-id> -R <group>\/<project>`. A hit is an\n   issue from an earlier, interrupted run. Reuse it and skip the create.\n3. Draft one issue for the whole review pass, in\n   `<scratchpad>\/issue-<iid>.md`. Write it with `natural-writing-style`.\n   Open with the MR link and the reason it's deferred. Add one task-list\n   item for each suggestion: the file and section, the quoted claim, the\n   reviewer's wording or request, and the thread URL\n   (`<mr-url>#note_<root-note-id>`). Copy the MR's labels. Set no assignee.\n   Don't split it; the user splits at the confirmation.\n4. Confirm with `AskUserQuestion`, in one question. Show the issue title and\n   body, the text of each reply, the thread resolves, and the merge. Make\n   \"File, reply, resolve, merge\" the recommended option.\n5. Write in this order. A resolve is what releases the merge when the\n   project requires resolved threads, so it comes after the issue and the\n   replies.\n   1. Create the issue, then read it back and compare its description to the\n      file.\n      ```bash\n      glab api --method POST \"projects\/<url-encoded-project>\/issues\" \\\n        --field title=\"<title>\" --field labels=\"<labels>\" \\\n        --field description=@<scratchpad>\/issue-<iid>.md\n      ```\n   2. Reply in each thread as in step 6, with the issue ref\n      (`<group>\/<project>#<issue-iid>`) and one clause naming the deferred\n      change. Don't write \"done\" or claim acceptance. Read each reply back.\n   3. Resolve each thread after its reply checks out.\n      ```bash\n      glab api --method PUT \"projects\/<url-encoded-project>\/merge_requests\/<iid>\/discussions\/<discussion-id>\" \\\n        --field resolved=true\n      ```\n   4. Set merge when the pipeline succeeds, pinned to the head.\n      ```bash\n      glab mr merge <iid> -R <group>\/<project> --auto-merge --sha <head-sha> --yes\n      ```\n      Skip it when auto-merge is already set. Skip it, and say why, when the\n      MR is a Draft, has conflicts, or has a failed pipeline. A running\n      pipeline is fine.\n6. Report the issue URL, the replies posted, the threads resolved, and the\n   merge state. Don't add the robot reaction; a resolved thread already\n   drops out of the step 1 listing.\n","use_cases":["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"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/gitlab.com\/radbatnag\/claude-skills\/-\/blob\/05b55872e4e98b79bc052be748b3abd6dccbabe6\/skills\/address-reviewer-inputs\/SKILL.md","source_commit":"05b55872e4e98b79bc052be748b3abd6dccbabe6","license":null,"version":null,"listing_approved_at":"2026-11-28","created_at":"2026-11-28T07:59:56.000000Z","updated_at":"2026-11-28T18:37:52.000000Z","seo_title":"Address GitLab Reviewer Inputs as a Single Fix Set","seo_description":"Automatically address all open reviewer comments on a GitLab merge request as a single change set, ensuring coupled changes pass the final-delta audit before committing.","seo_keywords":["GitLab merge request","reviewer inputs","coupled fix set","final-delta audit","conventional commit","code change","fuzz testing","CI job configuration"]}}