From gitlab-skills
Use this skill when the user wants to see comments, discussions, or review threads on a GitLab merge request. Triggers on phrases like "MR comments", "review discussions", "MR threads", "unresolved comments", "what did reviewers say", "show me the comments on MR".
npx claudepluginhub yjhjstz/cc-skills --plugin gitlab-skillsThis skill is limited to using the following tools:
View comments and discussions on a GitLab merge request.
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Guides root cause investigation for bugs, test failures, unexpected behavior, performance issues, and build failures before proposing fixes.
Writes implementation plans from specs for multi-step tasks, mapping files and breaking into TDD bite-sized steps before coding.
View comments and discussions on a GitLab merge request.
Extract the MR IID from the user's message (e.g. "MR 954" or "!954" → IID 954). If not provided, ask the user for the MR IID before proceeding.
Use glab CLI and jq. Must run from a git directory with GitLab remote.
Get MR basic info:
glab mr view <IID> -F json
Extract: title, state, author, source/target branch.
Get all discussion threads — pipe directly to jq, no temp files needed:
glab api "projects/:fullpath/merge_requests/<IID>/discussions" --paginate | jq '<filter>'
The glab api command handles authentication automatically. Pipe its output directly to jq for parsing.
Parse and classify with a single jq pipeline. Filter out system notes (where notes[0].system is true). Classify remaining into:
position.new_path or position.old_path)For complex jq filters, write the filter to a temp file and use jq -f /tmp/filter.jq to avoid shell quoting issues:
# Write jq filter to file first, then:
glab api "projects/:fullpath/merge_requests/<IID>/discussions" --paginate | jq -f /tmp/filter.jq
Present results in this order:
MR Summary: MR — state, author, source->target
Unresolved Discussions (show first, these need attention): For each unresolved thread:
file:line context, then the discussion thread (author, body, timestamp for each note)Resolved Discussions (collapsed/summarized):
Statistics:
Suggest follow-up actions:
/gitlab-review-mr <IID> — do a full code reviewglab mr note <IID> -m "..." — add a commentIMPORTANT:
jq -f /tmp/mr_filter.jq to avoid bash interpreting special characters. NEVER use the not-equal operator with exclamation mark inline — use | not instead in jq.