/install glab-cli-skill
GitLab CLI (glab) Skill
Use glab when the user wants to operate on GitLab from the terminal. These instructions are verified against glab 1.90.0.
This hot path is intentionally narrow: merge requests, issues, CI/CD, repo targeting, repo view/clone/fork, and glab api. Broader project administration should only be documented through a dedicated reference file.
When to Use
Invoke this skill when the user needs to:
- Create, review, update, merge, or inspect merge requests
- Create, inspect, or update issues
- Check, run, retry, cancel, or inspect CI/CD pipelines and jobs
- Target a repository explicitly, or view, clone, or fork it
- Work with self-hosted GitLab instances
- Make direct GitLab REST or GraphQL API calls with
glab api
Preflight
Run these checks before doing real work:
glab --version
glab auth status
git remote -v
If not inside a Git repository, do not guess context. Use one of these patterns instead:
glab mr list -R group/project
glab issue list -R group/project
glab repo view group/project
glab repo view https://gitlab.example.org/group/project.git
For self-hosted GitLab, set the host explicitly when needed:
glab auth login --hostname gitlab.example.org
GITLAB_HOST=gitlab.example.org glab repo view group/project
glab api --hostname gitlab.example.org projects/:id
Execution Policy
- Prefer read-only commands first:
list,view,status,trace. - Prefer structured output when the user wants filtering or automation:
--output jsonformr,ci, andrepocommands-O jsonforissue list--output ndjsonfor largeglab api --paginateresponses piped tojq
- Before remote mutations, confirm the repository, target object, and branch. This matters for
mr create,mr merge,mr close,issue close,ci run,ci retry,ci cancel,ci delete, andrepo forkcommands. - If
glab auth statusshows missing or invalid credentials, stop and ask the user to authenticate instead of retrying failing API calls. - Use
glab \x3Ccommand> --helpbefore guessing flags. CLI behavior changes across releases. - For
glab api, pagination belongs in the endpoint query string. Example:
glab api "projects/:id/jobs?per_page=100" --paginate --output ndjson
Common Workflows
Merge Requests
glab mr list --reviewer=@me --output json
glab mr checkout 123
glab mr view 123 --comments
glab mr create -t "Add feature" -d "Implements X" --reviewer alice,bob -l feature
glab mr create --related-issue 123 --fill --yes
glab mr update 123 --ready
glab mr note 123 -m "Please add tests"
glab mr merge 123 --auto-merge
glab mr create --fill sets push to true. Confirm git status, the current branch, and the target remote before using --fill --yes.
Issues
glab issue list --assignee=@me -O json
glab issue view 456 --comments
glab issue create -t "Bug in login" -l bug -d "Steps to reproduce"
glab issue update 456 --label "bug,confirmed"
glab issue close 456
CI/CD
glab ci list -s failed -F json
glab ci status --live
glab pipeline ci view -b main
glab ci trace lint
glab ci run -b main --variables DEPLOY_ENV:staging
glab ci retry lint
glab ci cancel pipeline 123
References
Load only the smallest file that matches the task:
references/quick-reference.mdfor a short cheat sheetreferences/auth.mdfor authentication, repo context, self-hosted hosts, and 401/403/404 errorsreferences/merge-requests.mdfor MR workflows, comments, merge strategies, and MR-specific failuresreferences/issues.mdfor issue creation, editing, linking, and issue-specific failuresreferences/ci.mdfor pipeline and job inspection, reruns, cancelation, variables, and CI failuresreferences/api.mdforglab api, pagination, GraphQL, and automation patterns
Load a reference only when the task needs deeper flags, examples, or troubleshooting than this file provides.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install glab-cli-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/glab-cli-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
glab-cli-skill 是什么?
Guidance for using the GitLab CLI (`glab`) from the terminal for merge requests, issues, CI/CD pipelines and jobs, repository targeting and inspection, clone... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 139 次。
如何安装 glab-cli-skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install glab-cli-skill」即可一键安装,无需额外配置。
glab-cli-skill 是免费的吗?
是的,glab-cli-skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
glab-cli-skill 支持哪些平台?
glab-cli-skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 glab-cli-skill?
由 Wu Fei(@wufei-png)开发并维护,当前版本 v1.0.0。