Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

gitlab-cli-skillsGitLab CLI skills 命令行

Agent Skill

用于围绕 GitLab 项目、Merge Request、Issue、分支、流水线和代码审查流程提供辅助能力。它适合让 Agent 查询项目状态、整理提交差异、辅助检查合并请求或汇总 CI 结果。使用时需要确认项目权限、访问 token 和目标分支范围;涉及合并、推送、改工单或触发流水线时,应先预览影响并核对团队流程。

总安装

17,996

周安装

721

GitHub Stars

27

下载量

5,826
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gitlab-cli-skills(GitLab CLI skills 命令行)
来源仓库:https://github.com/vince-winkintel/gitlab-cli-skills
仓库路径:skills/gitlab-cli-skills
安装命令:
npx skills add https://github.com/vince-winkintel/gitlab-cli-skills --skill gitlab-cli-skills
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vince-winkintel/gitlab-cli-skills --skill gitlab-cli-skills

简介

用于围绕 GitLab 项目、Merge Request 和流水线提供辅助能力。

  • 可查询项目状态、整理提交差异或汇总 CI 结果。
  • 通过 npx skills add 命令从 GitHub 仓库安装使用。
  • 需确认项目权限和访问 token 安全性。
  • gitlab-cli-skills 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

GitLab CLI Skills

Comprehensive GitLab CLI (glab) command reference and workflows.

Quick start

# First time setup
glab auth login

# Common operations
glab mr create --fill              # Create MR from current branch
glab issue create                  # Create issue
glab ci view                       # View pipeline status
glab repo view --web              # Open repo in browser

Multi-agent identity note

When you want different agents to appear as different GitLab users, give each agent its own GitLab bot/service account. Multiple personal access tokens on the same GitLab user still act as that same visible identity.

Use the Actor identity for actor-authored GitLab comments, replies, approvals, and other writes. Use an agent identity only when the GitLab action is explicitly that agent's own work product. Choose the intended visible actor before the first GitLab write.

Treat shell identity as sticky and unsafe by default. If another env file was sourced earlier in the same shell/session, glab may still write as that previously loaded identity unless you deliberately switch and verify first.

A practical pattern is one env file per actor, for example ~/.config/openclaw/env/gitlab-actor.env, ~/.config/openclaw/env/gitlab-reviewer.env, and ~/.config/openclaw/env/gitlab-release.env. Keep these env files outside version control, restrict their permissions (for example chmod 600), be mindful of backup exposure, and use least-privilege bot/service-account tokens. In a reused shell, clear stale GitLab auth vars first or start a fresh shell. If those files use plain KEY=value lines, load them with exported vars before running glab:

unset GITLAB_TOKEN GITLAB_ACCESS_TOKEN OAUTH_TOKEN GITLAB_HOST
set -a
source ~/.config/openclaw/env/gitlab-<actor>.env
set +a

Plain source updates the current shell but may not export variables to child processes such as glab. If the token/host vars are not exported, glab may silently fall back to shared stored auth from ~/.config/glab-cli/config.yml, which can make the wrong account appear to perform the action.

Required pre-flight before any GitLab write

Run this immediately before any GitLab write, including glab mr note, review replies/approvals, and any glab api POST/PATCH/PUT/DELETE call:

glab auth status --hostname "$GITLAB_HOST"
glab api --hostname "$GITLAB_HOST" user

This assumes the target actor env file set GITLAB_HOST for the exact GitLab instance you intend to modify. Do not write until both commands clearly show the intended visible actor on that host.

Wrong-identity remediation

If a comment or reply was posted under the wrong identity:

  1. Stop posting.
  2. Delete the mistaken comment or reply if cleanup is needed.
  3. unset GITLAB_TOKEN GITLAB_ACCESS_TOKEN OAUTH_TOKEN GITLAB_HOST or start a fresh shell.
  4. Source the correct env file with set -a; source...; set +a.
  5. Rerun glab auth status --hostname "$GITLAB_HOST" and glab api --hostname "$GITLAB_HOST" user.
  6. Repost under the correct actor.
  7. Verify the thread no longer shows the wrong visible author for the replacement message.

If the wrong-identity write changed state beyond a comment or reply, do not treat the comment cleanup steps as sufficient. Re-auth as above, then use the matching GitLab reversal for that write under the correct actor and host, such as unapproving an MR or sending the compensating glab api --hostname "$GITLAB_HOST" mutation for the exact resource that was changed.

Skill organization

This skill routes to specialized sub-skills by GitLab domain:

Core Workflows:

  • glab-mr - Merge requests: create, review, approve, merge
  • glab-issue - Issues: create, list, update, close, comment
  • glab-ci - CI/CD: pipelines, jobs, logs, artifacts
  • glab-repo - Repositories: clone, create, fork, manage

Project Management:

  • glab-milestone - Release planning and milestone tracking
  • glab-iteration - Sprint/iteration management
  • glab-label - Label management and organization
  • glab-release - Software releases and versioning

Authentication & Config:

  • glab-auth - Login, logout, Docker registry auth
  • glab-config - CLI configuration and defaults
  • glab-ssh-key - SSH key management
  • glab-gpg-key - GPG keys for commit signing
  • glab-token - Personal and project access tokens
  • glab-todo - Personal GitLab to-do triage and completion

CI/CD Management:

  • glab-job - Individual job operations
  • glab-schedule - Scheduled pipelines and cron jobs
  • glab-variable - CI/CD variables and secrets
  • glab-securefile - Secure files for pipelines
  • glab-runner - Runner management: list, assign/unassign, inspect jobs/managers, pause/unpause, delete
  • glab-runner-controller - Runner controller, scope, and token management (EXPERIMENTAL, admin-only)

Collaboration:

  • glab-user - User profiles and information
  • glab-snippet - Code snippets (GitLab gists)
  • glab-incident - Incident management
  • glab-workitems - Work items: tasks, OKRs, key results, next-gen epics

Advanced:

  • glab-api - Direct REST API calls
  • glab-cluster - Kubernetes cluster integration
  • glab-deploy-key - Deploy keys for automation
  • glab-quick-actions - GitLab slash command quick actions for batching state changes
  • glab-stack - Stacked/dependent merge requests
  • glab-opentofu - Terraform/OpenTofu state management

Utilities:

  • glab-alias - Custom command aliases
  • glab-completion - Shell autocompletion
  • glab-help - Command help and documentation
  • glab-version - Version information
  • glab-check-update - Update checker
  • glab-changelog - Changelog generation
  • glab-attestation - Software supply chain security
  • glab-duo - GitLab Duo AI assistant
  • glab-mcp - Model Context Protocol server for AI assistant integration (EXPERIMENTAL)

When to use glab vs web UI

Use glab when:

  • Automating GitLab operations in scripts
  • Working in terminal-centric workflows
  • Batch operations (multiple MRs/issues)
  • Integration with other CLI tools
  • CI/CD pipeline workflows
  • Faster navigation without browser context switching

Use web UI when:

  • Complex diff review with inline comments
  • Visual merge conflict resolution
  • Configuring repo settings and permissions
  • Advanced search/filtering across projects
  • Reviewing security scanning results
  • Managing group/instance-level settings

Common workflows

Daily development

# Start work on issue
glab issue view 123
git checkout -b 123-feature-name

# Create MR when ready
glab mr create --fill --draft

# Mark ready for review
glab mr update --ready

# Merge after approval
glab mr merge --when-pipeline-succeeds --remove-source-branch

Code review

# List your review queue
glab mr list --reviewer=@me --state=opened

# Review an MR
glab mr checkout 456
glab mr diff
npm test

# Approve
glab mr approve 456
glab mr note 456 -m "LGTM! Nice work on the error handling."

CI/CD debugging

# Check pipeline status
glab ci status

# View failed jobs
glab ci view

# Get job logs
glab ci trace <job-id>

# Retry failed job
glab ci retry <job-id>

Decision Trees

"Should I create an MR or work on an issue first?"

Need to track work?
├─ Yes → Create issue first (glab issue create)
│         Then: glab mr for <issue-id>
└─ No → Direct MR (glab mr create --fill)

Use glab issue create + glab mr for when:

  • Work needs discussion/approval before coding
  • Tracking feature requests or bugs
  • Sprint planning and assignment
  • Want issue to auto-close when MR merges

Use glab mr create directly when:

  • Quick fixes or typos
  • Working from existing issue
  • Hotfixes or urgent changes

"Which CI command should I use?"

What do you need?
├─ Overall pipeline status → glab ci status
├─ Visual pipeline view → glab ci view
├─ Specific job logs → glab ci trace <job-id>
├─ Download build artifacts → glab ci artifact <ref> <job-name>
├─ Validate config file → glab ci lint
├─ Trigger new run → glab ci run
└─ List all pipelines → glab ci list

Quick reference:

  • Pipeline-level: glab ci status, glab ci view, glab ci run
  • Job-level: glab ci trace, glab job retry, glab job view
  • Artifacts: glab ci artifact (by pipeline) or job artifacts via glab job

"Clone or fork?"

What's your relationship to the repo?
├─ You have write access → glab repo clone group/project
├─ Contributing to someone else's project:
│   ├─ One-time contribution → glab repo fork + work + MR
│   └─ Ongoing contributions → glab repo fork, then sync regularly
└─ Just reading/exploring → glab repo clone (or view --web)

Fork when:

  • You don't have write access to the original repo
  • Contributing to open source projects
  • Experimenting without affecting the original
  • Need your own copy for long-term work

Clone when:

  • You're a project member with write access
  • Working on organization/team repositories
  • No need for a personal copy

"Project vs group labels?"

Where should the label live?
├─ Used across multiple projects → glab label create --group <group>
└─ Specific to one project → glab label create (in project directory)

Group-level labels:

  • Consistent labeling across organization
  • Examples: priority::high, type::bug, status::blocked
  • Managed centrally, inherited by projects

Project-level labels:

  • Project-specific workflows
  • Examples: needs-ux-review, deploy-to-staging
  • Managed by project maintainers

Related Skills

MR and Issue workflows:

  • Start with glab-issue to create/track work
  • Use glab-mr to create MR that closes issue
  • Script: scripts/create-mr-from-issue.sh automates this

CI/CD debugging:

  • Use glab-ci for pipeline-level operations
  • Use glab-job for individual job operations
  • Script: scripts/ci-debug.sh for quick failure diagnosis

Repository operations:

  • Use glab-repo for repository management
  • Use glab-auth for authentication setup
  • Script: scripts/sync-fork.sh for fork synchronization

Configuration:

  • Use glab-auth for initial authentication
  • Use glab-config to set defaults and preferences
  • Use glab-alias for custom shortcuts

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.8%
按下载量换算2,144

Claude

32.59%
按下载量换算1,899

Cursor

17.71%
按下载量换算1,032

Gemini CLI

9.28%
按下载量换算541

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills