gitlab-cli

A command-line tool for managing GitLab, a platform for hosting code and coordinating software work. It covers issues, merge requests, automated pipelines, repositories, and project tasks.

In plain words
What is it for?
Use it to fetch or review merge requests, manage issues, inspect pipelines, and perform repository or project-management operations.
Why use it?
It lets an agent work with GitLab projects from the terminal instead of requiring manual web-interface steps.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/abdullahkhawer/devops-skills/gitlab-cli
Any agent
npx skills add abdullahkhawer/devops-skills --skill gitlab-cli
Clone the repo
git clone --depth 1 https://github.com/abdullahkhawer/devops-skills

Made for: Claude Code, Codex.

Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 837 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00072 $0.00837
Opus 5 $0.00036 $0.00418
Sonnet 5 $0.00014 $0.00167
Haiku 4.5 $0.00007 $0.00084

Measured 2d ago against content hash 505513dbc082, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gitlab-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/gitlab-cli/SKILL.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitLab CLI Skill

Use the instance and rules below when constructing all glab commands.

Configuration

Set your GitLab hostname below before using this skill:

Setting Value
GitLab Hostname <YOUR_GITLAB_HOSTNAME> (e.g. gitlab.example.com)

Replace <YOUR_GITLAB_HOSTNAME> with your GitLab instance hostname throughout this skill.

Prerequisites (one-time setup by user)

If not already authenticated, inform the user that authentication is required and ask them to complete the following steps manually. Do not perform these steps yourself.

  1. Install the glab CLI if not already installed:
brew install glab
  1. Run the following command to authenticate with your GitLab instance:
glab auth login --hostname <YOUR_GITLAB_HOSTNAME>

MR Code Review

When asked to review a GitLab MR or PR (URL or MR ID provided), extract the <group/repo> and <MR_ID> from the URL (ask the user if the repo is missing), then use glab api --hostname <YOUR_GITLAB_HOSTNAME> to fetch the MR metadata (projects/<URL_ENCODED_REPO>/merge_requests/<MR_ID>) and its diff (…/diffs --paginate), where the repo path is URL-encoded with /%2F. To fully understand the context and impact of all code changes, read the complete source branch codebase — the diff alone does not capture the surrounding logic, dependencies, or broader design that the changes interact with. Report the MR title, author, and branches, then review all changed files for: secrets/injection/XSS (security), inefficient algorithms/memory leaks (performance), code smells/dead code (quality), missing error handling, excessive or sensitive logging, and missing/outdated documentation. For each finding, include the file path, line number(s), the problematic snippet, and a suggested fix. If nothing is wrong, summarize what was reviewed and state it looks good.

Rules

  • NEVER target any GitLab instance other than <YOUR_GITLAB_HOSTNAME>. If a command or URL references a different host, stop and ask the user to confirm.
  • Always pass --repo <YOUR_GITLAB_HOSTNAME>/<group/repo> explicitly for any glab subcommand that accepts it (e.g., mr list, issue list, pipeline list) — without it, the command infers the repo from the current git directory, which may silently return wrong results.
  • When using glab api, always pass --hostname <YOUR_GITLAB_HOSTNAME> explicitly — omitting it may default to gitlab.com.
  • NEVER use glab repo list --group — it does not work reliably against self-hosted instances; use glab api --hostname <YOUR_GITLAB_HOSTNAME> "groups/<GROUP>/projects" instead. For nested subgroups, URL-encode the slashes: "groups/parent%2Fchild/projects".
  • All glab api calls that return lists are paginated (default 20/page). Always pass --paginate to fetch all pages: glab api --hostname <YOUR_GITLAB_HOSTNAME> --paginate "<endpoint>".
  • For glab mr list, prefer explicit state flags over --state: use --closed (-c) for closed, --merged (-M) for merged, or --all (-A) for all states. Omitting a state flag returns open MRs by default.

Read the full file on GitHub · 48 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 48 lines · 72 tokens per session scan A 505513dbc082

Subscribe to this mod's changes

gitlab-cli is a skill published in the GitHub repository abdullahkhawer/devops-skills (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 72 tokens to every session and 837 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.