Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问clear审计提醒

gitlabGitLab 代码协作

Agent Skill

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

总安装

3,944

周安装

166

GitHub Stars

3

下载量

1,381
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/odyssey4me/agent-skills --skill gitlab

简介

gitlab 用于围绕 GitLab 项目、Merge Request、Issue、分支、流水线和代码审查流程提供辅助能力,适合让 Agent 查询项目状态、整理提交差异、辅助检查合并请求或汇总 CI 结果。

  • 适用于 GitLab 项目管理、代码协作和流水线监控等待分类场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法和功能边界。
  • 使用时需要确认项目权限、访问 token 和目标分支范围,涉及合并、推送时应先预览影响。
  • gitlab 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

GitLab Skill

This skill provides GitLab integration using the official glab CLI tool. A Python wrapper script produces markdown-formatted output for read/view operations. Action commands (create, merge, close, comment) should use glab directly.

Prerequisites

Install glab CLI: installation guide

Authentication

# Authenticate with GitLab
glab auth login

# Verify authentication
glab auth status

Supports GitLab.com, GitLab Dedicated, and GitLab Self-Managed instances. See GitLab CLI Authentication for details.

Script Usage

The wrapper script (scripts/gitlab.py) formats output as markdown. Use it for read/view operations to get agent-consumable output. Use glab directly for action commands (create, merge, close, comment). See permissions.md for read/write classification of each command.

# Check glab CLI is installed and authenticated
$SKILL_DIR/scripts/gitlab.py check

# Issues
$SKILL_DIR/scripts/gitlab.py issues list --repo GROUP/REPO
$SKILL_DIR/scripts/gitlab.py issues view 123 --repo GROUP/REPO

# Merge Requests
$SKILL_DIR/scripts/gitlab.py mrs list --repo GROUP/REPO
$SKILL_DIR/scripts/gitlab.py mrs view 456 --repo GROUP/REPO

# Pipelines
$SKILL_DIR/scripts/gitlab.py pipelines list --repo GROUP/REPO
$SKILL_DIR/scripts/gitlab.py pipelines view 123456 --repo GROUP/REPO

# Repositories
$SKILL_DIR/scripts/gitlab.py repos list
$SKILL_DIR/scripts/gitlab.py repos view GROUP/REPO

All commands support --limit N for list commands (default 30).

Commands (Direct glab Usage)

For action commands, use glab directly:

Issues

glab issue list                    # List issues
glab issue view 123                # View issue details
glab issue create                  # Create new issue
glab issue note 123                # Add comment
glab issue close 123               # Close issue
glab issue update 123 --label bug  # Edit issue

Full reference: glab issue

Merge Requests

glab mr list                       # List merge requests
glab mr view 456                   # View MR details
glab mr create                     # Create new MR
glab mr approve 456                # Approve MR
glab mr merge 456                  # Merge MR
glab mr checkout 456               # Checkout MR branch
glab mr diff 456                   # View MR diff
glab mr note 456                   # Add comment to MR

Full reference: glab mr

Pipelines & CI/CD

glab ci list                       # List pipelines
glab ci view 123456                # View pipeline details
glab ci run                        # Trigger pipeline
glab ci trace                      # Watch pipeline logs
glab ci retry 123456               # Retry failed pipeline
glab ci status                     # Show pipeline status

Full references:

Repositories

glab repo list                     # List repositories
glab repo view GROUP/REPO          # View repository
glab repo create                   # Create repository
glab repo clone GROUP/REPO         # Clone repository
glab repo fork GROUP/REPO          # Fork repository

Full reference: glab repo

Releases

glab release list                  # List releases
glab release view v1.0.0           # View release details
glab release create v1.0.0         # Create release
glab release delete v1.0.0         # Delete release

Full reference: glab release

Examples

Daily MR Review

# List MRs assigned to you
glab mr list --assignee=@me

# Review a specific MR
$SKILL_DIR/scripts/gitlab.py mrs view 456
glab mr diff 456
glab mr approve 456

# Verify approval was recorded
$SKILL_DIR/scripts/gitlab.py mrs view 456  # check approval status

Create Issue and Link MR

# Create issue
glab issue create --title "Bug: Login fails" --description "Description" --label bug
# Verify: note the issue number from output

# Create MR that closes it (use issue number from above)
glab mr create --title "Fix login bug" --description "Closes #123"
# Verify MR was created and linked
$SKILL_DIR/scripts/gitlab.py mrs view <number>

Monitor CI Pipeline

# Check current pipeline status
glab ci status

# Watch pipeline logs in real-time
glab ci trace

# Retry failed jobs
glab ci retry
# Verify pipeline restarted
$SKILL_DIR/scripts/gitlab.py pipelines list

See common-workflows.md for more examples.

Advanced Usage

JSON Output for Scripting

# Get JSON output
glab issue list --output json

# Process with jq
glab mr list --output json | jq '.[] | "\(.iid): \(.title)"'

GitLab API Access

For operations not covered by glab commands:

# Make authenticated API request
glab api projects/:id/issues

# POST request
glab api projects/:id/issues -X POST -f title="Issue" -f description="Text"

# Process response
glab api projects/:id | jq '.star_count'

Full reference: glab api

Aliases for Frequent Operations

# Create shortcuts
glab alias set mrs 'mr list --assignee=@me'
glab alias set issues 'issue list --assignee=@me'
glab alias set pipelines 'ci list'

# Use them
glab mrs
glab issues
glab pipelines

Configuration

# View configuration
glab config get

# Set default editor
glab config set editor vim

# Set default Git protocol
glab config set git_protocol ssh

Configuration stored in ~/.config/glab-cli/config.yml

Model Guidance

This skill wraps an official CLI. A fast, lightweight model is sufficient.

Troubleshooting

# Check authentication
glab auth status

# Re-authenticate
glab auth login

# Enable debug logging
DEBUG=1 glab issue list

# Check glab version
glab version

Official Documentation

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

29.54%
按下载量换算408

Antigravity

21.23%
按下载量换算293

OpenCode

18.25%
按下载量换算252

Cursor

11.87%
按下载量换算164

Gemini CLI

6.96%
按下载量换算96

windsurf

3.37%
按下载量换算47

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills