gitlab by odyssey4me/agent-skills
npx skills add https://github.com/odyssey4me/agent-skills --skill gitlab此技能使用官方的 glab CLI 工具提供 GitLab 集成。一个 Python 包装脚本为读取/查看操作生成 Markdown 格式的输出。操作命令(创建、合并、关闭、评论)应直接使用 glab。
安装 glab CLI : 安装指南
# 使用 GitLab 进行身份验证
glab auth login
# 验证身份验证
glab auth status
支持 GitLab.com、GitLab Dedicated 和 GitLab Self-Managed 实例。详情请参阅 GitLab CLI 身份验证。
包装脚本 (scripts/gitlab.py) 将输出格式化为 Markdown。将其用于读取/查看操作以获得代理可用的输出。对于操作命令(创建、合并、关闭、评论),请直接使用 glab。有关每个命令的读/写分类,请参阅 permissions.md。
# 检查 glab CLI 是否已安装并完成身份验证
$SKILL_DIR/scripts/gitlab.py check
# 议题
$SKILL_DIR/scripts/gitlab.py issues list --repo GROUP/REPO
$SKILL_DIR/scripts/gitlab.py issues view 123 --repo GROUP/REPO
# 合并请求
$SKILL_DIR/scripts/gitlab.py mrs list --repo GROUP/REPO
$SKILL_DIR/scripts/gitlab.py mrs view 456 --repo GROUP/REPO
# 流水线
$SKILL_DIR/scripts/gitlab.py pipelines list --repo GROUP/REPO
$SKILL_DIR/scripts/gitlab.py pipelines view 123456 --repo GROUP/REPO
# 仓库
$SKILL_DIR/scripts/gitlab.py repos list
$SKILL_DIR/scripts/gitlab.py repos view GROUP/REPO
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
所有命令都支持对列表命令使用 --limit N(默认值为 30)。
对于操作命令,请直接使用 glab:
glab issue list # 列出议题
glab issue view 123 # 查看议题详情
glab issue create # 创建新议题
glab issue note 123 # 添加评论
glab issue close 123 # 关闭议题
glab issue update 123 --label bug # 编辑议题
完整参考:glab issue
glab mr list # 列出合并请求
glab mr view 456 # 查看 MR 详情
glab mr create # 创建新 MR
glab mr approve 456 # 批准 MR
glab mr merge 456 # 合并 MR
glab mr checkout 456 # 检出 MR 分支
glab mr diff 456 # 查看 MR 差异
glab mr note 456 # 向 MR 添加评论
完整参考:glab mr
glab ci list # 列出流水线
glab ci view 123456 # 查看流水线详情
glab ci run # 触发流水线
glab ci trace # 查看流水线日志
glab ci retry 123456 # 重试失败的流水线
glab ci status # 显示流水线状态
完整参考:
glab repo list # 列出仓库
glab repo view GROUP/REPO # 查看仓库
glab repo create # 创建仓库
glab repo clone GROUP/REPO # 克隆仓库
glab repo fork GROUP/REPO # 复刻仓库
完整参考:glab repo
glab release list # 列出发布
glab release view v1.0.0 # 查看发布详情
glab release create v1.0.0 # 创建发布
glab release delete v1.0.0 # 删除发布
完整参考:glab release
# 列出分配给你的 MR
glab mr list --assignee=@me
# 审查特定 MR
$SKILL_DIR/scripts/gitlab.py mrs view 456
glab mr diff 456
glab mr approve 456
# 验证批准是否已记录
$SKILL_DIR/scripts/gitlab.py mrs view 456 # 检查批准状态
# 创建议题
glab issue create --title "Bug: Login fails" --description "Description" --label bug
# 验证:注意输出中的议题编号
# 创建关闭该议题的 MR(使用上面的议题编号)
glab mr create --title "Fix login bug" --description "Closes #123"
# 验证 MR 是否已创建并关联
$SKILL_DIR/scripts/gitlab.py mrs view <number>
# 检查当前流水线状态
glab ci status
# 实时查看流水线日志
glab ci trace
# 重试失败的作业
glab ci retry
# 验证流水线是否已重启
$SKILL_DIR/scripts/gitlab.py pipelines list
更多示例请参阅 common-workflows.md。
# 获取 JSON 输出
glab issue list --output json
# 使用 jq 处理
glab mr list --output json | jq '.[] | "\(.iid): \(.title)"'
对于 glab 命令未涵盖的操作:
# 发起经过身份验证的 API 请求
glab api projects/:id/issues
# POST 请求
glab api projects/:id/issues -X POST -f title="Issue" -f description="Text"
# 处理响应
glab api projects/:id | jq '.star_count'
完整参考:glab api
# 创建快捷方式
glab alias set mrs 'mr list --assignee=@me'
glab alias set issues 'issue list --assignee=@me'
glab alias set pipelines 'ci list'
# 使用它们
glab mrs
glab issues
glab pipelines
# 查看配置
glab config get
# 设置默认编辑器
glab config set editor vim
# 设置默认 Git 协议
glab config set git_protocol ssh
配置存储在 ~/.config/glab-cli/config.yml 中
此技能包装了一个官方 CLI。一个快速、轻量级的模型就足够了。
# 检查身份验证
glab auth status
# 重新进行身份验证
glab auth login
# 启用调试日志记录
DEBUG=1 glab issue list
# 检查 glab 版本
glab version
每周安装量
133
仓库
GitHub 星标数
2
首次出现
2026年1月25日
安全审计
安装于
codex118
opencode117
gemini-cli116
cursor114
github-copilot112
amp110
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.
Install glab CLI : installation guide
# 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.
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).
For action commands, use glab directly:
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
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
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:
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
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
# 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
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>
# 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.
# Get JSON output
glab issue list --output json
# Process with jq
glab mr list --output json | jq '.[] | "\(.iid): \(.title)"'
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
# 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
# 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
This skill wraps an official CLI. A fast, lightweight model is sufficient.
# Check authentication
glab auth status
# Re-authenticate
glab auth login
# Enable debug logging
DEBUG=1 glab issue list
# Check glab version
glab version
Weekly Installs
133
Repository
GitHub Stars
2
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex118
opencode117
gemini-cli116
cursor114
github-copilot112
amp110
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
94,100 周安装
Claude子智能体(sub-agents)创建指南:专用AI代理配置与链式调用教程
255 周安装
Tinybird TypeScript SDK 指南:使用@tinybirdco/sdk实现类型安全的数据管道开发
256 周安装
高级3D建模技能:游戏与电影生产级拓扑、UV展开、引擎集成12年经验
251 周安装
Supermemory:AI智能体记忆基础设施 - 长期/短期记忆、RAG语义搜索与知识图谱
131 周安装
AWS Lambda TypeScript 集成指南:NestJS与原生TS优化冷启动性能
257 周安装
AI研究代理:自动化技术文档与最佳实践研究工具(2025年更新)
256 周安装