From glab
View the GitLab merge request associated with the current git branch. Use when user says 看当前 MR / 当前分支 MR / view current MR / show me the merge request / 这个分支有 MR 吗.
How this skill is triggered — by the user, by Claude, or both
Slash command
/glab:mrThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
依赖 `glab` CLI 已安装并完成 git.snowsse.cn 认证。
依赖 glab CLI 已安装并完成 git.snowsse.cn 认证。
执行前先跑:
glab auth status
如果失败(未安装 / 未认证 / token 过期 / command not found):
glab:setup skill 拿到诊断结果与教程git rev-parse --abbrev-ref HEAD
如果在 detached HEAD(输出是 HEAD),告诉用户"当前不在分支上,无法定位 MR",结束。
glab mr list --source-branch <分支名> --output json
解析 JSON 数组:
<分支> 没有对应的 open MR。可用 /glab:mr-create 创建。",结束iidiid + title + state,让用户指定要看哪个glab mr view <iid>
格式:
## MR !<iid>: <title>
- 状态: <draft/open/merged/closed>
- 分支: <source_branch> → <target_branch>
- 作者: <author>
- 创建于: <created_at>
### 流水线
<pipeline 状态:success / failed / running / skipped;如失败列出哪些 job>
### 讨论
- 总评论数: N
- 未解决讨论: M(如有)
- 最近 3 条评论作者: a, b, c
### 链接
<web_url>
如果 glab mr view 输出里包含 "approval rules" / "approvals required",也一并提及("审批: 已 X/Y")。
最后用一行提示:
/glab:mr-diff <iid> 先看 diff,再 glab mr update <iid> --ready 标记 ready/glab:review-fixup <iid> 处理 AI review 评论/glab:pipeline 看详情Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub itmrboy/glab_skills --plugin glab