← 返回 Skills 市场
jonasgao

GitLab API Client

作者 JonasGao · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
125
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install gitlab-api-client
功能描述
Interact with GitLab API for managing projects, issues, merge requests, branches, pipelines, users, groups, and more. Use when the user needs to perform GitL...
使用说明 (SKILL.md)

GitLab API Skill

Node.js client for the GitLab REST API (v4). Reads config from ./.env.

Security Rules

  • NEVER read, cat, print, grep, or expose the GITLAB_TOKEN value.
  • NEVER use curl, wget, or any tool to call GitLab API directly. All access MUST go through gitlab-client.
  • AI may read/write .env to manage GITLAB_URL, but GITLAB_TOKEN must be set by the user manually.

Setup

Requires ./.env with:

GITLAB_URL=https://gitlab.fullnine.com.cn
GITLAB_TOKEN=\x3Cyour-personal-access-token>

If token is missing, prompt the user to edit ./.env and create a token at \x3CGITLAB_URL>/-/profile/personal_access_tokens (scope: api).

Install (first time): source ~/.nvm/nvm.sh && npm install

Quick Start

gitlab-client users me                                    # Current user
gitlab-client projects list --owned                       # My projects
gitlab-client issues list --project 42 --state opened     # Project issues
gitlab-client mrs create --project 42 --source-branch feat --target-branch main --title "My MR"

Commands Reference

Format: gitlab-client \x3Cresource> \x3Caction> [id] [--key value ...]

All list actions support --page N --per-page N (default 20, max 100).

Projects

Action Usage Options
list projects list --search --owned --membership --visibility
get projects get \x3Cid>
search projects search "term"
create projects create --name "name" --description --visibility --namespace-id --initialize-with-readme
edit projects edit \x3Cid> --name --description --visibility
delete projects delete \x3Cid>
fork projects fork \x3Cid> --namespace
members projects members \x3Cid>
hooks projects hooks \x3Cid>

Issues

Action Usage Options
list issues list --project \x3Cid> --state --labels --milestone --assignee-id --search
get issues get --project \x3Cid> --iid \x3Ciid>
create issues create --project \x3Cid> --title "T" --description --labels --assignee-ids --milestone-id --due-date --confidential
edit issues edit --project \x3Cid> --iid \x3Ciid> --title --description --state-event --labels --assignee-ids
close issues close --project \x3Cid> --iid \x3Ciid>
reopen issues reopen --project \x3Cid> --iid \x3Ciid>
delete issues delete --project \x3Cid> --iid \x3Ciid>
notes issues notes --project \x3Cid> --iid \x3Ciid>
add-note issues add-note --project \x3Cid> --iid \x3Ciid> --body "text"

Merge Requests

Action Usage Options
list mrs list --project \x3Cid> --state --labels --milestone --source-branch --target-branch --search
get mrs get --project \x3Cid> --iid \x3Ciid>
create mrs create --project \x3Cid> --source-branch "src" --target-branch "tgt" --title "T" --description --assignee-id --reviewer-ids --labels --milestone-id --remove-source-branch --squash
edit mrs edit --project \x3Cid> --iid \x3Ciid> --title --description --state-event --labels --assignee-id
merge mrs merge --project \x3Cid> --iid \x3Ciid> --merge-commit-message --squash --should-remove-source-branch
changes mrs changes --project \x3Cid> --iid \x3Ciid>
commits mrs commits --project \x3Cid> --iid \x3Ciid>
notes mrs notes --project \x3Cid> --iid \x3Ciid>
add-note mrs add-note --project \x3Cid> --iid \x3Ciid> --body "text"
approve mrs approve --project \x3Cid> --iid \x3Ciid>
pipelines mrs pipelines --project \x3Cid> --iid \x3Ciid>

Branches

Action Usage Options
list branches list --project \x3Cid> --search
get branches get --project \x3Cid> --branch "name"
create branches create --project \x3Cid> --branch "name" --ref "main"
delete branches delete --project \x3Cid> --branch "name"
delete-merged branches delete-merged --project \x3Cid>

Commits

Action Usage Options
list commits list --project \x3Cid> --ref-name --since --until --path
get commits get --project \x3Cid> --sha "abc123"
diff commits diff --project \x3Cid> --sha "abc123"
comments commits comments --project \x3Cid> --sha "abc123"
add-comment commits add-comment --project \x3Cid> --sha "abc123" --note "text"

Repository / Files

Action Usage Options
tree repo tree --project \x3Cid> --path --ref --recursive
file repo file --project \x3Cid> --file-path "path" --ref
raw repo raw --project \x3Cid> --file-path "path" --ref
create-file repo create-file --project \x3Cid> --file-path "p" --branch "b" --content "c" --commit-message "m"
update-file repo update-file --project \x3Cid> --file-path "p" --branch "b" --content "c" --commit-message "m"
delete-file repo delete-file --project \x3Cid> --file-path "p" --branch "b" --commit-message "m"
compare repo compare --project \x3Cid> --from "main" --to "feat"

Pipelines

Action Usage Options
list pipelines list --project \x3Cid> --status --ref
get pipelines get --project \x3Cid> --pipeline-id \x3Cpid>
jobs pipelines jobs --project \x3Cid> --pipeline-id \x3Cpid>
job-log pipelines job-log --project \x3Cid> --job-id \x3Cjid>
retry pipelines retry --project \x3Cid> --pipeline-id \x3Cpid>
cancel pipelines cancel --project \x3Cid> --pipeline-id \x3Cpid>
create pipelines create --project \x3Cid> --ref "main" --variables "K1=v1,K2=v2"

Groups

Action Usage Options
list groups list --search --owned
get groups get \x3Cid>
projects groups projects \x3Cid> --search
members groups members \x3Cid>
issues groups issues \x3Cid> --state
mrs groups mrs \x3Cid> --state

Users

Action Usage
me users me
list users list [--search "john"]
get users get \x3Cid>
projects users projects \x3Cid>

Labels

Action Usage Options
list labels list --project \x3Cid>
create labels create --project \x3Cid> --name "bug" --color "#FF0000" --description
edit labels edit --project \x3Cid> --name "bug" --new-name --color
delete labels delete --project \x3Cid> --name "bug"

Milestones

Action Usage Options
list milestones list --project \x3Cid> --state
get milestones get --project \x3Cid> --milestone-id \x3Cmid>
create milestones create --project \x3Cid> --title "v1.0" --description --due-date --start-date
edit milestones edit --project \x3Cid> --milestone-id \x3Cmid> --title --state-event
delete milestones delete --project \x3Cid> --milestone-id \x3Cmid>

Tags & Releases

Action Usage Options
tags list tags list --project \x3Cid> --search
tags create tags create --project \x3Cid> --tag-name "v1.0" --ref "main" --message
tags delete tags delete --project \x3Cid> --tag-name "v1.0"
releases list releases list --project \x3Cid>
releases create releases create --project \x3Cid> --tag-name "v1.0" --name "R1" --description

Snippets

Action Usage Options
list snippets list --project \x3Cid>
get snippets get --project \x3Cid> --snippet-id \x3Csid>
create snippets create --project \x3Cid> --title "T" --file-name "f" --content "c" --visibility

Search

Action Usage
global search global --scope \x3Cscope> --search "query"
project search project --project \x3Cid> --scope \x3Cscope> --search "query"
group search group --group \x3Cid> --scope \x3Cscope> --search "query"

Scopes — global: projects|issues|merge_requests|milestones|snippet_titles|users. Project: issues|merge_requests|milestones|notes|wiki_blobs|commits|blobs. Group: projects|issues|merge_requests|milestones.

Runners

Action Usage Options
list runners list --project \x3Cid>
all runners all --type --status

Webhooks

Action Usage Options
list hooks list --project \x3Cid>
create hooks create --project \x3Cid> --url "url" --push-events --merge-requests-events --issues-events --token
delete hooks delete --project \x3Cid> --hook-id \x3Chid>

Usage Notes

  • Auth: Uses PRIVATE-TOKEN header. Scopes: api (full), read_api (read-only), read_user, read_repository.
  • Project ID: Use numeric ID or URL-encoded path (my-group%2Fmy-project).
  • Output: JSON. Pipe to jq for filtering: gitlab-client projects list | jq '.[].name'
  • Dates: ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).
  • Labels: Comma-separated: --labels "bug,feature,urgent".
  • Errors: 401 unauthorized, 403 forbidden, 404 not found, 422 validation, 429 rate limited.
安全使用建议
This package is a genuine-looking GitLab CLI, but pay attention to the token handling before installing: - The skill requires a GITLAB_TOKEN saved in a .env file (in the skill directory), yet the registry metadata claims no credentials — verify the source and why metadata is incomplete. - Storing a personal access token in plaintext .env under the skill folder is a security risk. Prefer using your platform's secret manager or placing the token in a secure file location with restricted permissions. - SKILL.md forbids exposing the token but also allows the agent to read/write .env to manage GITLAB_URL; that contradiction can lead to accidental token leakage. If you install, ensure the agent is not allowed to print or transmit .env contents and consider setting GITLAB_TOKEN manually at runtime or using an env var injected by the platform rather than a file the skill can edit. - Review the bundled gitlab-client.js (present here) to confirm no network calls other than to your GitLab host, and run the tool in an isolated environment first (or with a least-privilege token, e.g., read_api rather than full api scope) to test behavior. If you can, ask the publisher to update registry metadata to declare the required credential and to document secure token handling; that would increase confidence in the package.
能力评估
Purpose & Capability
Name/description (GitLab API client) match the included code (CLI that talks to a GitLab instance). However the registry metadata declares no required environment variables or primary credential, while the code and SKILL.md clearly require a GITLAB_TOKEN and GITLAB_URL in a .env file — an inconsistency that should be resolved.
Instruction Scope
SKILL.md instructs the agent may read/write ./ .env to manage GITLAB_URL but also insists NEVER to expose GITLAB_TOKEN. That is contradictory: reading .env will expose the token to the agent unless the agent explicitly avoids reading the token field. The instructions also force all API access through the bundled gitlab-client binary (no curl/wget), which the shipped code enforces. The allowed actions and file references are otherwise within the declared purpose.
Install Mechanism
No installer/downloads or remote installs in the skill bundle. The package is a Node CLI with a single dependency (dotenv) declared in package.json; SKILL.md asks users to run npm install locally. This is proportionate and low-risk compared to remote downloads.
Credentials
The skill requires a GitLab URL and a personal access token (GITLAB_TOKEN) to function, but the registry metadata lists no required env or primary credential. Also, the token is expected to be stored in a plaintext .env file under the skill directory — a sensitive secret stored on disk. The SKILL.md attempts to limit token exposure but simultaneously permits reading/writing the same .env file, creating a real risk of accidental exposure or exfiltration by the agent or other code.
Persistence & Privilege
The skill does not request always:true or any special persistent privileges, and it does not appear to modify other skills or global agent configuration. It behaves like a normal user-invoked CLI skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gitlab-api-client
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gitlab-api-client 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: GitLab REST API v4 client with full project/issue/MR/pipeline management
元数据
Slug gitlab-api-client
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

GitLab API Client 是什么?

Interact with GitLab API for managing projects, issues, merge requests, branches, pipelines, users, groups, and more. Use when the user needs to perform GitL... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 125 次。

如何安装 GitLab API Client?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gitlab-api-client」即可一键安装,无需额外配置。

GitLab API Client 是免费的吗?

是的,GitLab API Client 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

GitLab API Client 支持哪些平台?

GitLab API Client 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 GitLab API Client?

由 JonasGao(@jonasgao)开发并维护,当前版本 v1.0.0。

💬 留言讨论