glab-cli

Installation
SKILL.md

GitLab CLI (glab)

Rules

  • ALWAYS verify auth before first command: glab auth status
  • ALWAYS use -R owner/repo when not inside the target git repo
  • For self-hosted GitLab, set GITLAB_HOST in the command environment when this installed glab does not support a global --hostname flag. Check glab <command> --help before using --hostname; some versions accept --hostname for auth but not for MR commands.
  • Use --output=json when parsing output programmatically
  • NEVER hardcode tokens in commands — use glab auth login or GITLAB_TOKEN env var
  • Pagination params go in URL, not flags: glab api "projects/:id/jobs?per_page=100" (NOT --per-page)
  • When creating MRs, ALWAYS add --remove-source-branch --squash-before-merge unless the user explicitly says otherwise.
  • Some glab versions do not support --hostname on MR commands. For self-hosted GitLab operations, prefer running inside the target repo with the correct remote, or set GITLAB_HOST=<host> and use -R owner/repo.

Auth

Installs
37
Repository
wenerme/ai
GitHub Stars
7
First Seen
Mar 1, 2026
glab-cli — wenerme/ai