Skill

glab

GitLab CLI for merge requests, issues, CI/CD pipelines, repositories, and more. Use when working with GitLab to list/view MRs, check CI status, browse issues, or any GitLab API operation. Triggered by requests involving GitLab data, merge requests, CI pipelines, or GitLab project management.

From glab
Install
1
Run in your terminal
$
npx claudepluginhub fprochazka/claude-code-plugins --plugin glab
Tool Access

This skill is limited to using the following tools:

Bash(glab --help)Bash(glab help:*)Bash(glab alias --help)Bash(glab api --help)Bash(glab auth --help)Bash(glab changelog --help)Bash(glab ci --help)Bash(glab ci artifact --help)Bash(glab ci cancel --help)Bash(glab ci config --help)Bash(glab ci delete --help)Bash(glab ci get --help)Bash(glab ci lint --help)Bash(glab ci list --help)Bash(glab ci retry --help)Bash(glab ci run --help)Bash(glab ci run-trig --help)Bash(glab ci status --help)Bash(glab ci trace --help)Bash(glab ci trigger --help)Bash(glab ci view --help)Bash(glab cluster --help)Bash(glab config --help)Bash(glab deploy-key --help)Bash(glab duo --help)Bash(glab gpg-key --help)Bash(glab incident --help)Bash(glab issue --help)Bash(glab issue board --help)Bash(glab issue close --help)Bash(glab issue create --help)Bash(glab issue delete --help)Bash(glab issue list --help)Bash(glab issue note --help)Bash(glab issue reopen --help)Bash(glab issue subscribe --help)Bash(glab issue unsubscribe --help)Bash(glab issue update --help)Bash(glab issue view --help)Bash(glab iteration --help)Bash(glab iteration list --help)Bash(glab job --help)Bash(glab label --help)Bash(glab mcp --help)Bash(glab mcp serve --help)Bash(glab milestone --help)Bash(glab mr --help)Bash(glab mr approve --help)Bash(glab mr approvers --help)Bash(glab mr checkout --help)Bash(glab mr close --help)Bash(glab mr create --help)Bash(glab mr delete --help)Bash(glab mr diff --help)Bash(glab mr for --help)Bash(glab mr issues --help)Bash(glab mr list --help)Bash(glab mr merge --help)Bash(glab mr note --help)Bash(glab mr rebase --help)Bash(glab mr reopen --help)Bash(glab mr revoke --help)Bash(glab mr subscribe --help)Bash(glab mr todo --help)Bash(glab mr unsubscribe --help)Bash(glab mr update --help)Bash(glab mr view --help)Bash(glab opentofu --help)Bash(glab release --help)Bash(glab repo --help)Bash(glab schedule --help)Bash(glab securefile --help)Bash(glab snippet --help)Bash(glab ssh-key --help)Bash(glab stack --help)Bash(glab token --help)Bash(glab user --help)Bash(glab variable --help)Bash(glab issue list:*)Bash(glab issue view:*)Bash(glab ci artifact:*)Bash(glab ci get:*)Bash(glab ci lint:*)Bash(glab ci list:*)Bash(glab ci status:*)Bash(glab ci trace:*)Bash(glab job artifact:*)Bash(glab mr approvers:*)Bash(glab mr diff:*)Bash(glab mr issues:*)Bash(glab mr list:*)Bash(glab mr view:*)Bash(glab schedule list:*)Bash(glab-search-code:*)
Skill Content

glab - GitLab CLI

Command-line interface for GitLab. Binary name: glab.

Repository Context

glab auto-detects the GitLab project from the git remote in the current directory. Override with --repo (-R):

glab mr list                              # auto-detected from git remote
glab mr list -R group/project             # explicit project
glab mr list -R group/namespace/project

Identifying MRs

MR commands accept an MR IID number, a branch name, or nothing (current branch):

glab mr view 123           # by MR IID
glab mr view feature-x     # by branch name
glab mr view               # current branch's MR

Temp Files

When writing content to temp files (MR descriptions, job logs, etc.), use filenames unique to the MR or job — include the MR number, branch name, or job name as a slug (e.g., /tmp/mr-desc-123.md, /tmp/mr-desc-feature-auth.md, /tmp/glab-job-build-123.log).

Reuse the same file for the same MR/entity across multiple edits — the Write tool shows diffs, so the user can see exactly what changed between revisions.

Never use generic fixed filenames like /tmp/mr-description.md — they collide across different MRs.


Creating a Merge Request

glab mr create --fill --fill-commit-body --yes -b main --draft -a user1 --reviewer user2 -l bug
FlagShortDescription
--title-tMR title
--description-dDescription ("-" opens editor)
--fill-fUse commit info, auto-push branch
--fill-commit-bodyInclude all commit bodies (with --fill)
--draftCreate as draft
--assignee-aAssign by username (comma-separated or repeated)
--reviewerRequest review by username
--label-lAdd labels
--milestone-mAssign milestone
--target-branch-bTarget branch
--source-branch-sSource branch (default: current)
--pushPush branch before creating
--remove-source-branchRemove source branch on merge
--squash-before-mergeSquash commits on merge
--related-issue-iLink to issue IID
--copy-issue-labelsCopy labels from linked issue
--yes-ySkip confirmation prompt
--web-wContinue in browser

Viewing Current MR

glab mr view --comments -F json
FlagShortDescription
--comments-cInclude comments and activities
--system-logs-sInclude system activities
--output-FFormat: text, json
--web-wOpen in browser
--page-pPage number for comments
--per-page-PItems per page (default 20)

Updating MR Title and Description

glab mr update 123 --title "New title" --description "New description" --ready -l bug --reviewer +user2

Assignee/reviewer prefix modifiers: + to add, ! or - to remove. No prefix replaces all.

FlagShortDescription
--title-tMR title
--description-dDescription ("-" opens editor)
--draftMark as draft
--ready-rMark as ready
--label-lAdd labels
--unlabel-uRemove labels
--assignee-aSet assignees (+ add, ! remove, bare replaces all)
--unassignRemove all assignees
--reviewerSet reviewers (+ add, ! remove, bare replaces all)
--milestone-mSet milestone ("" or 0 to unset)
--target-branchChange target branch
--remove-source-branchToggle remove source branch on merge
--squash-before-mergeToggle squash on merge
--lock-discussionLock discussion
--unlock-discussionUnlock discussion
--yes-ySkip confirmation

MR Discussions and Notes

glab mr note can add comments, but listing discussions and replying to threads requires the API.

Add a Comment

glab mr note 123 -m "Looks good!"
FlagShortDescription
--message-mComment text
--uniqueSkip if identical comment already exists

List MR Discussions (API)

Discussions are threaded conversations. Each discussion has an id and contains notes.

glab api projects/:id/merge_requests/123/discussions --paginate

Reply to a Discussion Thread (API)

glab api -X POST projects/:id/merge_requests/123/discussions/<discussion_id>/notes \
  -f body="Reply text"

Create a New Discussion Thread (API)

glab api -X POST projects/:id/merge_requests/123/discussions \
  -f body="Starting a new thread"

Resolve / Unresolve a Discussion (API)

glab api -X PUT projects/:id/merge_requests/123/discussions/<discussion_id> \
  -F resolved=true

MR Pipeline and Job Logs

View Pipeline Status

glab ci status --compact
glab ci get --with-job-details -F json
CommandDescription
glab ci statusCurrent branch pipeline status
glab ci status --liveReal-time updates until done
glab ci status --compactCompact view
glab ci getPipeline details with job list
glab ci get --with-job-detailsExtended job info
glab ci get -F jsonJSON output

View Job Logs

Always redirect job logs to a temp file — the output can be thousands of lines and will waste context tokens.

glab ci trace <job-name> > /tmp/glab-job-<job-name>-$(date +%s).log 2>&1

DO NOT run glab ci trace without redirecting to a file.

FlagShortDescription
--branch-bBranch to search for the job
--pipeline-id-pPipeline ID to search for the job

Retry / Trigger Jobs

glab ci retry <job-name>           # retry a failed job
glab ci trigger <job-name>         # trigger a manual job

API (Raw HTTP Requests)

Direct GitLab API access for anything not covered by dedicated commands.

glab api projects/:id/members                                    # GET (default)
glab api projects/:id/labels -f name=bug -f color=#FF0000        # POST (default when params present)
glab api -X PUT projects/:id -f name="new-name"                  # explicit method

Pagination

--paginate fetches all pages sequentially. Without it, you only get the first page.

glab api projects/:id/issues --paginate --output ndjson | jq 'select(.state == "opened")'

Output formats:

  • json (default) — pretty-printed, arrays merged into a single JSON array
  • ndjson — one JSON object per line, memory-efficient, works with jq

Endpoint Placeholders

Auto-resolved from the git remote: :id, :fullpath, :group, :namespace, :repo, :branch, :user, :username

Parameter Flags

FlagShortDescription
--raw-field-fString parameter
--field-FTyped parameter (true/false/integers auto-converted, @file reads from file)
--method-XHTTP method (default: GET without params, POST with)
--paginateFetch all pages
--outputFormat: json (default), ndjson
--header-HAdditional HTTP header
--hostnameOverride GitLab host
--include-iInclude response headers
--inputRequest body from file (- for stdin)
--silentDon't print response body

Other Commands

Discover flags with --help:

GroupDescription
mr list, mr diff, mr merge, mr approve, mr rebase, mr checkoutMR management
issue list, issue view, issue create, issue update, issue closeIssues
ci list, ci run, ci lint, ci cancelCI/CD pipelines
job artifactDownload job artifacts
repo view, repo list, repo cloneRepositories
release list, release view, release createReleases
variable list, variable get, variable setCI/CD variables
schedule list, schedule create, schedule runPipeline schedules
label list, label createLabels
milestone list, milestone createMilestones
glab-search-code <query>Code search
glab <command> --help
glab <command> <subcommand> --help
Similar Skills
cache-components

Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.

138.5k
Stats
Parent Repo Stars3
Parent Repo Forks1
Last CommitFeb 24, 2026