GitLab 合并请求审查
review-mr
查找当前 jj 分支对应的 GitLab 合并请求(MR)并对其进行代码审查。当用户想要审查 MR、审查合并请求、审查“我的 MR”,或审查当前分支在 GitLab 上的更改时使用。
- License 许可
- GPL-2.0
- 最近更新
- 2026-11-05
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- review-mr
- description
- Find the GitLab merge request for the current jj branch and run a code review on it. Use when the user wants to review the MR, review the merge request, review "my MR", or review the current branch's changes on GitLab.
- allowed-tools
- Bash, Read, Grep, Glob, Task, mcp__plugin_claude-code-home-manager_gitlab__list_merge_requests, mcp__plugin_claude-code-home-manager_gitlab__get_merge_request, mcp__plugin_claude-code-home-manager_gitlab__get_merge_request_diffs, mcp__plugin_claude-code-home-manager_gitlab__create_merge_request_note, mcp__claude_ai_Linear__get_issue
03 SKILL.md 正文
Review MR
Locate the GitLab merge request for the current branch, then review its diff.
Instructions
Step 1: Identify the branch and ticket
Gather signals to identify the MR. The MR's source branch is the strongest key.
# Nearest pushed bookmark on the current change (the likely source branch)
jj log -r '@' --no-graph -T 'bookmarks'
# Fall back to bookmarks on ancestors if @ has none
jj log -r 'ancestors(@) & bookmarks()' --limit 3 --no-graph \
-T 'bookmarks ++ " " ++ change_id.short() ++ "\n"'
# Change descriptions may reference a Linear ticket (e.g. ENG-1234)
jj log -r '@ | @-' --no-graph -T 'description ++ "\n"'
# Confirm the GitLab remote
jj git remote list
Extract a Linear ticket id (pattern like ABC-123) from the branch name or descriptions if present.
Step 2: Find the MR
Identify the project by its GitLab remote URL, then locate the MR by source branch:
mcp__plugin_claude-code-home-manager_gitlab__list_merge_requestswithscope: created_by_me,state: opened, passing the projecturl. Match a result whose source branch equals the branch from Step 1.- If no match, retry with
searchset to the Linear ticket id, then to the branch name. - If still ambiguous, list open MRs and ask the user to confirm which one.
Optionally cross-check via Linear: mcp__claude_ai_Linear__get_issue on the ticket id — its links/attachments often point at the MR.
Step 3: Fetch the diff
Once the MR iid is known:
mcp__plugin_claude-code-home-manager_gitlab__get_merge_request # metadata (title, description, source/target)
mcp__plugin_claude-code-home-manager_gitlab__get_merge_request_diffs # patch text
Step 4: Run the review
Dispatch the code-reviewer agent with the MR title, description, and full diff text embedded in the prompt (the agent has no MCP access — it must receive the diff inline). Review for:
- Correctness and edge cases
- Security (injection, secrets exposure, auth)
- Performance
- Readability and consistency with the codebase
Present findings grouped as must-fix vs suggestions, each pointing to file:line.
Step 5: Offer to post (optional)
Ask whether to post the review back to the MR. Only if the user confirms, use mcp__plugin_claude-code-home-manager_gitlab__create_merge_request_note. Never post without explicit confirmation.
Failure handling
- No bookmark on
@: walk ancestors, or ask the user for the branch name. - Remote is GitHub, not GitLab: this skill targets GitLab MRs — stop and say so.
- Multiple open MRs match: present them and let the user pick.
04 同仓库更多 Skills
start-ticket
Kick off work on a Linear ticket end to end — file or look up the ticket, create an isolated jj workspace for it, move into that workspace, pull the ticket, and brief its scope. Use when the user wants to start working on a subject or an existing ticket, "start a ticket", "kick off LIN-123", or spin up a workspace from a ticket and begin.
文本润色与扩写
writing-assistant
帮助改进和充实 markdown 或纯文本文件中的文字。当用户需要写作反馈、风格修正、语法纠正,或将要点扩展为散文时使用。不从零开始撰写文本。
工作区管理
workspace
暂无简介
Claude技能创建指导
skill-writer
指导用户为 Claude Code 创建 Agent Skills。当用户想要创建、编写、设计新 Skill,或需要帮助处理 SKILL.md 文件、frontmatter 或技能结构时使用。
代码变更审查
review
审查代码变更的质量、安全性和最佳实践
主题资料研究
researcher
通过从网页来源和本地文件收集信息来研究某个主题。当用户要求研究、调查或深入探讨某个主题时使用。支持通过 research.md 文件进行增量式研究。