Loading...
Loading...
Interact with GitLab via the glab CLI. Primary use case is MR review — fetches the diff, runs parallel code review + security review via specialist agents, then posts the result as a Thai comment on the MR. Also supports listing MRs, viewing MR status, checking CI/CD pipelines, approving MRs, and other glab operations. Trigger whenever the user provides a GitLab MR URL or says anything like "review MR", "ช่วย review MR นี้", "ดู MR ให้หน่อย", "review https://gitlab.../merge_requests/42", "check pipeline", "list open MRs", or any GitLab-related task.
npx skill4agent add witooh/skills gitlabglabhttps://gitlab.com/group/subgroup/project/-/merge_requests/42https:///-/gitlab.com/group/subgroup/projectmerge_requests/42glab mr <cmd> <mr_id> --repo <repo_ref>1. Fetch MR info, diff, and existing comments
2. Read & summarize existing comments (understand what's already discussed)
3. code-reviewer + security + qa → review in PARALLEL (with comment context)
4. Compose Thai comment from template
5. Post comment to the MRglab mr view <mr_id> --repo <repo_ref> --output json
glab mr diff <mr_id> --repo <repo_ref>
glab mr note list <mr_id> --repo <repo_ref>CLAUDE.mdAgent(
description: "Code review MR diff",
subagent_type: "code-reviewer",
model: "opus",
prompt: """
[code-reviewer agent instructions — read from ~/.claude/agents/code-reviewer.agent.md]
---
## Project Conventions
[relevant sections from CLAUDE.md if available, else omit]
---
## Existing MR Comments
[summary of existing comments from Step 2 — issues raised, author explanations, unresolved discussions]
Do NOT repeat issues that other reviewers have already flagged unless you have additional insight to add.
---
## Task
Review the following MR diff for convention compliance.
MR: !<mr_id> — <mr_title>
Branch: <source> → <target>
## Diff
<full diff output>
"""
)
Agent(
description: "Security review MR diff",
subagent_type: "security",
model: "sonnet",
prompt: """
[security agent instructions — read from ~/.claude/agents/security.agent.md]
---
## Existing MR Comments
[summary of existing comments from Step 2 — issues raised, author explanations, unresolved discussions]
Do NOT repeat security concerns that have already been raised unless you have additional findings.
---
## Task
Security review the following MR diff.
MR: !<mr_id> — <mr_title>
Branch: <source> → <target>
## Diff
<full diff output>
"""
)
Agent(
description: "QA review MR diff",
subagent_type: "qa",
model: "sonnet",
prompt: """
[qa agent instructions — read from ~/.claude/agents/qa.agent.md]
---
## Project Conventions
[relevant sections from CLAUDE.md if available, else omit]
---
## Existing MR Comments
[summary of existing comments from Step 2 — issues raised, author explanations, unresolved discussions]
Do NOT repeat QA concerns that have already been raised unless you have additional findings.
---
## Task
QA review the following MR diff. Focus on:
- Test coverage gaps (are new code paths tested?)
- Missing edge case tests
- Regression risks
- Acceptance criteria validation (if available)
MR: !<mr_id> — <mr_title>
Branch: <source> → <target>
## Diff
<full diff output>
"""
)~/.claude/agents/glab mr note <mr_id> --repo <repo_ref> -m "<thai_comment>"glabBash| Task | Command |
|---|---|
| List open MRs | |
| View MR details | |
| Approve MR | |
| Check pipeline status | |
| List pipelines | |
| Retry a job | |
| Add a note/comment | |
--repoglab auth login