{"id":"cc4cc7c4-4fe8-4594-82a7-25acdbc776f2","entityType":"agent","slug":"clawhub-weiguang1017-gitlab-devops-skill","name":"Gitlab Skills","canonicalUrl":"https://www.xpersona.co/agent/clawhub-weiguang1017-gitlab-devops-skill","canonicalPath":"/agent/clawhub-weiguang1017-gitlab-devops-skill","generatedAt":"2026-10-10T03:15:30.152Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T13:37:52.465Z","emptyReason":null},"description":"GitLab projects, MRs, and CI/CD operations","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.6K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s178r18ph3sn297gb4d96zefvx88583r:gitlab-devops-skill","sourceUrl":"https://clawhub.ai/weiguang1017/gitlab-devops-skill","homepage":"https://clawhub.ai/weiguang1017/skills/gitlab-devops-skill","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/weiguang1017/gitlab-devops-skill","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/weiguang1017/skills/gitlab-devops-skill","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":68,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Gitlab Skills technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T13:37:52.465Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T13:37:52.465Z","emptyReason":null},"stars":null,"forks":null,"downloads":2551,"packageName":null,"latestVersion":"0.1.1","tractionLabel":"2.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T13:37:52.465Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T13:37:52.465Z","lastCrawledAt":"2026-10-09T13:37:52.465Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T13:37:52.465Z","lastVerifiedAt":null,"highlights":[{"version":"0.1.1","createdAt":"2026-10-08T08:11:18.784Z","changelog":"- Significant update with localization: SKILL.md is now fully rewritten in Chinese, expanding usage details and clarifying best practices for local environments. - Old auxiliary files (agents, scripts, skill-card.md, 使用手册.md) have been removed for cleaner structure. - A separate usage reference (references/USAGE.md) has been added for detailed configuration and troubleshooting documentation. - Stronger emphasis on secure token management and recommended Python interpreter usage. - Explicit warnings about write operations (issue/MR creation, merges, pipeline triggers) are added to require user confirmation.","fileCount":9,"zipByteSize":11513},{"version":"0.1.0","createdAt":"2026-08-05T05:23:33.177Z","changelog":"Initial release of gitlab-devops-skill. - Provides a Python CLI to manage GitLab projects, issues, merge requests, and pipelines via REST API v4. - Supports both GitLab.com and self-hosted GitLab 9.0+. - Connection info is read from environment variables or a config file. - Includes clear usage instructions and compatibility checks. - All operations output JSON and exit non-zero on failure.","fileCount":11,"zipByteSize":11273}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s178r18ph3sn297gb4d96zefvx88583r:gitlab-devops-skill","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s178r18ph3sn297gb4d96zefvx88583r:gitlab-devops-skill` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/weiguang1017/gitlab-devops-skill before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T03:15:30.151Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-weiguang1017-gitlab-devops-skill/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T13:37:52.465Z","emptyReason":null},"readme":"Skill: Gitlab Skills\n\nOwner: weiguang1017\n\nSummary: GitLab projects, MRs, and CI/CD operations\n\nTags: latest:0.1.1\n\nVersion history:\n\nv0.1.1 | 2026-10-08T08:11:18.784Z | auto\n\n- Significant update with localization: SKILL.md is now fully rewritten in Chinese, expanding usage details and clarifying best practices for local environments.\n- Old auxiliary files (agents, scripts, skill-card.md, 使用手册.md) have been removed for cleaner structure.\n- A separate usage reference (references/USAGE.md) has been added for detailed configuration and troubleshooting documentation.\n- Stronger emphasis on secure token management and recommended Python interpreter usage.\n- Explicit warnings about write operations (issue/MR creation, merges, pipeline triggers) are added to require user confirmation.\n\nv0.1.0 | 2026-08-05T05:23:33.177Z | auto\n\nInitial release of gitlab-devops-skill.\n\n- Provides a Python CLI to manage GitLab projects, issues, merge requests, and pipelines via REST API v4.\n- Supports both GitLab.com and self-hosted GitLab 9.0+.\n- Connection info is read from environment variables or a config file.\n- Includes clear usage instructions and compatibility checks.\n- All operations output JSON and exit non-zero on failure.\n\nArchive index:\n\nArchive v0.1.1: 9 files, 11513 bytes\n\nFiles: agents/openai.yaml (247b), LICENSE (1083b), README.md (4573b), references/USAGE.md (3748b), requirements.txt (18b), scripts/gitlab_cli.py (8957b), skill-card.md (1808b), SKILL.md (3453b), _meta.json (138b)\n\nFile v0.1.1:SKILL.md\n\n---\nname: gitlab-skills\ndescription: Manage GitLab projects from the command line — list/inspect projects, list and create issues, list/create/merge merge requests, and list or trigger CI/CD pipelines. Use whenever the user wants to work with a GitLab repo, file an issue, open or merge an MR, or kick off / check a pipeline on GitLab.com or a self-hosted GitLab. 中文触发场景：查 GitLab 项目、建 issue、开/合并 MR、查流水线、触发流水线、看流水线是否通过。\n---\n\n# GitLab 技能（命令行实操）\n\n通过 GitLab REST API v4 操作项目，入口是单一自包含的 Python CLI：`scripts/gitlab_cli.py`。\n兼容 GitLab.com SaaS 与私有化部署实例。License: MIT。\n\n## 何时使用\n\n用户提出以下需求时调用本技能：\n\n- 查找或查看项目（\"列一下我的项目\"\"看 group/app 的详情\"）\n- 列出或创建 issue\n- 列出、创建、合并 MR（合并请求）\n- 列出或触发 CI/CD 流水线（\"在 main 上跑一次流水线\"\"流水线绿了吗\"）\n\n## 环境配置（首次）\n\n连接信息从环境变量读取，或放在配置文件 `~/.devops-skills/gitlab.json`。\n**禁止把 token 直接写在命令行参数里。**\n\n```bash\nexport GITLAB_URL=\"https://gitlab.com\"   # 私有化部署填自己的地址\nexport GITLAB_TOKEN=\"<access-token>\"     # 需要 api 权限\n```\n\nToken 创建位置：User Settings → Access Tokens（勾选 `api`）。\n\n## 运行方式\n\n脚本依赖 `requests`。本机受管 Python 环境已安装（requests 2.34.2），**推荐直接用绝对路径调用**，\n避免默认的 `python3` 缺少依赖而失败：\n\n```bash\nPY=~/.workbuddy/binaries/python/envs/default/bin/python\n# 若报 Missing dependency，用同一个解释器装：\n# $PY -m pip install requests -i https://mirrors.aliyun.com/pypi/simple/\n```\n\n项目参数可以是数字 ID，也可以是 `group/subgroup/project` 路径（脚本自动做 URL 编码）。\n\n```bash\n$PY scripts/gitlab_cli.py list-projects --search app\n$PY scripts/gitlab_cli.py get-project group/app\n$PY scripts/gitlab_cli.py list-issues group/app --state opened\n$PY scripts/gitlab_cli.py create-issue group/app --title \"Bug\" --description \"...\"\n$PY scripts/gitlab_cli.py list-mrs group/app --state opened\n$PY scripts/gitlab_cli.py create-mr group/app --source feat --target main --title \"Add feature\"\n$PY scripts/gitlab_cli.py merge-mr group/app 42\n$PY scripts/gitlab_cli.py list-pipelines group/app --ref main\n$PY scripts/gitlab_cli.py trigger-pipeline group/app --ref main\n```\n\n所有命令把 JSON 打到 stdout，失败时以非零退出码结束。\n\n## 兼容性\n\n- GitLab.com\n- 私有化 GitLab 9.0+（REST API v4）\n\n执行命令前会先请求 `/api/v4/version` 做版本校验，检测到低于 9.0 会输出明确的兼容性提示并退出。\n确需绕过时可设 `GITLAB_SKIP_VERSION_CHECK=1` 或 `DEVOPS_SKILLS_SKIP_VERSION_CHECK=1`。\n\n## 注意事项\n\n- `merge-mr` 要求 MR 处于可合并状态（审批规则、流水线状态都会影响）。\n- 触发流水线要求项目里存在 `.gitlab-ci.yml`。\n- 写操作（建 issue、建 MR、合并、触发流水线）属于 🟡 级变更，执行前跟用户确认目标项目与分支。\n\n## 详细文档\n\n完整的配置方式、字段说明与排错见 `references/USAGE.md`。\n\n## 联系与支持\n\nGitLab、CI/CD、DevOps 平台或研发效能问题需要人工支持时联系：\n📧 77890866@qq.com　|　🌐 https://www.restartx.top\n\nFile v0.1.1:README.md\n\n# GitLab DevOps Skill\n\n[English](#english) | [中文](#chinese)\n\n<a id=\"english\"></a>\n## English\n\nManage GitLab projects, issues, merge requests, and CI/CD pipelines through the\nGitLab REST API v4. The CLI supports project discovery, controlled write\noperations, MR creation and merge, pipeline inspection, and pipeline triggers.\n\n### Compatibility\n\n- GitLab.com\n- Self-managed GitLab 9.0+ with REST API v4\n- Python 3.8+ and `requests`\n\nThe CLI calls `/api/v4/version` before normal commands. A self-managed GitLab\nversion below 9.0 fails with a clear compatibility error. Do not bypass this\nguard unless the target API has been independently verified.\n\n### Quick Start\n\n```bash\npip install requests\nexport GITLAB_URL=\"https://gitlab.example.com\"\nexport GITLAB_TOKEN=\"<access-token>\"\n\npython scripts/gitlab_cli.py get-project group/project\npython scripts/gitlab_cli.py list-pipelines group/project --ref main\n```\n\nUse `~/.devops-skills/gitlab.json` as an alternative local configuration file.\nKeep tokens outside version control and protect the file with permissions `600`.\n\n### Common Commands\n\n| Task | Command |\n| --- | --- |\n| List projects | `python scripts/gitlab_cli.py list-projects --search app` |\n| Read a project | `python scripts/gitlab_cli.py get-project group/project` |\n| List issues | `python scripts/gitlab_cli.py list-issues group/project --state opened` |\n| Create an issue | `python scripts/gitlab_cli.py create-issue group/project --title \"Bug\"` |\n| Create an MR | `python scripts/gitlab_cli.py create-mr group/project --source feature --target main --title \"Add feature\"` |\n| Merge an MR | `python scripts/gitlab_cli.py merge-mr group/project 42` |\n| Trigger a pipeline | `python scripts/gitlab_cli.py trigger-pipeline group/project --ref main` |\n\n### Permissions and Safety\n\nUse `read_api` or a project-scoped read token for read-only work. Grant `api`\nscope and only the required project role for writes. This skill does not need\ninstance administrator access. Merges and pipeline triggers remain subject to\nGitLab approvals, protected branches, and pipeline rules.\n\n### Documentation and Support\n\n- Agent instructions: [SKILL.md](./SKILL.md)\n- Detailed Chinese manual: [使用手册.md](./使用手册.md)\n- Support: https://service.restartx.top/\n\nRestartX provides technical support and implementation services for GitLab,\nCI/CD, DevOps platform, and engineering-efficiency needs.\n\n<a id=\"chinese\"></a>\n## 中文\n\n通过 GitLab REST API v4 管理项目、Issue、Merge Request 和 CI/CD Pipeline。CLI 支持项目\n查询、受控写操作、创建和合并 MR、查询 Pipeline 以及触发流水线。\n\n### 兼容性\n\n- GitLab.com\n- 使用 REST API v4 的自建 GitLab 9.0+\n- Python 3.8+ 与 `requests`\n\n脚本会在正常执行前调用 `/api/v4/version`。自建 GitLab 低于 9.0 时会给出明确的不兼容错误；\n除非已独立确认目标 API 兼容，否则不要跳过该检查。\n\n### 快速开始\n\n```bash\npip install requests\nexport GITLAB_URL=\"https://gitlab.example.com\"\nexport GITLAB_TOKEN=\"<access-token>\"\n\npython scripts/gitlab_cli.py get-project group/project\npython scripts/gitlab_cli.py list-pipelines group/project --ref main\n```\n\n也可使用本地配置文件 `~/.devops-skills/gitlab.json`。令牌不能提交到版本库，文件权限建议设为\n`600`。\n\n### 常用命令\n\n| 功能 | 命令 |\n| --- | --- |\n| 列出项目 | `python scripts/gitlab_cli.py list-projects --search app` |\n| 查看项目 | `python scripts/gitlab_cli.py get-project group/project` |\n| 查看 Issue | `python scripts/gitlab_cli.py list-issues group/project --state opened` |\n| 创建 Issue | `python scripts/gitlab_cli.py create-issue group/project --title \"Bug\"` |\n| 创建 MR | `python scripts/gitlab_cli.py create-mr group/project --source feature --target main --title \"Add feature\"` |\n| 合并 MR | `python scripts/gitlab_cli.py merge-mr group/project 42` |\n| 触发 Pipeline | `python scripts/gitlab_cli.py trigger-pipeline group/project --ref main` |\n\n### 权限与安全\n\n只读场景使用 `read_api` 或项目级只读令牌；写操作才授予 `api` 作用域及所需项目角色。本 Skill\n不需要实例管理员权限。MR 合并和流水线触发仍受 GitLab 审批、保护分支和 Pipeline 规则约束。\n\n### 文档与支持\n\n- Agent 指令：[SKILL.md](./SKILL.md)\n- 完整中文手册：[使用手册.md](./使用手册.md)\n- 支持地址：https://service.restartx.top/\n\n如遇 GitLab、CI/CD、DevOps 平台或研发效能问题，可通过上述地址联系 RestartX 获取技术支持与\n实施服务。\n\nFile v0.1.1:_meta.json\n\n{\n  \"ownerId\": \"kn7abv05p1jqkcnmnmkdpdex9581nt3f\",\n  \"slug\": \"gitlab-devops-skill\",\n  \"version\": \"0.1.1\",\n  \"publishedAt\": 1791447078784\n}\n\nFile v0.1.1:references/USAGE.md\n\n# GitLab Skills 配置与使用手册\n\n通过一个 Python CLI 操作 GitLab（SaaS 或自建均可），覆盖项目、Issue、Merge Request、CI/CD Pipeline。\n\n---\n\n## 一、环境要求\n\n- Python 3.8 及以上\n- `pip install requests`\n- GitLab.com，或自建 GitLab 9.0 及以上（REST API v4）\n\n脚本会在执行命令前调用 `/api/v4/version` 检测 GitLab 版本；若自建 GitLab\n低于 9.0，会给出明确的不兼容提示。确需跳过检查时，可设置\n`GITLAB_SKIP_VERSION_CHECK=1` 或 `DEVOPS_SKILLS_SKIP_VERSION_CHECK=1`。\n\n---\n\n## 二、获取访问令牌（Access Token）\n\n1. 登录 GitLab → 右上角头像 → **Preferences / Settings**。\n2. 左侧 **Access Tokens**（个人令牌）。也可用项目级 / 群组级令牌。\n3. 勾选 **api** 作用域 → 创建并复制 token（只显示一次）。\n\n---\n\n## 三、配置连接信息（二选一）\n\n### 方式 A：环境变量\n\n```bash\nexport GITLAB_URL=\"https://gitlab.com\"     # 自建则填你的地址\nexport GITLAB_TOKEN=\"你的token\"\n```\n\n### 方式 B：配置文件 `~/.devops-skills/gitlab.json`\n\n```json\n{\n  \"url\": \"https://gitlab.com\",\n  \"token\": \"你的token\"\n}\n```\n\n> `chmod 600 ~/.devops-skills/gitlab.json`，不要把 token 提交到仓库。\n\n---\n\n## 四、命令速查\n\n> 项目参数 `project` 支持**数字 ID** 或**路径** `group/subgroup/project`（脚本自动转义）。\n\n| 功能 | 命令 |\n| --- | --- |\n| 列出我的项目 | `python scripts/gitlab_cli.py list-projects --search app` |\n| 查看项目详情 | `python scripts/gitlab_cli.py get-project group/app` |\n| 列出 Issue | `python scripts/gitlab_cli.py list-issues group/app --state opened` |\n| 创建 Issue | `python scripts/gitlab_cli.py create-issue group/app --title \"标题\" --description \"描述\"` |\n| 列出 MR | `python scripts/gitlab_cli.py list-mrs group/app --state opened` |\n| 创建 MR | `python scripts/gitlab_cli.py create-mr group/app --source feat --target main --title \"标题\"` |\n| 合并 MR | `python scripts/gitlab_cli.py merge-mr group/app 42` |\n| 列出 Pipeline | `python scripts/gitlab_cli.py list-pipelines group/app --ref main` |\n| 触发 Pipeline | `python scripts/gitlab_cli.py trigger-pipeline group/app --ref main` |\n\n---\n\n## 五、使用示例\n\n**1. 提交一个新分支的 MR 并合并**\n\n```bash\npython scripts/gitlab_cli.py create-mr group/app \\\n  --source feature/login --target main --title \"新增登录功能\"\n# 记下返回的 iid，例如 42\npython scripts/gitlab_cli.py merge-mr group/app 42\n```\n\n**2. 在 main 分支触发流水线并查看状态**\n\n```bash\npython scripts/gitlab_cli.py trigger-pipeline group/app --ref main\npython scripts/gitlab_cli.py list-pipelines group/app --ref main\n```\n\n---\n\n## 六、常见问题\n\n| 现象 | 原因与解决 |\n| --- | --- |\n| `GITLAB_TOKEN is required` | 未配置 token |\n| `HTTP 401` | token 失效或作用域不含 `api` |\n| `HTTP 403` | 账号对该项目无权限 |\n| `HTTP 404`（用路径时） | 路径拼写错误，或用数字 ID 再试 |\n| `unsupported GitLab version ...` | GitLab 版本低于 9.0，不满足 REST API v4 兼容范围 |\n| `merge-mr` 失败 | MR 未达可合并状态（待审批、流水线未过、有冲突） |\n| 触发 pipeline 无效 | 项目缺少 `.gitlab-ci.yml` |\n\n---\n\n## 七、在 Claude / Claude Code 中使用\n\n把 `gitlab-skills` 目录放入 skills 目录后，用自然语言触发：\n\n- “看下 group/app 有哪些打开的 MR”\n- “从 feature/login 向 main 提一个 MR”\n- “在 main 上跑一次流水线”\n\n---\n\n## 八、技术支持与咨询\n\n如果在 GitLab、CI/CD、代码协作、DevOps 平台或研发效能建设中遇到问题，欢迎联系\nRestartX 获取支持与方案咨询：https://service.restartx.top/\n\nFile v0.1.1:skill-card.md\n\n## Description:\n\nHelps agents inspect GitLab projects, issues, merge requests, and pipelines, and perform requested GitLab write operations.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[weiguang1017](https://clawhub.ai/user/weiguang1017)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nDevelopers and DevOps engineers use this skill to inspect GitLab projects, issues, merge requests, and CI/CD pipelines, and to create issues or merge requests, merge changes, or start pipelines when authorized.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: A GitLab token with write access can enable consequential repository changes without an enforced confirmation gate.\n\nMitigation: Prefer project-scoped or read-only tokens where possible; require explicit human confirmation before creating issues or merge requests, merging, or triggering pipelines, and keep protected-branch and approval rules enabled.\n\n## Reference(s):\n\n- [GitLab Skills usage guide](references/USAGE.md)\n- [Release source repository](https://github.com/weiguang1017/gitlab-devops-skill)\n- [ClawHub skill release](https://clawhub.ai/weiguang1017/skills/gitlab-devops-skill)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, JSON]\n\n**Output Format:** [Text guidance and commands; GitLab CLI responses in JSON]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [GitLab command failures return a non-zero exit status.]\n\n## Skill Version(s):\n\n0.1.1 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.1.1:agents/openai.yaml\n\ninterface:\n  display_name: \"GitLab DevOps\"\n  short_description: \"GitLab projects, MRs, and CI/CD operations\"\n  default_prompt: \"Use $gitlab-skills to inspect this GitLab project and its latest pipeline.\"\n\npolicy:\n  allow_implicit_invocation: true\n\nFile v0.1.1:LICENSE\n\nMIT License\n\nCopyright (c) 2026 devops-skills contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nFile v0.1.1:requirements.txt\n\nrequests>=2.25,<3\n\nArchive v0.1.0: 11 files, 11273 bytes\n\nFiles: agents (0b), agents/openai.yaml (247b), LICENSE (1083b), README.md (4573b), requirements.txt (18b), scripts (0b), scripts/gitlab_cli.py (8957b), skill-card.md (2247b), SKILL.md (2692b), 使用手册.md (3748b), _meta.json (138b)\n\nFile v0.1.0:SKILL.md\n\n---\nname: gitlab-skills\ndescription: Manage GitLab projects from the command line — list/inspect projects, list and create issues, list/create/merge merge requests, and list or trigger CI/CD pipelines. Use this whenever the user wants to work with a GitLab repo, file an issue, open or merge an MR, or kick off / check a pipeline on GitLab.com or a self-hosted GitLab.\nlicense: MIT\n---\n\n# GitLab Skills\n\nOperate GitLab through its REST API v4 with one self-contained Python CLI\n(`scripts/gitlab_cli.py`). Works with GitLab SaaS and self-hosted instances.\n\n## When to use\n\nTrigger this skill when the user asks to:\n- find or inspect a project (\"show my projects\", \"details of group/app\")\n- list or create issues\n- list, create, or merge merge requests\n- list or trigger CI/CD pipelines (\"run pipeline on main\", \"is the pipeline green\")\n\n## Setup (once)\n\nReads connection info from environment variables OR `~/.devops-skills/gitlab.json`.\n\n```bash\nexport GITLAB_URL=\"https://gitlab.com\"   # or your self-hosted URL\nexport GITLAB_TOKEN=\"<access-token>\"      # scope: api\n```\n\nCreate a token at: User Settings → Access Tokens (scope `api`).\nRequires Python 3.8+ and `requests`. Full guide: `使用手册.md`.\n\n## Compatibility\n\nSupported targets:\n- GitLab.com\n- Self-managed GitLab 9.0+ with REST API v4\n\nThe CLI checks `/api/v4/version` before running commands. If the detected\nself-managed GitLab version is below 9.0, it exits with a clear compatibility\nmessage. Set `GITLAB_SKIP_VERSION_CHECK=1` or\n`DEVOPS_SKILLS_SKIP_VERSION_CHECK=1` only when you deliberately need to bypass\nthis guard.\n\n## Usage\n\nProjects can be a numeric ID or a path like `group/subgroup/project` (auto-encoded).\n\n```bash\npython scripts/gitlab_cli.py list-projects --search app\npython scripts/gitlab_cli.py get-project group/app\npython scripts/gitlab_cli.py list-issues group/app --state opened\npython scripts/gitlab_cli.py create-issue group/app --title \"Bug\" --description \"...\"\npython scripts/gitlab_cli.py list-mrs group/app --state opened\npython scripts/gitlab_cli.py create-mr group/app --source feat --target main --title \"Add feature\"\npython scripts/gitlab_cli.py merge-mr group/app 42\npython scripts/gitlab_cli.py list-pipelines group/app --ref main\npython scripts/gitlab_cli.py trigger-pipeline group/app --ref main\n```\n\nEvery command prints JSON to stdout and exits non-zero on failure.\n\n## Notes\n\n- `merge-mr` requires the MR to be mergeable (approvals/pipeline rules apply).\n- Triggering pipelines requires the project to have a `.gitlab-ci.yml`.\n\n## Support\n\nFor GitLab, CI/CD, DevOps platform, or engineering efficiency consulting and\ntroubleshooting, contact RestartX: https://service.restartx.top/\n\nFile v0.1.0:README.md\n\n# GitLab DevOps Skill\n\n[English](#english) | [中文](#chinese)\n\n<a id=\"english\"></a>\n## English\n\nManage GitLab projects, issues, merge requests, and CI/CD pipelines through the\nGitLab REST API v4. The CLI supports project discovery, controlled write\noperations, MR creation and merge, pipeline inspection, and pipeline triggers.\n\n### Compatibility\n\n- GitLab.com\n- Self-managed GitLab 9.0+ with REST API v4\n- Python 3.8+ and `requests`\n\nThe CLI calls `/api/v4/version` before normal commands. A self-managed GitLab\nversion below 9.0 fails with a clear compatibility error. Do not bypass this\nguard unless the target API has been independently verified.\n\n### Quick Start\n\n```bash\npip install requests\nexport GITLAB_URL=\"https://gitlab.example.com\"\nexport GITLAB_TOKEN=\"<access-token>\"\n\npython scripts/gitlab_cli.py get-project group/project\npython scripts/gitlab_cli.py list-pipelines group/project --ref main\n```\n\nUse `~/.devops-skills/gitlab.json` as an alternative local configuration file.\nKeep tokens outside version control and protect the file with permissions `600`.\n\n### Common Commands\n\n| Task | Command |\n| --- | --- |\n| List projects | `python scripts/gitlab_cli.py list-projects --search app` |\n| Read a project | `python scripts/gitlab_cli.py get-project group/project` |\n| List issues | `python scripts/gitlab_cli.py list-issues group/project --state opened` |\n| Create an issue | `python scripts/gitlab_cli.py create-issue group/project --title \"Bug\"` |\n| Create an MR | `python scripts/gitlab_cli.py create-mr group/project --source feature --target main --title \"Add feature\"` |\n| Merge an MR | `python scripts/gitlab_cli.py merge-mr group/project 42` |\n| Trigger a pipeline | `python scripts/gitlab_cli.py trigger-pipeline group/project --ref main` |\n\n### Permissions and Safety\n\nUse `read_api` or a project-scoped read token for read-only work. Grant `api`\nscope and only the required project role for writes. This skill does not need\ninstance administrator access. Merges and pipeline triggers remain subject to\nGitLab approvals, protected branches, and pipeline rules.\n\n### Documentation and Support\n\n- Agent instructions: [SKILL.md](./SKILL.md)\n- Detailed Chinese manual: [使用手册.md](./使用手册.md)\n- Support: https://service.restartx.top/\n\nRestartX provides technical support and implementation services for GitLab,\nCI/CD, DevOps platform, and engineering-efficiency needs.\n\n<a id=\"chinese\"></a>\n## 中文\n\n通过 GitLab REST API v4 管理项目、Issue、Merge Request 和 CI/CD Pipeline。CLI 支持项目\n查询、受控写操作、创建和合并 MR、查询 Pipeline 以及触发流水线。\n\n### 兼容性\n\n- GitLab.com\n- 使用 REST API v4 的自建 GitLab 9.0+\n- Python 3.8+ 与 `requests`\n\n脚本会在正常执行前调用 `/api/v4/version`。自建 GitLab 低于 9.0 时会给出明确的不兼容错误；\n除非已独立确认目标 API 兼容，否则不要跳过该检查。\n\n### 快速开始\n\n```bash\npip install requests\nexport GITLAB_URL=\"https://gitlab.example.com\"\nexport GITLAB_TOKEN=\"<access-token>\"\n\npython scripts/gitlab_cli.py get-project group/project\npython scripts/gitlab_cli.py list-pipelines group/project --ref main\n```\n\n也可使用本地配置文件 `~/.devops-skills/gitlab.json`。令牌不能提交到版本库，文件权限建议设为\n`600`。\n\n### 常用命令\n\n| 功能 | 命令 |\n| --- | --- |\n| 列出项目 | `python scripts/gitlab_cli.py list-projects --search app` |\n| 查看项目 | `python scripts/gitlab_cli.py get-project group/project` |\n| 查看 Issue | `python scripts/gitlab_cli.py list-issues group/project --state opened` |\n| 创建 Issue | `python scripts/gitlab_cli.py create-issue group/project --title \"Bug\"` |\n| 创建 MR | `python scripts/gitlab_cli.py create-mr group/project --source feature --target main --title \"Add feature\"` |\n| 合并 MR | `python scripts/gitlab_cli.py merge-mr group/project 42` |\n| 触发 Pipeline | `python scripts/gitlab_cli.py trigger-pipeline group/project --ref main` |\n\n### 权限与安全\n\n只读场景使用 `read_api` 或项目级只读令牌；写操作才授予 `api` 作用域及所需项目角色。本 Skill\n不需要实例管理员权限。MR 合并和流水线触发仍受 GitLab 审批、保护分支和 Pipeline 规则约束。\n\n### 文档与支持\n\n- Agent 指令：[SKILL.md](./SKILL.md)\n- 完整中文手册：[使用手册.md](./使用手册.md)\n- 支持地址：https://service.restartx.top/\n\n如遇 GitLab、CI/CD、DevOps 平台或研发效能问题，可通过上述地址联系 RestartX 获取技术支持与\n实施服务。\n\nFile v0.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn7abv05p1jqkcnmnmkdpdex9581nt3f\",\n  \"slug\": \"gitlab-devops-skill\",\n  \"version\": \"0.1.0\",\n  \"publishedAt\": 1785907413177\n}\n\nFile v0.1.0:skill-card.md\n\n## Description:\n\nManage GitLab projects, issues, merge requests, and CI/CD pipelines through the GitLab REST API v4.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[weiguang1017](https://clawhub.ai/user/weiguang1017)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nDevelopers and DevOps engineers use this skill to inspect GitLab projects, manage issues and merge requests, and trigger or check CI/CD pipelines on GitLab.com or self-managed GitLab instances.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can merge merge requests or trigger CI pipelines using the configured GitLab token.\n\nMitigation: Use project-scoped or read-only tokens where possible and manually confirm project, branch, MR IID, and ref before merge or pipeline-trigger commands.\n\nRisk: A broad personal access token in the local config file would grant wide GitLab API authority.\n\nMitigation: Prefer environment variables or restrict ~/.devops-skills/gitlab.json permissions to 600 and avoid broad personal tokens.\n\nRisk: Self-hosted or unexpected GitLab endpoints may be unsafe or incompatible.\n\nMitigation: Use HTTPS GitLab URLs you control and keep the version check enabled unless the target API has been independently verified.\n\n## Reference(s):\n\n- [Server-resolved GitHub source](https://github.com/weiguang1017/gitlab-devops-skill)\n- [ClawHub skill page](https://clawhub.ai/weiguang1017/skills/gitlab-devops-skill)\n- [Agent instructions](SKILL.md)\n- [Detailed user manual](使用手册.md)\n- [GitLab](https://gitlab.com)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with shell command examples and JSON output from the GitLab CLI]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [CLI commands print JSON to stdout and exit non-zero on failure.]\n\n## Skill Version(s):\n\n0.1.0 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.1.0:使用手册.md\n\n# GitLab Skills 配置与使用手册\n\n通过一个 Python CLI 操作 GitLab（SaaS 或自建均可），覆盖项目、Issue、Merge Request、CI/CD Pipeline。\n\n---\n\n## 一、环境要求\n\n- Python 3.8 及以上\n- `pip install requests`\n- GitLab.com，或自建 GitLab 9.0 及以上（REST API v4）\n\n脚本会在执行命令前调用 `/api/v4/version` 检测 GitLab 版本；若自建 GitLab\n低于 9.0，会给出明确的不兼容提示。确需跳过检查时，可设置\n`GITLAB_SKIP_VERSION_CHECK=1` 或 `DEVOPS_SKILLS_SKIP_VERSION_CHECK=1`。\n\n---\n\n## 二、获取访问令牌（Access Token）\n\n1. 登录 GitLab → 右上角头像 → **Preferences / Settings**。\n2. 左侧 **Access Tokens**（个人令牌）。也可用项目级 / 群组级令牌。\n3. 勾选 **api** 作用域 → 创建并复制 token（只显示一次）。\n\n---\n\n## 三、配置连接信息（二选一）\n\n### 方式 A：环境变量\n\n```bash\nexport GITLAB_URL=\"https://gitlab.com\"     # 自建则填你的地址\nexport GITLAB_TOKEN=\"你的token\"\n```\n\n### 方式 B：配置文件 `~/.devops-skills/gitlab.json`\n\n```json\n{\n  \"url\": \"https://gitlab.com\",\n  \"token\": \"你的token\"\n}\n```\n\n> `chmod 600 ~/.devops-skills/gitlab.json`，不要把 token 提交到仓库。\n\n---\n\n## 四、命令速查\n\n> 项目参数 `project` 支持**数字 ID** 或**路径** `group/subgroup/project`（脚本自动转义）。\n\n| 功能 | 命令 |\n| --- | --- |\n| 列出我的项目 | `python scripts/gitlab_cli.py list-projects --search app` |\n| 查看项目详情 | `python scripts/gitlab_cli.py get-project group/app` |\n| 列出 Issue | `python scripts/gitlab_cli.py list-issues group/app --state opened` |\n| 创建 Issue | `python scripts/gitlab_cli.py create-issue group/app --title \"标题\" --description \"描述\"` |\n| 列出 MR | `python scripts/gitlab_cli.py list-mrs group/app --state opened` |\n| 创建 MR | `python scripts/gitlab_cli.py create-mr group/app --source feat --target main --title \"标题\"` |\n| 合并 MR | `python scripts/gitlab_cli.py merge-mr group/app 42` |\n| 列出 Pipeline | `python scripts/gitlab_cli.py list-pipelines group/app --ref main` |\n| 触发 Pipeline | `python scripts/gitlab_cli.py trigger-pipeline group/app --ref main` |\n\n---\n\n## 五、使用示例\n\n**1. 提交一个新分支的 MR 并合并**\n\n```bash\npython scripts/gitlab_cli.py create-mr group/app \\\n  --source feature/login --target main --title \"新增登录功能\"\n# 记下返回的 iid，例如 42\npython scripts/gitlab_cli.py merge-mr group/app 42\n```\n\n**2. 在 main 分支触发流水线并查看状态**\n\n```bash\npython scripts/gitlab_cli.py trigger-pipeline group/app --ref main\npython scripts/gitlab_cli.py list-pipelines group/app --ref main\n```\n\n---\n\n## 六、常见问题\n\n| 现象 | 原因与解决 |\n| --- | --- |\n| `GITLAB_TOKEN is required` | 未配置 token |\n| `HTTP 401` | token 失效或作用域不含 `api` |\n| `HTTP 403` | 账号对该项目无权限 |\n| `HTTP 404`（用路径时） | 路径拼写错误，或用数字 ID 再试 |\n| `unsupported GitLab version ...` | GitLab 版本低于 9.0，不满足 REST API v4 兼容范围 |\n| `merge-mr` 失败 | MR 未达可合并状态（待审批、流水线未过、有冲突） |\n| 触发 pipeline 无效 | 项目缺少 `.gitlab-ci.yml` |\n\n---\n\n## 七、在 Claude / Claude Code 中使用\n\n把 `gitlab-skills` 目录放入 skills 目录后，用自然语言触发：\n\n- “看下 group/app 有哪些打开的 MR”\n- “从 feature/login 向 main 提一个 MR”\n- “在 main 上跑一次流水线”\n\n---\n\n## 八、技术支持与咨询\n\n如果在 GitLab、CI/CD、代码协作、DevOps 平台或研发效能建设中遇到问题，欢迎联系\nRestartX 获取支持与方案咨询：https://service.restartx.top/\n\nFile v0.1.0:agents/openai.yaml\n\ninterface:\n  display_name: \"GitLab DevOps\"\n  short_description: \"GitLab projects, MRs, and CI/CD operations\"\n  default_prompt: \"Use $gitlab-skills to inspect this GitLab project and its latest pipeline.\"\n\npolicy:\n  allow_implicit_invocation: true\n\nFile v0.1.0:LICENSE\n\nMIT License\n\nCopyright (c) 2026 devops-skills contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nFile v0.1.0:requirements.txt\n\nrequests>=2.25,<3","readmeExcerpt":"Skill: Gitlab Skills Owner: weiguang1017 Summary: GitLab projects, MRs, and CI/CD operations Tags: latest:0.1.1 Version history: v0.1.1 | 2026-10-08T08:11:18.784Z | auto - Significant update with localization: SKILL.md is now fully rewritten in Chinese, expanding usage details and clarifying best practices for local environments. - Old auxiliary files (agents, scripts, skill-card.md, 使用手册.md) have been removed for cl","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"export GITLAB_URL=\"https://gitlab.com\"   # 私有化部署填自己的地址\nexport GITLAB_TOKEN=\"<access-token>\"     # 需要 api 权限"},{"language":"bash","snippet":"PY=~/.workbuddy/binaries/python/envs/default/bin/python\n# 若报 Missing dependency，用同一个解释器装：\n# $PY -m pip install requests -i https://mirrors.aliyun.com/pypi/simple/"},{"language":"bash","snippet":"$PY scripts/gitlab_cli.py list-projects --search app\n$PY scripts/gitlab_cli.py get-project group/app\n$PY scripts/gitlab_cli.py list-issues group/app --state opened\n$PY scripts/gitlab_cli.py create-issue group/app --title \"Bug\" --description \"...\"\n$PY scripts/gitlab_cli.py list-mrs group/app --state opened\n$PY scripts/gitlab_cli.py create-mr group/app --source feat --target main --title \"Add feature\"\n$PY scripts/gitlab_cli.py merge-mr group/app 42\n$PY scripts/gitlab_cli.py list-pipelines group/app --ref main\n$PY scripts/gitlab_cli.py trigger-pipeline group/app --ref main"},{"language":"bash","snippet":"pip install requests\nexport GITLAB_URL=\"https://gitlab.example.com\"\nexport GITLAB_TOKEN=\"<access-token>\"\n\npython scripts/gitlab_cli.py get-project group/project\npython scripts/gitlab_cli.py list-pipelines group/project --ref main"},{"language":"bash","snippet":"pip install requests\nexport GITLAB_URL=\"https://gitlab.example.com\"\nexport GITLAB_TOKEN=\"<access-token>\"\n\npython scripts/gitlab_cli.py get-project group/project\npython scripts/gitlab_cli.py list-pipelines group/project --ref main"},{"language":"bash","snippet":"export GITLAB_URL=\"https://gitlab.com\"     # 自建则填你的地址\nexport GITLAB_TOKEN=\"你的token\""}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: gitlab-skills\ndescription: Manage GitLab projects from the command line — list/inspect projects, list and create issues, list/create/merge merge requests, and list or trigger CI/CD pipelines. Use whenever the user wants to work with a GitLab repo, file an issue, open or merge an MR, or kick off / check a pipeline on GitLab.com or a self-hosted GitLab. 中文触发场景：查 GitLab 项目、建 issue、开/合并 MR、查流水线、触发流水线、看流水线是否通过。\n---\n\n# GitLab 技能（命令行实操）\n\n通过 GitLab REST API v4 操作项目，入口是单一自包含的 Python CLI：`scripts/gitlab_cli.py`。\n兼容 GitLab.com SaaS 与私有化部署实例。License: MIT。\n\n## 何时使用\n\n用户提出以下需求时调用本技能：\n\n- 查找或查看项目（\"列一下我的项目\"\"看 group/app 的详情\"）\n- 列出或创建 issue\n- 列出、创建、合并 MR（合并请求）\n- 列出或触发 CI/CD 流水线（\"在 main 上跑一次流水线\"\"流水线绿了吗\"）\n\n## 环境配置（首次）\n\n连接信息从环境变量读取，或放在配置文件 `~/.devops-skills/gitlab.json`。\n**禁止把 token 直接写在命令行参数里。**\n\n```bash\nexport GITLAB_URL=\"https://gitlab.com\"   # 私有化部署填自己的地址\nexport GITLAB_TOKEN=\"<access-token>\"     # 需要 api 权限\n```\n\nToken 创建位置：User Settings → Access Tokens（勾选 `api`）。\n\n## 运行方式\n\n脚本依赖 `requests`。本机受管 Python 环境已安装（requests 2.34.2），**推荐直接用绝对路径调用**，\n避免默认的 `python3` 缺少依赖而失败：\n\n```bash\nPY=~/.workbuddy/binaries/python/envs/default/bin/python\n# 若报 Missing dependency，用同一个解释器装：\n# $PY -m pip install requests -i https://mirrors.aliyun.com/pypi/simple/\n```\n\n项目参数可以是数字 ID，也可以是 `group/subgroup/project` 路径（脚本自动做 URL 编码）。\n\n```bash\n$PY scripts/gitlab_cli.py list-projects --search app\n$PY scripts/gitlab_cli.py get-project group/app\n$PY scripts/gitlab_cli.py list-issues group/app --state opened\n$PY scripts/gitlab_cli.py create-issue group/app --title \"Bug\" --description \"...\"\n$PY scripts/gitlab_cli.py list-mrs group/app --state opened\n$PY scripts/gitlab_cli.py create-mr group/app --source feat --target main --title \"Add feature\"\n$PY scripts/gitlab_cli.py merge-mr group/app 42\n$PY scripts/gitlab_cli.py list-pipelines group/app --ref main\n$PY scripts/gitlab_cli.py trigger-pipeline group/app --ref main\n```\n\n所有命令把 JSON 打到 stdout，失败时以非零退出码结束。\n\n## 兼容性\n\n- GitLab.com\n- 私有化 GitLab 9.0+（REST API v4）\n\n执行命令前会先请求 `/api/v4/version` 做版本校验，检测到低于 9.0 会输出明确的兼容性提示并退出。\n确需绕过时可设 `GITLAB_SKIP_VERSION_CHECK=1` 或 `DEVOPS_SKILLS_SKIP_VERSION_CHECK=1`。\n\n## 注意事项\n\n- `merge-mr` 要求 MR 处于可合并状态（审批规则、流水线状态都会影响）。\n- 触发流水线要求项目里存在 `.gitlab-ci.yml`。\n- 写操作（建 issue、建 MR、合并、触发流水线）属于 🟡 级变更，执行前跟用户确认目标项目与分支。\n\n## 详细文档\n\n完整的配置方式、字段说明与排错见 `references/USAGE.md`。\n\n## 联系与支持\n\nGitLab、CI/CD、DevOps 平台或研发效能问题需要人工支持时联系：\n📧 77890866@qq.com　|　🌐 https://www.restartx.top"},{"path":"README.md","content":"# GitLab DevOps Skill\n\n[English](#english) | [中文](#chinese)\n\n<a id=\"english\"></a>\n## English\n\nManage GitLab projects, issues, merge requests, and CI/CD pipelines through the\nGitLab REST API v4. The CLI supports project discovery, controlled write\noperations, MR creation and merge, pipeline inspection, and pipeline triggers.\n\n### Compatibility\n\n- GitLab.com\n- Self-managed GitLab 9.0+ with REST API v4\n- Python 3.8+ and `requests`\n\nThe CLI calls `/api/v4/version` before normal commands. A self-managed GitLab\nversion below 9.0 fails with a clear compatibility error. Do not bypass this\nguard unless the target API has been independently verified.\n\n### Quick Start\n\n```bash\npip install requests\nexport GITLAB_URL=\"https://gitlab.example.com\"\nexport GITLAB_TOKEN=\"<access-token>\"\n\npython scripts/gitlab_cli.py get-project group/project\npython scripts/gitlab_cli.py list-pipelines group/project --ref main\n```\n\nUse `~/.devops-skills/gitlab.json` as an alternative local configuration file.\nKeep tokens outside version control and protect the file with permissions `600`.\n\n### Common Commands\n\n| Task | Command |\n| --- | --- |\n| List projects | `python scripts/gitlab_cli.py list-projects --search app` |\n| Read a project | `python scripts/gitlab_cli.py get-project group/project` |\n| List issues | `python scripts/gitlab_cli.py list-issues group/project --state opened` |\n| Create an issue | `python scripts/gitlab_cli.py create-issue group/project --title \"Bug\"` |\n| Create an MR | `python scripts/gitlab_cli.py create-mr group/project --source feature --target main --title \"Add feature\"` |\n| Merge an MR | `python scripts/gitlab_cli.py merge-mr group/project 42` |\n| Trigger a pipeline | `python scripts/gitlab_cli.py trigger-pipeline group/project --ref main` |\n\n### Permissions and Safety\n\nUse `read_api` or a project-scoped read token for read-only work. Grant `api`\nscope and only the required project role for writes. This skill does not need\ninstance administrator access. Merges and pipeline triggers remain subject to\nGitLab approvals, protected branches, and pipeline rules.\n\n### Documentation and Support\n\n- Agent instructions: [SKILL.md](./SKILL.md)\n- Detailed Chinese manual: [使用手册.md](./使用手册.md)\n- Support: https://service.restartx.top/\n\nRestartX provides technical support and implementation services for GitLab,\nCI/CD, DevOps platform, and engineering-efficiency needs.\n\n<a id=\"chinese\"></a>\n## 中文\n\n通过 GitLab REST API v4 管理项目、Issue、Merge Request 和 CI/CD Pipeline。CLI 支持项目\n查询、受控写操作、创建和合并 MR、查询 Pipeline 以及触发流水线。\n\n### 兼容性\n\n- GitLab.com\n- 使用 REST API v4 的自建 GitLab 9.0+\n- Python 3.8+ 与 `requests`\n\n脚本会在正常执行前调用 `/api/v4/version`。自建 GitLab 低于 9.0 时会给出明确的不兼容错误；\n除非已独立确认目标 API 兼容，否则不要跳过该检查。\n\n### 快速开始\n\n```bash\npip install requests\nexport GITLAB_URL=\"https://gitlab.example.com\"\nexport GITLAB_TOKEN=\"<access-token>\"\n\npython scripts/gitlab_cli.py get-project group/project\npython scripts/gitlab_cli.py list-pipelines group/project --ref main\n```\n\n也可使用本地配置文件 `~/.devops-skills/gitlab.json`。令牌不"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7abv05p1jqkcnmnmkdpdex9581nt3f\",\n  \"slug\": \"gitlab-devops-skill\",\n  \"version\": \"0.1.1\",\n  \"publishedAt\": 1791447078784\n}"},{"path":"references/USAGE.md","content":"# GitLab Skills 配置与使用手册\n\n通过一个 Python CLI 操作 GitLab（SaaS 或自建均可），覆盖项目、Issue、Merge Request、CI/CD Pipeline。\n\n---\n\n## 一、环境要求\n\n- Python 3.8 及以上\n- `pip install requests`\n- GitLab.com，或自建 GitLab 9.0 及以上（REST API v4）\n\n脚本会在执行命令前调用 `/api/v4/version` 检测 GitLab 版本；若自建 GitLab\n低于 9.0，会给出明确的不兼容提示。确需跳过检查时，可设置\n`GITLAB_SKIP_VERSION_CHECK=1` 或 `DEVOPS_SKILLS_SKIP_VERSION_CHECK=1`。\n\n---\n\n## 二、获取访问令牌（Access Token）\n\n1. 登录 GitLab → 右上角头像 → **Preferences / Settings**。\n2. 左侧 **Access Tokens**（个人令牌）。也可用项目级 / 群组级令牌。\n3. 勾选 **api** 作用域 → 创建并复制 token（只显示一次）。\n\n---\n\n## 三、配置连接信息（二选一）\n\n### 方式 A：环境变量\n\n```bash\nexport GITLAB_URL=\"https://gitlab.com\"     # 自建则填你的地址\nexport GITLAB_TOKEN=\"你的token\"\n```\n\n### 方式 B：配置文件 `~/.devops-skills/gitlab.json`\n\n```json\n{\n  \"url\": \"https://gitlab.com\",\n  \"token\": \"你的token\"\n}\n```\n\n> `chmod 600 ~/.devops-skills/gitlab.json`，不要把 token 提交到仓库。\n\n---\n\n## 四、命令速查\n\n> 项目参数 `project` 支持**数字 ID** 或**路径** `group/subgroup/project`（脚本自动转义）。\n\n| 功能 | 命令 |\n| --- | --- |\n| 列出我的项目 | `python scripts/gitlab_cli.py list-projects --search app` |\n| 查看项目详情 | `python scripts/gitlab_cli.py get-project group/app` |\n| 列出 Issue | `python scripts/gitlab_cli.py list-issues group/app --state opened` |\n| 创建 Issue | `python scripts/gitlab_cli.py create-issue group/app --title \"标题\" --description \"描述\"` |\n| 列出 MR | `python scripts/gitlab_cli.py list-mrs group/app --state opened` |\n| 创建 MR | `python scripts/gitlab_cli.py create-mr group/app --source feat --target main --title \"标题\"` |\n| 合并 MR | `python scripts/gitlab_cli.py merge-mr group/app 42` |\n| 列出 Pipeline | `python scripts/gitlab_cli.py list-pipelines group/app --ref main` |\n| 触发 Pipeline | `python scripts/gitlab_cli.py trigger-pipeline group/app --ref main` |\n\n---\n\n## 五、使用示例\n\n**1. 提交一个新分支的 MR 并合并**\n\n```bash\npython scripts/gitlab_cli.py create-mr group/app \\\n  --source feature/login --target main --title \"新增登录功能\"\n# 记下返回的 iid，例如 42\npython scripts/gitlab_cli.py merge-mr group/app 42\n```\n\n**2. 在 main 分支触发流水线并查看状态**\n\n```bash\npython scripts/gitlab_cli.py trigger-pipeline group/app --ref main\npython scripts/gitlab_cli.py list-pipelines group/app --ref main\n```\n\n---\n\n## 六、常见问题\n\n| 现象 | 原因与解决 |\n| --- | --- |\n| `GITLAB_TOKEN is required` | 未配置 token |\n| `HTTP 401` | token 失效或作用域不含 `api` |\n| `HTTP 403` | 账号对该项目无权限 |\n| `HTTP 404`（用路径时） | 路径拼写错误，或用数字 ID 再试 |\n| `unsupported GitLab version ...` | GitLab 版本低于 9.0，不满足 REST API v4 兼容范围 |\n| `merge-mr` 失败 | MR 未达可合并状态（待审批、流水线未过、有冲突） |\n| 触发 pipeline 无效 | 项目缺少 `.gitlab-ci.yml` |\n\n---\n\n## 七、在 Claude / Claude Code 中使用\n\n把 `gitlab-skills` 目录放入 skills 目录后，用自然语言触发：\n\n- “看下 group/app 有哪些打开的 MR”\n- “从 feature/login 向 main 提一个 MR”\n- “在 main 上跑一次流水线”\n\n---\n\n## 八、技术支持与咨询\n\n如果在 GitLab、CI/CD、代码协作、DevOps 平台或研发效能建设中遇到问题，欢迎联系\nRestartX 获取支持与方案咨询：https://service.restartx.top/"},{"path":"skill-card.md","content":"## Description:\n\nHelps agents inspect GitLab projects, issues, merge requests, and pipelines, and perform requested GitLab write operations.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[weiguang1017](https://clawhub.ai/user/weiguang1017)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nDevelopers and DevOps engineers use this skill to inspect GitLab projects, issues, merge requests, and CI/CD pipelines, and to create issues or merge requests, merge changes, or start pipelines when authorized.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: A GitLab token with write access can enable consequential repository changes without an enforced confirmation gate.\n\nMitigation: Prefer project-scoped or read-only tokens where possible; require explicit human confirmation before creating issues or merge requests, merging, or triggering pipelines, and keep protected-branch and approval rules enabled.\n\n## Reference(s):\n\n- [GitLab Skills usage guide](references/USAGE.md)\n- [Release source repository](https://github.com/weiguang1017/gitlab-devops-skill)\n- [ClawHub skill release](https://clawhub.ai/weiguang1017/skills/gitlab-devops-skill)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, JSON]\n\n**Output Format:** [Text guidance and commands; GitLab CLI responses in JSON]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [GitLab command failures return a non-zero exit status.]\n\n## Skill Version(s):\n\n0.1.1 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1416,"uniquenessScore":40,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T13:37:52.465Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T13:37:52.465Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T03:15:30.152Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}