From gitlab-skills
Check out a GitLab merge request branch locally. Use when a user asks to switch to the branch behind an MR for local review.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gitlab-skills:gitlab-mr-checkoutThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Check out the branch behind a GitLab merge request so it can be reviewed or
Check out the branch behind a GitLab merge request so it can be reviewed or
modified locally. The skill uses the GitLab CLI when GITLAB_TOKEN is not set
and the REST API plus git when the token is available.
$ARGUMENTS contains the merge request IID.
Extract the merge request IID from $ARGUMENTS.
Check whether GITLAB_TOKEN is set.
Run:
glab mr checkout {iid}
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.
Fetch MR details:
GET {GITLAB_HOST}/api/v4/projects/{encoded_project_path}/merge_requests/{iid}
Headers: PRIVATE-TOKEN: {GITLAB_TOKEN}
Extract title, source_branch, and sha.
Then fetch and check out the branch:
git fetch origin {source_branch}
git checkout {source_branch}
If the branch does not exist locally, create it from origin/{source_branch}.
Confirm the MR title, IID, source branch, and latest commit SHA. On failure, include the HTTP status or git and CLI error output.
/gitlab-mr-checkout 42
check out MR 42
switch to merge request 105
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