Load MR Context
Name
gitlab:load-mr-context - Load merge request context for the current branch
Synopsis
/load-mr-context [project-path] [branch]
Description
Loads the full context of an open merge request for the given branch, including description, changes, pipeline status, and review comments. Uses GitLab MCP tools for structured data access.
Implementation
Given project-path and branch arguments:
- Use
mcp__plugin_gitlab_gitlab__list_merge_requests with project_id: "PROJECT_PATH", source_branch: "BRANCH", state: "opened" to find the MR
- If no MR is found, report that no open MR exists for this branch and stop
- If an MR exists, gather context silently (do not narrate each step):
- Use
mcp__plugin_gitlab_gitlab__get_merge_request with the MR IID to read description, labels, reviewers, and metadata
- Use
mcp__plugin_gitlab_gitlab__get_merge_request_diffs to understand what has changed
- Check pipeline status for the branch
- Check for review notes/discussions
- Check for linked issues mentioned in the MR description
- Present a concise summary:
- MR title, number, and status
- Key points from the description
- Files changed (count and notable files)
- Pipeline status (passing/failing)
- Review status (approved, changes requested, pending)
- Any blocking issues or failing pipelines
Example Interaction
User: /load-mr-context my-group/my-project feat/mr-context
Claude: ## MR !42: Add MR context detection hooks
- **Status**: Open, 1 review pending
- **Description**: Adds SessionStart hooks to GitLab plugin that detect open MRs on the current branch
- **Changes**: 4 files (+120, -8)
- **Pipeline**: All stages passing
- **Reviews**: 1 approved, 1 pending from @reviewer
Ready to assist with this MR.
Arguments
project-path (required): GitLab project path (e.g., group/project or numeric ID)
branch (required): Branch name to find the MR for
Tips
- This skill is typically invoked automatically when starting a session on a feature branch
- All data is fetched via MCP tools (no CLI commands needed)
- The summary is kept concise to avoid cluttering the session start
1---2name: load-mr-context3description: Load MR context for the current branch using GitLab MCP tools4---5
6# Load MR Context
7
8## Name
9
10gitlab:load-mr-context - Load merge request context for the current branch
11
12## Synopsis
13
14```
15/load-mr-context [project-path] [branch]
16```
17
18## Description
19
20Loads the full context of an open merge request for the given branch, including description, changes, pipeline status, and review comments. Uses GitLab MCP tools for structured data access.
21
22## Implementation
23
24Given `project-path` and `branch` arguments:
25
261. Use `mcp__plugin_gitlab_gitlab__list_merge_requests` with `project_id: "PROJECT_PATH"`, `source_branch: "BRANCH"`, `state: "opened"` to find the MR
272. If no MR is found, report that no open MR exists for this branch and stop
283. If an MR exists, gather context **silently** (do not narrate each step):
29 - Use `mcp__plugin_gitlab_gitlab__get_merge_request` with the MR IID to read description, labels, reviewers, and metadata
30 - Use `mcp__plugin_gitlab_gitlab__get_merge_request_diffs` to understand what has changed
31 - Check pipeline status for the branch
32 - Check for review notes/discussions
33 - Check for linked issues mentioned in the MR description
344. Present a concise summary:
35 - MR title, number, and status
36 - Key points from the description
37 - Files changed (count and notable files)
38 - Pipeline status (passing/failing)
39 - Review status (approved, changes requested, pending)
40 - Any blocking issues or failing pipelines
41
42## Example Interaction
43
44```
45User: /load-mr-context my-group/my-project feat/mr-context
46
47Claude: ## MR !42: Add MR context detection hooks
48
49- **Status**: Open, 1 review pending
50- **Description**: Adds SessionStart hooks to GitLab plugin that detect open MRs on the current branch
51- **Changes**: 4 files (+120, -8)
52- **Pipeline**: All stages passing
53- **Reviews**: 1 approved, 1 pending from @reviewer
54
55Ready to assist with this MR.
56```
57
58## Arguments
59
60- `project-path` (required): GitLab project path (e.g., `group/project` or numeric ID)
61- `branch` (required): Branch name to find the MR for
62
63## Tips
64
65- This skill is typically invoked automatically when starting a session on a feature branch
66- All data is fetched via MCP tools (no CLI commands needed)
67- The summary is kept concise to avoid cluttering the session start