gitlab
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitLab Skill
GitLab Skill
Overview
概述
Enables Claude to access GitLab to manage repositories, review merge requests, check CI/CD pipelines, monitor issues, and manage the complete DevOps lifecycle.
让Claude能够访问GitLab以管理代码仓库、审核合并请求、查看CI/CD流水线、监控问题并管理完整的DevOps生命周期。
Quick Install
快速安装
bash
curl -sSL https://canifi.com/skills/gitlab/install.sh | bashOr manually:
bash
cp -r skills/gitlab ~/.canifi/skills/bash
curl -sSL https://canifi.com/skills/gitlab/install.sh | bash或手动安装:
bash
cp -r skills/gitlab ~/.canifi/skills/Setup
配置
Configure via canifi-env:
bash
undefined通过canifi-env进行配置:
bash
undefinedFirst, ensure canifi-env is installed:
首先,确保已安装canifi-env:
curl -sSL https://canifi.com/install.sh | bash
curl -sSL https://canifi.com/install.sh | bash
canifi-env set GITLAB_EMAIL "your-email@example.com"
canifi-env set GITLAB_USERNAME "your-username"
undefinedcanifi-env set GITLAB_EMAIL "your-email@example.com"
canifi-env set GITLAB_USERNAME "your-username"
undefinedPrivacy & Authentication
隐私与认证
Your credentials, your choice. Canifi LifeOS respects your privacy.
您的凭据,由您掌控。 Canifi LifeOS尊重您的隐私。
Option 1: Manual Browser Login (Recommended)
选项1:手动浏览器登录(推荐)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
如果您不想与Claude Code共享凭据:
- 使用CDP模式完成浏览器自动化配置
- 在Playwright控制的Chrome窗口中手动登录服务
- Claude将使用您的已认证会话,且绝不会看到您的密码
Option 2: Environment Variables
选项2:环境变量
If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果您愿意共享凭据,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"注意:存储在canifi-env中的凭据仅能在您的本地机器上访问,绝不会被传输。
Capabilities
功能特性
- View repositories and code
- Check merge request status
- Monitor CI/CD pipelines
- View and manage issues
- Check container registry
- Manage project settings
- 查看代码仓库与代码
- 检查合并请求状态
- 监控CI/CD流水线
- 查看并管理问题
- 查看容器镜像仓库
- 管理项目设置
Usage Examples
使用示例
Example 1: Check Pipeline Status
示例1:检查流水线状态
User: "What's the pipeline status?"
Claude: I'll check your GitLab pipelines.
- Opens gitlab.com via Playwright MCP
- Logs into account
- Pipeline status:
- Latest (main): Passed - 4m 23s
- Jobs: Build (passed), Test (passed), Deploy (passed)
- Coverage: 87%
- Recent pipelines: 4/5 passing
- Failed: MR !234 needs attention用户:“流水线状态如何?”
Claude:我将查看您的GitLab流水线。
- 通过Playwright MCP打开gitlab.com
- 登录账户
- 流水线状态:
- 最新(main分支):已通过 - 4分23秒
- 任务:构建(已通过)、测试(已通过)、部署(已通过)
- 覆盖率:87%
- 近期流水线:5条中有4条通过
- 失败项:MR !234需要关注Example 2: Review Merge Requests
示例2:审核合并请求
User: "Show my open merge requests"
Claude: I'll check your MRs.
- Views merge requests
- Open MRs:
- !456 "Feature: User dashboard" - Ready to merge
- !457 "Fix: API response" - Pipeline running
- !458 "Docs update" - Needs review
- Assigned to you: 2 for review
- Draft MRs: 1用户:“展示我的未处理合并请求”
Claude:我将查看您的合并请求。
- 查看合并请求列表
- 未处理的合并请求:
- !456 “功能:用户仪表盘” - 可合并
- !457 “修复:API响应” - 流水线运行中
- !458 “文档更新” - 需要审核
- 分配给您的:2条待审核
- 草稿状态的合并请求:1条Example 3: Check Issues
示例3:查看问题
User: "What issues are assigned to me?"
Claude: I'll check your assigned issues.
- Views issue board
- Assigned issues:
- #89 "Performance optimization" - In Progress
- #92 "Database migration" - To Do
- #95 "API documentation" - To Do
- Due this week: 2
- Overdue: 0用户:“哪些问题分配给了我?”
Claude:我将查看分配给您的问题。
- 查看问题看板
- 分配给您的问题:
- #89 “性能优化” - 进行中
- #92 “数据库迁移” - 待处理
- #95 “API文档” - 待处理
- 本周到期:2条
- 逾期:0条Authentication Flow
认证流程
- Navigate to gitlab.com via Playwright MCP
- Enter username or email
- Enter password
- Handle 2FA if enabled
- Maintain session for operations
- 通过Playwright MCP导航至gitlab.com
- 输入用户名或邮箱
- 输入密码
- 若启用则处理双因素认证(2FA)
- 维护会话以执行操作
Error Handling
错误处理
- Login Failed: Retry credentials
- 2FA Required: Complete verification
- Pipeline Failed: Check job logs
- Session Expired: Re-authenticate
- Permission Denied: Check project access
- Rate Limited: Wait and retry
- 登录失败:重试凭据
- 需要2FA:完成验证
- 流水线失败:检查任务日志
- 会话过期:重新认证
- 权限拒绝:检查项目访问权限
- 请求受限:等待后重试
Self-Improvement Instructions
自我优化说明
After each interaction:
- Track pipeline patterns
- Note MR workflow preferences
- Log CI/CD monitoring frequency
- Document UI changes
Suggest updates when:
- GitLab updates interface
- New CI/CD features added
- DevSecOps features expand
- Integration changes
每次交互后:
- 跟踪流水线模式
- 记录合并请求工作流偏好
- 记录CI/CD监控频率
- 记录UI变更
在以下情况时建议更新:
- GitLab更新界面
- 添加新的CI/CD功能
- DevSecOps功能扩展
- 集成方式变更
Notes
注意事项
- Complete DevOps platform
- Self-hosted option available
- Auto DevOps for automation
- Container registry built-in
- Security scanning included
- Package registry support
- Wiki and snippets features
- 完整的DevOps平台
- 支持自托管部署
- 提供Auto DevOps自动化功能
- 内置容器镜像仓库
- 包含安全扫描功能
- 支持包仓库
- 具备Wiki与代码片段功能