Skip to content

Commit 55ab020

Browse files
author
ZCode Marketplace Bot
committed
feat(gitlab): add glab workflow plugin
Source-Commit: 25905a8730fc2863296c60c9a606f3d366c98678
1 parent 0ca3d01 commit 55ab020

14 files changed

Lines changed: 921 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Use this repository to browse available plugins, install the marketplace in comp
1919
| [**cloudbase-skills**](./plugins/cloudbase-skills) | `developer-tools` | CloudBase development skills and MCP integration for Web, Mini Program, database, cloud functions, CloudRun, storage, and AI projects. |
2020
| [**mimosa**](./plugins/mimosa) | `developer-tools` | Local-first security guardrails with pre-write hooks, review and Git gates, security commands, and optional sealed deep scans. |
2121
| [**github**](./plugins/github) | `developer-tools` | GitHub CLI workflows for commits, pull requests, issues, releases, Actions, repositories, and Codespaces. |
22+
| [**gitlab**](./plugins/gitlab) | `developer-tools` | GitLab CLI workflows for merge requests, issues, CI/CD, repositories, releases, and API operations, including self-managed instances. |
2223
| [**video2code**](./plugins/video2code) | `productivity` | Replicate a webpage from a screen recording or URL: record with the built-in WebView, observe frames, scaffold a React app, and verify against the source. |
2324

2425
### Finance plugins
@@ -48,7 +49,7 @@ The `category` field in [`marketplace.json`](./marketplace.json) keeps discovery
4849

4950
| Category | Use it for | Current plugins |
5051
| --- | --- | --- |
51-
| `developer-tools` | Development, code quality, Git, CI, and engineering workflows | `cloudbase-skills`, `mimosa`, `github` |
52+
| `developer-tools` | Development, code quality, Git, CI, and engineering workflows | `cloudbase-skills`, `mimosa`, `github`, `gitlab` |
5253
| `productivity` | Planning, knowledge work, and personal workflow automation | `video2code` |
5354
| `utilities` | General-purpose helpers that do not fit another category | — |
5455
| `finance` | Finance-domain workflows: markets, accounting, risk, and fintech integrations | `write-research`, `read-macro`, `assess-credit`, `pick-funds`, `watch-positions`, `model-deals`, `vet-companies`, `find-clients`, `run-fpa`, `accounting-and-reporting` |

‎README_CN.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
| [**cloudbase-skills**](./plugins/cloudbase-skills) | `developer-tools` | 腾讯云 CloudBase 开发技能与 MCP 集成,覆盖 Web、小程序、数据库、云函数、云托管、云存储和 AI 项目。 |
2020
| [**mimosa**](./plugins/mimosa) | `developer-tools` | 本地优先的代码安全防线,提供写入前 Hook、复查与 Git 门禁、安全命令和可选密封深扫。 |
2121
| [**github**](./plugins/github) | `developer-tools` | 基于 GitHub CLI 的工作流,覆盖提交、Pull Request、Issue、Release、Actions、仓库和 Codespaces。 |
22+
| [**gitlab**](./plugins/gitlab) | `developer-tools` | 基于 `glab` 的 GitLab 工作流,覆盖 MR、Issue、CI/CD、仓库、Release 和 API,并支持自托管实例。 |
2223
| [**video2code**](./plugins/video2code) | `productivity` | 从网页录屏或 URL 复刻网页:内置 WebView 录制、逐帧观察、脚手架 React 项目,并与源视频对照验证。 |
2324

2425
### 金融插件
@@ -47,7 +48,7 @@ agent + 领域 skill」的组合;除 `accounting-and-reporting` 外都带远
4748

4849
| 分类 | 适用范围 | 当前插件 |
4950
| --- | --- | --- |
50-
| `developer-tools` | 开发、代码质量、Git、CI 和工程工作流 | `cloudbase-skills`、`mimosa`、`github` |
51+
| `developer-tools` | 开发、代码质量、Git、CI 和工程工作流 | `cloudbase-skills`、`mimosa`、`github`、`gitlab` |
5152
| `productivity` | 计划、知识工作和个人工作流自动化 | `video2code` |
5253
| `utilities` | 不属于其他分类的通用工具 | — |
5354
| `finance` | 金融领域工作流:行情、财务、风险与金融科技集成 | `write-research`、`read-macro`、`assess-credit`、`pick-funds`、`watch-positions`、`model-deals`、`vet-companies`、`find-clients`、`run-fpa`、`accounting-and-reporting` |

‎marketplace.json‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,30 @@
419419
"lbo",
420420
"earnings"
421421
]
422+
},
423+
{
424+
"name": "gitlab",
425+
"source": "./plugins/gitlab",
426+
"description": "GitLab CLI workflows based on GitLab's official Agent Skills for merge requests, issues, CI/CD, repositories, releases, and API operations.",
427+
"description_i18n": {
428+
"en": "GitLab CLI workflows based on GitLab's official Agent Skills for merge requests, issues, CI/CD, repositories, releases, and API operations.",
429+
"zh-CN": "基于官方 GitLab CLI 的 Merge Request、Issue、CI/CD、仓库、Release 与 API 工作流。"
430+
},
431+
"version": "0.1.3",
432+
"author": {
433+
"name": "Z.ai",
434+
"url": "https://z.ai"
435+
},
436+
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/gitlab/icon.png",
437+
"category": "developer-tools",
438+
"keywords": [
439+
"gitlab",
440+
"glab",
441+
"merge-request",
442+
"issue",
443+
"ci-cd",
444+
"gitlab-api"
445+
]
422446
}
423447
]
424448
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "gitlab",
3+
"version": "0.1.3",
4+
"description": "GitLab CLI workflows based on GitLab's official Agent Skills for merge requests, issues, CI/CD, repositories, releases, and API operations.",
5+
"description_i18n": {
6+
"en": "GitLab CLI workflows based on GitLab's official Agent Skills for merge requests, issues, CI/CD, repositories, releases, and API operations.",
7+
"zh-CN": "基于官方 GitLab CLI 的 Merge Request、Issue、CI/CD、仓库、Release 与 API 工作流。"
8+
},
9+
"author": {
10+
"name": "Z.ai",
11+
"url": "https://z.ai"
12+
},
13+
"homepage": "https://docs.gitlab.com/cli/",
14+
"repository": "https://gitlab.com/gitlab-org/cli",
15+
"license": "MIT",
16+
"keywords": [
17+
"gitlab",
18+
"glab",
19+
"merge-request",
20+
"issue",
21+
"ci-cd",
22+
"gitlab-api"
23+
]
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "gitlab",
3+
"version": "0.1.3",
4+
"description": "GitLab CLI workflows based on GitLab's official Agent Skills for merge requests, issues, CI/CD, repositories, releases, and API operations.",
5+
"description_i18n": {
6+
"en": "GitLab CLI workflows based on GitLab's official Agent Skills for merge requests, issues, CI/CD, repositories, releases, and API operations.",
7+
"zh-CN": "基于官方 GitLab CLI 的 Merge Request、Issue、CI/CD、仓库、Release 与 API 工作流。"
8+
},
9+
"author": {
10+
"name": "Z.ai",
11+
"url": "https://z.ai"
12+
},
13+
"homepage": "https://docs.gitlab.com/cli/",
14+
"repository": "https://gitlab.com/gitlab-org/cli",
15+
"license": "MIT",
16+
"keywords": [
17+
"gitlab",
18+
"glab",
19+
"merge-request",
20+
"issue",
21+
"ci-cd",
22+
"gitlab-api"
23+
]
24+
}

‎plugins/gitlab/LICENSE‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2022-present GitLab Inc.
4+
Copyright (c) 2019 GitHub Inc.
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

‎plugins/gitlab/README.md‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# GitLab CLI Workflows for ZCode
2+
3+
[中文文档](./README_CN.md)
4+
5+
This plugin packages the official GitLab CLI (`glab`) Agent Skills for ZCode
6+
and adds a guided installation and authentication flow. It works with
7+
GitLab.com, GitLab Dedicated, and GitLab Self-Managed instances supported by
8+
the locally installed [`glab`](https://docs.gitlab.com/cli/).
9+
10+
## Setup and authentication
11+
12+
- Run `/gitlab:setup [hostname]` to let the agent check the `glab` binary,
13+
default to the latest stable install/upgrade when it is missing or outdated,
14+
and guide browser/OAuth login when authentication is missing.
15+
- Every GitLab-backed skill verifies the hostname, authentication state, and
16+
active username before running its workflow.
17+
- Authentication is rechecked after login. The agent must stop if verification
18+
still fails or if the active account is not the intended identity.
19+
- The agent never asks the user to paste a token, password, or device code into
20+
chat.
21+
22+
The plugin does not bundle `glab` or store credentials. When `/gitlab:setup` is
23+
explicitly invoked, the agent shows the latest-stable install/upgrade command
24+
before running it; unrelated GitLab workflows never silently replace the
25+
binary. Environment credentials such as `GITLAB_TOKEN` can override stored
26+
`glab` credentials; the preflight verifies the effective identity without
27+
exposing the secret.
28+
29+
## Skills
30+
31+
| Skill | ZCode command | Description |
32+
|-------|---------------|-------------|
33+
| setup | `/gitlab:setup [hostname]` | Verify `glab`, guide login, and confirm the active account |
34+
| glab | `/gitlab:glab` | Official general GitLab CLI workflow and API guidance |
35+
| glab-stack | `/gitlab:glab-stack` | Official guidance for experimental stacked merge requests |
36+
37+
Natural-language GitLab tasks can also activate the relevant skill without an
38+
explicit slash command.
39+
40+
## Examples
41+
42+
```text
43+
/gitlab:setup gitlab.example.com
44+
/gitlab:glab show merge requests waiting for my review
45+
/gitlab:glab inspect the failed pipeline for the current branch
46+
/gitlab:glab-stack show the current stack without opening an interactive UI
47+
```
48+
49+
## Compatibility
50+
51+
The official skill sources are pinned in [`UPSTREAM.md`](./UPSTREAM.md). The
52+
packaged skills do not depend on the newer `glab skills install` command, so
53+
they work when ZCode can invoke the underlying commands directly. Setup uses
54+
`glab check-update` dynamically instead of hardcoding a release number. The
55+
imported command patterns were smoke-tested against `glab 1.93.0`; experimental
56+
command families must inspect their installed `--help` before execution.
57+
58+
## Safety boundary
59+
60+
This is a prompt/skill layer over the local `glab` executable, not a policy
61+
sandbox. It never receives or stores GitLab credentials itself. Agents must
62+
identify the host, project, account, and target before remote-changing
63+
operations, and must obtain explicit confirmation for destructive actions such
64+
as merge, delete, unprotect, secret/variable mutation, or token changes.
65+
66+
## ZCode packaging
67+
68+
The installable manifest is `.zcode-plugin/plugin.json`;
69+
`.claude-plugin/plugin.json` is kept as a compatibility mirror. The marketplace
70+
entry is maintained in the repository root at [`marketplace.json`](../../marketplace.json).
71+
72+
## License
73+
74+
The imported GitLab CLI skills are MIT licensed. See [`LICENSE`](./LICENSE) and
75+
[`UPSTREAM.md`](./UPSTREAM.md).

‎plugins/gitlab/README_CN.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# ZCode GitLab CLI 工作流插件
2+
3+
[English](./README.md)
4+
5+
本插件将 GitLab 官方 CLI(`glab`)内置的 Agent Skills 打包为 ZCode 插件,并补充安装与认证引导。它使用本机 [`glab`](https://docs.gitlab.com/cli/),支持 GitLab.com、GitLab Dedicated 和 GitLab Self-Managed。
6+
7+
## 安装与认证
8+
9+
- 运行 `/gitlab:setup [hostname]`,让 Agent 检查 `glab` 二进制;缺少或过期时默认引导安装/升级到最新稳定版,未登录时引导浏览器/OAuth 认证。
10+
- 所有 GitLab Skill 在执行业务流程前都会验证主机、认证状态和当前用户名。
11+
- 用户完成登录后必须再次现场验证;验证失败或账号不符时停止执行。
12+
- Agent 不得要求用户在对话中粘贴 Token、密码或设备码。
13+
14+
插件不会内置 `glab` 或保存凭据。显式运行 `/gitlab:setup` 时,Agent 会先展示最新稳定版的安装/升级命令;普通 GitLab workflow 不会静默替换二进制。`GITLAB_TOKEN` 等环境凭据可能覆盖本地存储的登录状态,preflight 会验证最终生效的身份,但不得输出密钥。
15+
16+
## Skills
17+
18+
| Skill | ZCode 命令 | 说明 |
19+
|-------|------------|------|
20+
| setup | `/gitlab:setup [hostname]` | 检查 `glab`、引导登录并确认当前账号 |
21+
| glab | `/gitlab:glab` | GitLab 官方通用 CLI 与 API 工作流指导 |
22+
| glab-stack | `/gitlab:glab-stack` | GitLab 官方实验性 Stacked MR 工作流指导 |
23+
24+
使用自然语言提出 GitLab 任务时,也可以自动激活对应 Skill,不要求必须输入斜杠命令。
25+
26+
## 示例
27+
28+
```text
29+
/gitlab:setup gitlab.example.com
30+
/gitlab:glab 查看等待我 Review 的 MR
31+
/gitlab:glab 分析当前分支失败的 Pipeline
32+
/gitlab:glab-stack 非交互地查看当前 Stack
33+
```
34+
35+
## 兼容性
36+
37+
官方 Skill 来源与固定提交见 [`UPSTREAM.md`](./UPSTREAM.md)。本插件不依赖较新的 `glab skills install` 命令,只要 ZCode 能调用底层 `glab` 命令即可。Setup 通过 `glab check-update` 动态选择最新版本,不硬编码发行号。命令模板已使用 `glab 1.93.0` 做 smoke test;`mr note`、`stack`、`mcp`、`work-items` 等实验性命令必须先读取本机 `--help`。
38+
39+
## 安全边界
40+
41+
这是本机 `glab` 之上的提示词/Skill 层,不是强制策略沙箱。插件本身不接收或保存 GitLab 凭据。执行远端写操作前,Agent 必须明确主机、项目、账号和目标;合并、删除、取消保护、Secret/Variable 修改或 Token 变更等破坏性操作必须获得用户明确确认。
42+
43+
## ZCode 打包
44+
45+
可安装的主清单是 `.zcode-plugin/plugin.json`;`.claude-plugin/plugin.json` 保留为兼容镜像。市场注册信息维护在仓库根目录 [`marketplace.json`](../../marketplace.json)。
46+
47+
## 许可证
48+
49+
导入的 GitLab CLI Skills 使用 MIT 许可证,见 [`LICENSE`](./LICENSE) 与 [`UPSTREAM.md`](./UPSTREAM.md)。

‎plugins/gitlab/UPSTREAM.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Upstream
2+
3+
This plugin imports the Agent Skills bundled in the official GitLab CLI
4+
repository:
5+
6+
- Repository: https://gitlab.com/gitlab-org/cli
7+
- Source release: `v1.112.0`
8+
- Source commit: `816e3a52411aba73d90237859fdc6ecbc86bd169`
9+
- Imported on: 2026-08-11
10+
- Imported paths:
11+
- `internal/commands/skills/bundled/assets/glab/SKILL.md`
12+
- `internal/commands/skills/bundled/assets/glab-stack/SKILL.md`
13+
- License: MIT, included in [`LICENSE`](./LICENSE)
14+
15+
The ZCode adaptation tracks the skills shipped by `glab v1.112.0` and adds
16+
ZCode/Claude compatibility manifests, bilingual
17+
marketplace documentation, `/gitlab:setup`, a shared binary/authentication
18+
preflight, installed-version capability checks, and explicit confirmation for
19+
destructive GitLab operations. The imported workflow content remains derived
20+
from the official GitLab CLI source.

0 commit comments

Comments
 (0)