OmniForge omnicreate-gitlab
Use when creating a GitLab merge request (OmniForge). Auto-populates title and description from commits, supports draft MRs, labels, assignees, reviewers, and issue linking
git clone https://github.com/nexiouscaliver/OmniForge
T=$(mktemp -d) && git clone --depth=1 https://github.com/nexiouscaliver/OmniForge "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/omniforge/skills/omnicreate-gitlab" ~/.claude/skills/nexiouscaliver-omniforge-omnicreate-gitlab && rm -rf "$T"
plugins/omniforge/skills/omnicreate-gitlab/SKILL.mdGitLab Merge Request Creator
Context
- Current git status: !
git status --porcelain - Current branch: !
git branch --show-current - Recent commits: !
git log --oneline -5 - GitLab remote: !
git remote -v | grep gitlab | head -1 - glab version: !
glab version 2>/dev/null || echo "NOT_INSTALLED" - glab auth status: !
glab auth status 2>&1 || echo "NOT_AUTHENTICATED" - Unpushed commits: !
git log @{u}..HEAD --oneline 2>/dev/null || echo "NO_UPSTREAM" - Repo root: !
git rev-parse --show-toplevel 2>/dev/null || echo "NOT_A_GIT_REPO"
Your Task
Create a GitLab merge request using the
mcp__omniforge__create_gitlab_mr MCP tool.
Why MCP instead of raw bash? The MCP tool validates all inputs, uses safe subprocess execution (no shell interpretation), and provides structured error output — making it safe for use by all models without risk of shell injection.
Prerequisites
- Verify
is installed. If not, inform the user:glabbrew install glab # macOS - Verify the current directory is a git repository with a GitLab remote.
- Ensure there are commits to create an MR from (not on main/master without changes).
Pre-Flight Checklist
Before creating the MR, verify:
- glab is installed and authenticated
- Not on main/master branch
- Has commits to merge (not empty)
- No uncommitted changes (warn if present)
- Branch has upstream or can be pushed
MCP Tool: mcp__omniforge__create_gitlab_mr
mcp__omniforge__create_gitlab_mrUse this tool for all MR creation. It wraps
glab mr create safely.
Required parameter:
: absolute path to the git repository root (fromrepo_root
)git rev-parse --show-toplevel
Optional parameters (pass only what the user specified):
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | | Custom MR title (overrides fill) |
| string | | Custom MR description (overrides fill) |
| string | | Target branch for the MR |
| string | | Source branch (default: current branch) |
| string | | Comma-separated usernames to assign |
| string | | Comma-separated usernames to request review from |
| string | | Comma-separated label names |
| bool | | Mark as draft MR |
| bool | | Auto-populate title/description from commits |
| bool | | Include commit bodies in description |
| bool | | Push branch if not already pushed |
| string | | Issue number to link MR to |
| bool | | Copy labels from related issue |
| bool | | Delete source branch after merge |
| bool | | Squash commits when merging |
| string | | Milestone ID or title |
| bool | | Open in browser for final editing |
Step-by-Step Execution
- Check environment: Verify glab is installed and authenticated, git repo has GitLab remote
- Check branch: If on main/master, inform user they need to create a feature branch first
- Check for changes: If no commits, inform user they need to commit changes first
- Warn about uncommitted changes: If working directory is dirty, warn user before proceeding
- Get repo root: Run
to obtain the absolute pathgit rev-parse --show-toplevel - Call MCP tool: Invoke
withmcp__omniforge__create_gitlab_mr
and any user-specified optionsrepo_root - Report output: Show the MR URL, number, and any relevant details from the tool response
Common Patterns
Default MR (auto-filled from commits): → Call
mcp__omniforge__create_gitlab_mr with just repo_root
MR for a specific target branch with assignee: →
repo_root, target_branch="staging", assignees="john"
Draft MR with WIP label: →
repo_root, draft=true, labels="WIP"
MR with custom title and description: →
repo_root, title="Fix bug", description="Detailed description...", fill=false
MR linked to issue #42: →
repo_root, related_issue="42", copy_issue_labels=true
Open in browser for editing: →
repo_root, web=true
Common Errors and Solutions
| Error | Cause | Solution |
|---|---|---|
| Not logged in | Run |
| Branch not pushed | The tool handles push automatically () |
| Push conflict | Pull and rebase, or force push with caution |
| CI checks failed | Fix failing tests before creating MR |
| Conflicts with target | Rebase onto target branch and resolve |
| Token expired | Run |
Edge Cases to Handle
- Not a git repo: Inform user they need to be in a git repository
- No GitLab remote: Inform user the repo doesn't have a GitLab remote
- glab not installed: Provide installation instructions
- Not authenticated: Run
if neededglab auth login - No commits: Inform user they need to commit changes first
- Already on main/master: Ask user which branch to create MR from
- Uncommitted changes: Warn user their working directory has changes not in the MR
Output Format
After the MCP tool returns, provide a summary like:
## Merge Request Created - **MR**: !123 - **URL**: https://gitlab.com/group/repo/-/merge_requests/123 - **Branch**: feature-branch → main - **Status**: Open
If the tool returns an error, explain it and suggest remediation steps.