From gitlab-skills
Create a GitLab merge request. Use when a user asks to open an MR from the current branch or with explicit source and target branches.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gitlab-skills:gitlab-mr-createThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a merge request in a self-hosted GitLab instance. The skill uses the
Create a merge request in a self-hosted GitLab instance. The skill uses the
GitLab CLI when GITLAB_TOKEN is not set and switches to the REST API when the
API token is present.
$ARGUMENTS may include these options:
--source <branch>--target <branch>--title <title>--description <text>Parse $ARGUMENTS.
--source is missing, use git branch --show-current.--title is missing, use git log -1 --format=%s.--target is missing, let GitLab use the repository default branch.Check whether GITLAB_TOKEN is set.
Run:
glab mr create \
--source-branch {source} \
--target-branch {target} \
--title "{title}" \
--description "{description}"
Omit --target-branch when no target was supplied.
Require these environment variables and fail clearly if any are missing:
GITLAB_HOSTGITLAB_TOKENDetermine the project path from git remote get-url origin, strip the host
prefix and .git suffix, then URL-encode / as %2F.
Create the merge request:
POST {GITLAB_HOST}/api/v4/projects/{encoded_project_path}/merge_requests
Headers: PRIVATE-TOKEN: {GITLAB_TOKEN}
Content-Type: application/json
Body: {
"source_branch": "{source}",
"target_branch": "{target}",
"title": "{title}",
"description": "{description}"
}
Omit target_branch from the body when no explicit target was supplied.
On success, return the MR IID, title, URL, state, and source-to-target branch mapping. On failure, report the HTTP status or CLI error output.
/gitlab-mr-create --source feature/login --target main --title "Add login page"
create a merge request from feature/x to main
open an MR from my current branch
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 rogerbriggen/ai_skills --plugin gitlab-skills