
Glab
Teach your coding agent to drive GitLab merge requests, issues, pipelines, and repo workflows from the terminal with the official glab CLI.
Overview
glab is an agent skill most often used in Build (also Ship, Operate) that guides agents through GitLab CLI authentication and workflows for merge requests, issues, CI/CD, and repositories.
Install
npx skills add https://github.com/henricook/claude-glab-skill --skill glabWhat is this skill?
- Covers merge-request create/review, issues, CI/CD trigger/monitor, and repository operations via glab
- Authentication quick start: interactive login, auth status, self-hosted hostname, and GITLAB_TOKEN/GITLAB_HOST env vars
- Prerequisite gate: verify install with glab --version before running commands
- End-to-end MR workflow: git push branch then glab mr create with title and description
- Allowed agent tools: Bash, Read, Grep, Glob for terminal GitLab operations
Adoption & trust: 695 installs on skills.sh; 60 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need your agent to open GitLab merge requests, triage issues, or check pipelines without hand-typing fragile API calls or clicking through the UI.
Who is it for?
Solo builders on GitLab.com or self-hosted GitLab who want Claude Code, Cursor, or Codex to manage MRs, issues, and pipelines from the terminal.
Skip if: Teams on GitHub-only workflows (use gh instead), builders who refuse CLI auth tokens, or environments where Bash and network access to GitLab are blocked.
When should I use this skill?
The user needs to interact with GitLab resources or perform GitLab workflows from the command line—merge requests, issues, CI/CD, or repositories.
What do I get? / Deliverables
Your agent runs verified, authenticated glab commands for GitLab operations and follows documented MR and auth patterns instead of improvised shell snippets.
- Authenticated glab command sequences for the requested GitLab operation
- Documented MR/issue/pipeline steps aligned with push-then-mr-create workflow
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
glab is the command-line bridge to GitLab; solo builders install it while wiring repos and automation during the build phase, before daily ship and operate routines. Integrations is the canonical shelf because the skill documents authenticated CLI access and workflows against GitLab APIs—not a one-off review checklist or deploy runbook alone.
Where it fits
Wire glab auth and push a feature branch, then open an MR with title and description from the agent session.
List and inspect open merge requests before release without leaving the terminal.
Monitor or trigger CI/CD pipelines ahead of a tagged release.
Check pipeline status on main after a deploy regression.
Create or update GitLab issues while scoping the next sprint from the repo.
How it compares
Agent procedural knowledge for the official GitLab CLI—not the GitHub gh skill and not a hosted MCP GitLab server.
Common Questions / FAQ
Who is glab for?
glab is for solo and indie developers who ship on GitLab and want their AI coding agent to perform GitLab operations—MRs, issues, CI/CD, repos—using the glab CLI with correct auth and command patterns.
When should I use glab?
Use glab when you need to create or review merge requests, manage issues, monitor or trigger pipelines, clone or configure repos, or any GitLab task from the command line during build integrations, ship review and launch prep, or operate monitoring of CI status.
Is glab safe to install?
The skill encourages checking glab --version and using glab auth status before destructive actions; review the Security Audits panel on this Prism page and treat GITLAB_TOKEN like any production secret.
SKILL.md
READMESKILL.md - Glab
# GitLab CLI (glab) Skill Provides guidance for using `glab`, the official GitLab CLI, to perform GitLab operations from the terminal. ## When to Use This Skill Invoke when the user needs to: - Create, review, or manage merge requests - Work with GitLab issues - Monitor or trigger CI/CD pipelines - Clone or manage repositories - Perform any GitLab operation from the command line ## Prerequisites Verify glab installation before executing commands: ```bash glab --version ``` If not installed, inform the user and provide platform-specific installation guidance. ## Authentication Quick Start Most glab operations require authentication: ```bash # Interactive authentication glab auth login # Check authentication status glab auth status # For self-hosted GitLab glab auth login --hostname gitlab.example.org # Using environment variables export GITLAB_TOKEN=your-token export GITLAB_HOST=gitlab.example.org # for self-hosted ``` ## Core Workflows ### Creating a Merge Request ```bash # 1. Ensure branch is pushed git push -u origin feature-branch # 2. Create MR glab mr create --title "Add feature" --description "Implements X" # With reviewers and labels glab mr create --title "Fix bug" --reviewer=alice,bob --label="bug,urgent" ``` ### Reviewing Merge Requests ```bash # 1. List MRs awaiting your review glab mr list --reviewer=@me # 2. Checkout MR locally to test glab mr checkout <mr-number> # 3. After testing, approve glab mr approve <mr-number> # 4. Add review comments glab mr note <mr-number> -m "Please update tests" ``` ### Managing Issues ```bash # Create issue with labels glab issue create --title "Bug in login" --label=bug # Link MR to issue glab mr create --title "Fix login" --description "Closes #<issue-number>" # List your assigned issues glab issue list --assignee=@me ``` ### Monitoring CI/CD ```bash # Watch pipeline in progress glab pipeline ci view # Check pipeline status glab ci status # View logs if failed glab ci trace # Retry failed pipeline glab ci retry # Lint CI config before pushing glab ci lint ``` ## Common Patterns ### Working Outside Repository Context When not in a Git repository, specify the repository: ```bash glab mr list -R owner/repo glab issue list -R owner/repo ``` ### Self-Hosted GitLab Set hostname for all commands: ```bash export GITLAB_HOST=gitlab.example.org # or per-command glab repo clone gitlab.example.org/owner/repo ``` ### Automation and Scripting Use JSON output for parsing: ```bash glab mr list --output=json | jq '.[] | .title' ``` ### Using the API Command The `glab api` command provides direct GitLab API access: ```bash # Basic API call glab api projects/:id/merge_requests # IMPORTANT: Pagination uses query parameters in URL, NOT flags # ❌ WRONG: glab api --per-page=100 projects/:id/jobs # ✓ CORRECT: glab api "projects/:id/jobs?per_page=100" # Auto-fetch all pages glab api --paginate "projects/:id/pipelines/123/jobs?per_page=100" # POST with data glab api --method POST projects/:id/issues --field title="Bug" --field description="Details" ``` ## Best Practices 1. **Verify authentication** before executing commands: `glab auth status` 2. **Use `--help`** to explore command options: `glab <command> --help` 3. **Link MRs to issues** using "Closes #123" in MR description 4. **Lint CI config** before pushing: `glab ci lint` 5. **Check repository context** when commands fail: `git remote -v` ## Common Commands Quick Reference **Merge Requests:** - `glab mr list --assignee=@me` - Your assigned MRs - `glab mr list --reviewer=@me` - MRs for you to review - `glab mr create` - Create new MR - `glab mr checkout <number>` - Te