brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
reviewing-gitlab-mr-commentsUse when reviewing GitLab merge request comments via glab in the current repo, including extracting line ranges and code snippets from inline discussions, then deciding next actions with a checklist or plan before execution
Independent GitHub snapshot · Automated classification · Original documentation governs
Use glab to fetch MR comments in the current repository, summarize review feedback, confirm understanding, then propose either a simple action checklist or a full plan before executing changes. Prefer line_range for multi-line comments. Default output is comments + line ranges only (no code snippet).
Core principle: Read all comments → confirm understanding → choose checklist vs plan → get approval → execute.
Announce at start: "I'm using the reviewing-gitlab-mr-comments skill to review GitLab MR feedback."
glab installed and authenticated.Optional checks:
glab auth status
Accept either:
123)https://gitlab.com/group/project/-/merge_requests/123)If not provided, ask for it.
Prefer glab commands, using IID or URL:
glab mr view <mr> --comments
If you need to see the code under review:
glab mr diff <mr>
If you need to map comments to files/lines (and include multi-line ranges), query discussions:
project_id=$(glab repo view -F json | python3 - <<'PY'
import json,sys
print(json.load(sys.stdin)["id"])
PY
)
glab api "projects/${project_id}/merge_requests/<mr>/discussions"
Then format discussions into a readable list with ranges (comments + line numbers only):
glab api "projects/${project_id}/merge_requests/<mr>/discussions" | \
./scripts/mr_discussions_to_md.py
To include code snippets (with context lines) and still show comments:
glab api "projects/${project_id}/merge_requests/<mr>/discussions" | \
./scripts/mr_discussions_to_md.py --repo-root "$(pwd)" --context 3 --snippet
Notes:
position.line_range.start/end. It falls back to new_line/old_line only when no range exists.--snippet to enable snippet output; default is no snippet.Produce a structured summary:
Ask the user to confirm the summary or clarify any ambiguous items.
Use a simple action checklist when:
Use a plan when:
Checklist output (simple cases):
Plan output (complex cases):
Then ask for approval: "Do you want me to proceed?"
Only implement after the user confirms.
| Step | Action |
|---|---|
| Identify MR | Accept IID or URL; ask if missing |
| Fetch comments | glab mr view <mr> --comments |
| Fetch ranges | glab api ".../merge_requests/<mr>/discussions" |
| Format | ./scripts/mr_discussions_to_md.py --repo-root "$(pwd)" |
| Summarize | Group by thread/file; mark conflicts |
| Choose output | Checklist for simple; plan for complex |
| Execute | Only after approval |
Skipping understanding confirmation
Jumping to code changes
Using the wrong repository context
Only using single-line fields
position.line_range.start/end and only fall back to new_line/old_lineMR: 123
Summary:
- fileA.ts: fix null handling
- fileB.ts: add tests
This is small and localized.
Checklist:
1) Fix null handling in fileA.ts
2) Add tests in fileB.ts
3) Run build/compile
Proceed?