闲社服务运行正常AI智能体自动化平台
g

GitLab交互

技能标识:gitlab

Interact with GitLab API for managing projects, issues, merge requests, branches, pipelines, users, groups, and more. Use when the user needs to perform GitLab operations like creating issues, reviewing merge requests, managing branches, or querying project data via the GitLab REST API.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

GitLab交互

GitLab API 技能

用于 GitLab REST API (v4) 的 Node.js 客户端。从 ./.env 读取配置。

安全规则

  • - 切勿读取、输出、打印、grep 或暴露 GITLABTOKEN 值。
  • 切勿使用 curl、wget 或任何工具直接调用 GitLab API。所有访问必须通过 gitlab-client。
  • AI 可以读取/写入 .env 来管理 GITLABURL,但 GITLAB_TOKEN 必须由用户手动设置。

设置

需要包含以下内容的 ./.env 文件:

GITLAB_URL=https://gitlab.fullnine.com.cn
GITLAB_TOKEN=<您的个人访问令牌>

如果缺少令牌,提示用户编辑 ./.env 并在 URL>/-/profile/personalaccess_tokens 创建令牌(作用域:api)。

安装(首次):source ~/.nvm/nvm.sh && npm install

快速开始

bash
gitlab-client users me # 当前用户
gitlab-client projects list --owned # 我的项目
gitlab-client issues list --project 42 --state opened # 项目问题
gitlab-client mrs create --project 42 --source-branch feat --target-branch main --title 我的合并请求

命令参考

格式:gitlab-client <资源> <操作> [ID] [--键 值 ...]

所有列表操作支持 --page N --per-page N(默认 20,最大 100)。

项目

操作用法选项
listprojects list--search --owned --membership --visibility
get
projects get | | | search | projects search 术语 | | | create | projects create --name 名称 | --description --visibility --namespace-id --initialize-with-readme | | edit | projects edit | --name --description --visibility | | delete | projects delete | | | fork | projects fork | --namespace | | members | projects members | | | hooks | projects hooks | |

问题

操作用法选项
listissues list --project <id>--state --labels --milestone --assignee-id --search
get
issues get --project --iid | | | create | issues create --project --title T | --description --labels --assignee-ids --milestone-id --due-date --confidential | | edit | issues edit --project --iid | --title --description --state-event --labels --assignee-ids | | close | issues close --project --iid | | | reopen | issues reopen --project --iid | | | delete | issues delete --project --iid | | | notes | issues notes --project --iid | | | add-note | issues add-note --project --iid --body 文本 | |

合并请求

操作用法选项
listmrs list --project <id>--state --labels --milestone --source-branch --target-branch --search
get
mrs get --project --iid | | | create | mrs create --project --source-branch src --target-branch tgt --title T | --description --assignee-id --reviewer-ids --labels --milestone-id --remove-source-branch --squash | | edit | mrs edit --project --iid | --title --description --state-event --labels --assignee-id | | merge | mrs merge --project --iid | --merge-commit-message --squash --should-remove-source-branch | | changes | mrs changes --project --iid | | | commits | mrs commits --project --iid | | | notes | mrs notes --project --iid | | | add-note | mrs add-note --project --iid --body 文本 | | | approve | mrs approve --project --iid | | | pipelines | mrs pipelines --project --iid | |

分支

操作用法选项
listbranches list --project <id>--search
get
branches get --project --branch 名称 | | | create | branches create --project --branch 名称 --ref main | | | delete | branches delete --project --branch 名称 | | | delete-merged | branches delete-merged --project | |

提交

操作用法选项
listcommits list --project <id>--ref-name --since --until --path
get
commits get --project --sha abc123 | | | diff | commits diff --project --sha abc123 | | | comments | commits comments --project --sha abc123 | | | add-comment | commits add-comment --project --sha abc123 --note 文本 | |

仓库/文件

操作用法选项
treerepo tree --project <id>--path --ref --recursive
file
repo file --project --file-path 路径 | --ref | | raw | repo raw --project --file-path 路径 | --ref | | create-file | repo create-file --project --file-path p --branch b --content c --commit-message m | | | update-file | repo update-file --project --file-path p --branch b --content c --commit-message m | | | delete-file | repo delete-file --project --file-path p --branch b --commit-message m | | | compare | repo compare --project --from main --to feat | |

流水线

操作用法选项
listpipelines list --project <id>--status --ref
get
pipelines get --project --pipeline-id | | | jobs | pipelines jobs --project --pipeline-id | | | job-log | pipelines job-log --project --job-id | | | retry | pipelines retry --project --pipeline-id | | | cancel | pipelines cancel --project --pipeline-id | | | create | pipelines create --project --ref main | --variables K1=v1,K2=v2 |

组

操作用法选项
listgroups list--search --owned
get
groups get | | | projects | groups projects | --search | | members | groups members | | | issues | groups issues | --state | | mrs | groups mrs | --state |

用户

操作用法
meusers me
list
users list [--search john] | | get | users get | | projects | users projects |

标签

操作用法选项
listlabels list --project <id>
create
labels create --project

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 gitlab-api-client-1775923872 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 gitlab-api-client-1775923872 技能

通过命令行安装

skillhub install gitlab-api-client-1775923872

下载

⬇ 下载 gitlab v1.0.0(免费)

文件大小: 14.13 KB | 发布时间: 2026-4-12 10:06

v1.0.0 最新 2026-4-12 10:06
Initial release: GitLab REST API v4 client with full project/issue/MR/pipeline management
返回顶部