glab
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
glab CLI Skill
Use the glab CLI for ALL GitLab-related tasks including working with issues, merge requests, CI/CD pipelines, and releases. If given a GitLab URL, use glab to get the information needed.
Before you start
- Detect GitLab URLs: If the user provided a URL containing "gitlab" in the hostname, this is a GitLab resource. Do NOT use WebFetch, curl, or browser-based tools -- GitLab instances require authentication that only
glabcan provide. Extract the hostname and project path from the URL and proceed withglabcommands. This applies to all GitLab URL types, including file URLs (/-/raw/,/-/blob/,/-/tree/) -- see the "Repository files" section for how to fetch file contents viaglab api. - Confirm it's a GitLab project: check
git remote -vfor "gitlab" in the URL. If so, useglab(notgh). - Verify authentication: run
glab auth status. If not authenticated for the relevant hostname, stop and ask the user -- do not proceed.
CLI-first principle
Always prefer glab subcommands (glab issue list, glab mr list, glab ci status, etc.) over raw glab api calls. The CLI subcommands provide better output formatting, pagination, and are less error-prone. Use glab api only when no subcommand covers the operation (see the glab api section below).
Targeting a project
Before running any glab command, determine the project context: