← 返回 Skills 市场
wufei-png

glab-cli-skill

作者 Wu Fei · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
139
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

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 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 \x3Ccommand> --help before 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.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.

安全使用建议
This is an instruction-only help pack for the official glab CLI and appears coherent. Before using it, remember: the guidance includes commands that can mutate repositories (create/merge/close, push, run CI) — always confirm target repo/branch and credentials before running destructive commands. Treat any token files referenced (myaccesstoken.txt) as sensitive; don't paste secret tokens into untrusted UIs or store them in publicly readable files. If you need automatic execution, review the exact commands the agent will run and grant only the minimum token scopes required (api / write_repository as documented).
功能分析
Type: OpenClaw Skill Name: glab-cli-skill Version: 1.0.0 The skill bundle provides legitimate and well-structured guidance for using the GitLab CLI (glab). It includes safety checks, emphasizes read-only operations, and provides clear instructions for common workflows like merge requests, issues, and CI/CD pipelines without any signs of malicious intent or data exfiltration.
能力评估
Purpose & Capability
Name/description match the content: all files are usage guidance for glab (MRs, issues, CI, repo, and api). There are no unrelated binaries, credentials, or external services required beyond normal GitLab usage patterns.
Instruction Scope
SKILL.md and references only instruct glab and git commands, preflight checks, and safe patterns (confirm repo/branch before mutation). Examples that show reading a token from a file or using GITLAB_HOST are appropriate for authentication and self-hosted usage; there are no instructions to read arbitrary user files or exfiltrate data.
Install Mechanism
No install spec and no code files — instruction-only skill. Nothing is downloaded or written to disk by the skill itself.
Credentials
The skill does not declare required env vars or credentials. It sensibly references common runtime variables (GITLAB_HOST) and token usage patterns (glab auth --stdin / --token) which are appropriate and expected for a GitLab CLI guide.
Persistence & Privilege
always is false, the skill is user-invocable and does not request persistent system presence or modification of other skills or system-wide configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install glab-cli-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /glab-cli-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- 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.
元数据
Slug glab-cli-skill
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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。

💬 留言讨论