返回顶部
g

glab-cli

Guidance for using the GitLab CLI (`glab`) from the terminal for merge requests, issues, CI/CD pipelines and jobs, repository targeting and inspection, clone and fork workflows, self-hosted GitLab instances, and direct GitLab REST or GraphQL API calls.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
98
下载量
0
收藏
概述
安装方式
版本历史

glab-cli

# 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: ```bash glab --version glab auth status git remote -v ``` If not inside a Git repository, do not guess context. Use one of these patterns instead: ```bash 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: ```bash 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 json` for `mr`, `ci`, and `repo` commands - `-O json` for `issue list` - `--output ndjson` for large `glab api --paginate` responses piped to `jq` - 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`, and `repo fork` commands. - If `glab auth status` shows missing or invalid credentials, stop and ask the user to authenticate instead of retrying failing API calls. - Use `glab <command> --help` before guessing flags. CLI behavior changes across releases. - For `glab api`, pagination belongs in the endpoint query string. Example: ```bash glab api "projects/:id/jobs?per_page=100" --paginate --output ndjson ``` ## Common Workflows ### Merge Requests ```bash 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 ```bash 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 ```bash 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.md` for a short cheat sheet - `references/auth.md` for authentication, repo context, self-hosted hosts, and 401/403/404 errors - `references/merge-requests.md` for MR workflows, comments, merge strategies, and MR-specific failures - `references/issues.md` for issue creation, editing, linking, and issue-specific failures - `references/ci.md` for pipeline and job inspection, reruns, cancelation, variables, and CI failures - `references/api.md` for `glab api`, pagination, GraphQL, and automation patterns Load a reference only when the task needs deeper flags, examples, or troubleshooting than this file provides.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 glab-cli-skill-1776002174 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 glab-cli-skill-1776002174 技能

通过命令行安装

skillhub install glab-cli-skill-1776002174

下载 Zip 包

⬇ 下载 glab-cli v1.0.0

文件大小: 8.56 KB | 发布时间: 2026-4-13 10:27

v1.0.0 最新 2026-4-13 10:27
- Initial release of glab-cli skill.
- Added comprehensive guidance for using the GitLab CLI (`glab`) to manage merge requests, issues, CI/CD, repository targeting, authentication, and API calls.
- Introduced a more focused execution policy and preflight checks.
- Expanded support for self-hosted GitLab instances.
- Modularized documentation through reference files for quick lookup and deep-dive use cases.
- Replaced and enhanced SKILL.md to match new skill scope and usage style.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部