glab
Files
SKILL.mdagentsreferencesscripts
Install
Install the containing plugin
/plugin install ci-cd@llm-skills
Invoke this skill after installation
/ci-cd:glab
This skill is bundled inside ci-cd. Install the plugin once, then Claude Code can use any of its included skills. Browse the full plugin repository at github.com/alisonaquinas/llm-ci-dev.
SKILL.md
name: glab
description: Operate GitLab CLI (glab) for authentication checks, host and repository context inspection, merge request/issue/CI workflows, and safe command planning. Use when tasks mention glab, GitLab merge requests/issues/pipelines/releases, or GitLab API operations from the terminal.
GitLab CLI
Intent Router
| Request | Reference | Load When |
|---|---|---|
| Install tool, first-time setup | references/install-and-setup.md | User needs to install glab or do initial authentication |
| Command patterns, workflows | references/command-cookbook.md | User needs MR/issue/CI/release patterns or workflow examples |
| GitLab concepts, organization | references/gitlab-concepts.md | User asks about groups/projects, namespaces, runners, visibility, or CI variables |
Workflow
- Run preflight before GitLab CLI workflows.
- Check auth status and active host context.
- Choose a core command track and begin with inspect commands.
- Require explicit confirmation before write/delete actions.
- Re-check status and summarize outcomes.
Preflight
Use bundled scripts:
scripts/glab-preflight.shscripts/glab-auth-status.shscripts/glab-context.shscripts/glab-diagnostics.sh [--json] [--out <file>]
If the environment cannot access the default config location, set:
export GLAB_CONFIG_DIR=/tmp/glab-config
Core Command Tracks
- Auth and host checks:
glab auth status,glab auth login - Repository, issue, and MR inspection:
glab repo view,glab issue list,glab mr list,glab mr view <id> - CI and release inspection:
glab ci list,glab ci view,glab release list - API calls:
glab api <path>for focused GitLab API reads.
Safety Guardrails
- Inspect first with
list/viewcommands. - Ask for explicit confirmation before commands that create/edit/close/delete resources.
- Confirm active host and project before mutating operations.
- Never print tokens or secrets.
Troubleshooting
- If auth fails, run
glab auth loginthen re-runscripts/glab-auth-status.sh. - If host context is wrong, verify config and re-check with
scripts/glab-context.sh. - If network/API calls fail, collect
scripts/glab-diagnostics.sh --jsonoutput before retry.
# Verify auth and inspect the current merge request in the working branch
glab auth status
glab mr list --state=opened
glab mr view
References
references/command-cookbook.md- GitLab CLI docs: https://docs.gitlab.com/cli/