home / skills / thebushidocollective / han / create-mr
This skill guides you to create a GitLab merge request by collecting project, branches, title, and description for a ready MR.
npx playbooks add skill thebushidocollective/han --skill create-mrReview the files below or copy the command above to add this skill to your agents.
---
name: create-mr
description: Create a new merge request in a GitLab project
---
# Create GitLab Merge Request
## Name
gitlab:create-mr - Create a new merge request in a GitLab project
## Synopsis
```
/create-mr [arguments]
```
## Description
Create a new merge request in a GitLab project
## Implementation
Create a new merge request in a GitLab project with source and target branches.
## Usage
```
/create-mr
```
This command helps you create a merge request with all necessary details.
## What This Command Does
1. Asks for the project ID or path
2. Prompts for source branch name
3. Requests target branch name
4. Asks for MR title
5. Requests MR description (optional)
6. Creates the merge request using the GitLab MCP `create_merge_request` tool
7. Returns the MR number and URL
## Prerequisites
- GitLab MCP server must be installed and configured
- GitLab version 18.5 or later
- You must have Developer or higher role in the project
- Both source and target branches must exist
- OAuth authentication must be completed
## Example Interaction
```
User: /create-mr
Claude: I'll help you create a merge request. What's the project ID or path?
User: 456
Claude: What's the source branch name?
User: feature/user-authentication
Claude: What's the target branch name?
User: main
Claude: What should the merge request title be?
User: Add JWT-based user authentication
Claude: Please provide a description (optional, press Enter to skip):
User: This MR implements JWT-based authentication for the API:
- User login and registration endpoints
- Token generation and validation middleware
- Password hashing with bcrypt
- Unit tests for auth flows
Closes #42
Claude: Creating merge request in project 456...
ā Merge request created successfully!
!15 - Add JWT-based user authentication
https://gitlab.com/your-org/project/-/merge_requests/15
Status: Open
Source: feature/user-authentication
Target: main
```
## Tips
- Link related issues using `Closes #123` or `Fixes #123` in the description
- Use conventional commit prefixes in titles: `feat:`, `fix:`, `refactor:`
- Include a testing checklist in the description
- Add reviewers after creation if needed
- Set appropriate labels for categorization
- Consider creating a draft MR for work-in-progress
## Related Commands
- `/view-mr`: View merge request details and diffs
- `/review-mr`: Get a comprehensive review of a merge request
- `/create-issue`: Create an issue that this MR will resolve
This skill creates a new merge request in a GitLab project by collecting minimal inputs and calling the GitLab MCP create_merge_request tool. It guides you through project selection, source and target branches, title, and optional description, then returns the MR number and URL. The flow is optimized for quick, reproducible MR creation when branches already exist.
The skill prompts for project ID or path, source branch, target branch, MR title, and an optional description. It validates inputs and uses the GitLab MCP create_merge_request API to create the MR. On success it returns the merge request ID, URL, status, source and target branches, and a short confirmation message.
What permissions are required to create an MR?
You must have Developer or higher role in the target project.
What prerequisites are needed before using this skill?
GitLab MCP must be configured, OAuth authentication completed, GitLab 18.5+ supported, and both source and target branches must exist.