← 返回 Skills 市场
craftslab

gerritaction

作者 Jia · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
214
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install gerritaction
功能描述
Query Gerrit accounts, changes, groups, or projects and perform actions like adding reviewers, approving, submitting, or deleting changes via the Gerrit API.
使用说明 (SKILL.md)

Gerrit Action Skill

Use the gerritaction worker to query Gerrit resources and apply actions to matching changes through the Gerrit API.

When to use

Use this skill when the user wants to:

  • query Gerrit accounts
  • query Gerrit changes
  • query Gerrit groups
  • query Gerrit projects
  • add or delete reviewers on matching changes
  • add or remove attention set members on matching changes
  • approve, submit, or delete matching changes

Worker configuration

The worker is configured by skill/config.yml:

apiVersion: v1
kind: worker
metadata:
	name: gerritaction
spec:
	gerrit:
		host: http://127.0.0.1/
		port: 8080
		user: user
		pass: pass

Required fields:

  • apiVersion: v1
  • kind: worker
  • metadata.name: gerritaction
  • spec.gerrit.host: Gerrit base URL including scheme
  • spec.gerrit.port: Gerrit port
  • spec.gerrit.user: Gerrit username
  • spec.gerrit.pass: Gerrit password

Invocation rules

  • Install the package with pip install gerritaction before running commands.
  • Invoke the CLI as gerritaction instead of python action.py.
  • Always provide --config-file with a .yml or .yaml file.
  • Provide exactly one query selector: --account-query, --change-query, --group-query, or --project-query.
  • Only use --change-action together with --change-query in the same invocation.
  • Use --output-file only for a new .json file path. The command rejects an existing file.
  • If --output-file is omitted, query results are printed to standard output as JSON.

Supported queries

Account query

Use --account-query to search accounts.

Example:

pip install gerritaction
gerritaction --config-file="skill/config.yml" --account-query="name:john email:example.com"

Change query

Use --change-query to search changes.

Example:

pip install gerritaction
gerritaction --config-file="skill/config.yml" --change-query="status:open since:2024-01-01 until:2024-01-02"

Group query

Use --group-query to search groups.

Example:

pip install gerritaction
gerritaction --config-file="skill/config.yml" --group-query="name:admin member:john"

Project query

Use --project-query to search projects. Project results are enriched with project config, branches, and tags.

Example:

pip install gerritaction
gerritaction --config-file="skill/config.yml" --project-query="name:test state:active"

Supported change actions

The worker supports these change actions:

  • add-reviewer:account-id[,account-id...]
  • delete-reviewer:account-id[,account-id...]
  • add-attention:account-id[,account-id...]
  • remove-attention:account-id[,account-id...]
  • approve-change:Label=Value[,Label=Value...]
  • delete-change
  • submit-change

Multiple actions can be chained in one --change-action value, separated by spaces.

Example:

pip install gerritaction
gerritaction \
	--config-file="skill/config.yml" \
	--change-query="status:open project:test" \
	--change-action="add-reviewer:1001,1002 approve-change:Code-Review=+2"

Output handling

  • Use --output-file when the caller needs a persistent JSON artifact.
  • Account, change, group, and project queries return JSON.
  • Change actions operate on the changes returned by --change-query.

Example:

pip install gerritaction
gerritaction \
	--config-file="skill/config.yml" \
	--project-query="name:test state:active" \
	--output-file="/tmp/projects.json"

Safety guidance

  • Prefer a query-only run before destructive or state-changing actions.
  • Before delete-change or submit-change, make sure the change query is narrow and explicit.
  • If the user request is ambiguous, ask for the exact Gerrit query or target account IDs before generating the final command.

Recommended behavior for the agent

  • Generate commands that match the repository CLI exactly.
  • Keep queries and actions explicit rather than inferred.
  • When performing change actions, include both --change-query and --change-action in the same command.
  • When the user asks for structured output, add --output-file with a new .json path.
  • Surface invalid combinations early, especially a --change-action without --change-query.
安全使用建议
Before installing or using this skill: 1) Verify the origin and integrity of the Python package `gerritaction` (PyPI page, source repository, maintainer identity and recent activity). 2) Prefer not to store plaintext credentials in a repo-tracked config.yml; use a secure vault or environment variables and confirm how the CLI accepts secrets. 3) Run any actions in query-only mode first and test in a non-production Gerrit instance. 4) Consider installing and running the CLI in an isolated environment (virtualenv or container) so you can inspect the installed package files. 5) The registry metadata should declare required credentials — treat the omission as a red flag and ask the publisher for clarification or a trustworthy source before proceeding.
功能分析
Type: OpenClaw Skill Name: gerritaction Version: 0.1.0 The skill bundle provides a comprehensive interface for managing Gerrit code review resources, including accounts, changes, groups, and projects. It includes robust safety guidance in SKILL.md, such as recommending query-only runs before destructive actions and requiring explicit user confirmation for ambiguous requests. While it instructs the agent to install an external package ('gerritaction') and execute CLI commands, these actions are directly aligned with the stated purpose of the skill and no malicious intent or obfuscation was found.
能力评估
Purpose & Capability
Name/description (Gerrit queries and change actions) align with the SKILL.md: it describes queries and actions against a Gerrit API and requires a config file with Gerrit host, user, and password.
Instruction Scope
SKILL.md is specific about commands, required config fields, and when to use query-only runs vs destructive actions; it does not instruct reading unrelated files or exfiltrating data to external endpoints.
Install Mechanism
No install spec in the registry (instruction-only), but the SKILL.md repeatedly requires running `pip install gerritaction`. Installing an unvetted PyPI package is moderate risk because package provenance and contents are unknown — the skill does not provide a trusted source or checksum.
Credentials
The skill needs Gerrit credentials (user/pass in the provided config.yml) but the registry metadata declares no required credentials or primaryEnv. This mismatch (credentials required by runtime but not declared) is an incoherence that could hide risks (cleartext credentials in config.yml, unclear credential storage expectations).
Persistence & Privilege
always is false, skill is instruction-only and does not request elevated or persistent system privileges or modify other skills' configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gerritaction
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gerritaction 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of Gerrit Action Skill. - Query Gerrit accounts, changes, groups, and projects via CLI with flexible selectors. - Perform actions on change queries: add/remove reviewers or attention, approve, delete, or submit changes. - Outputs results as JSON to file or standard output. - Strict invocation: only one query selector per command; actions require a change query. - Built-in safety guidelines to prevent accidental destructive actions.
元数据
Slug gerritaction
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

gerritaction 是什么?

Query Gerrit accounts, changes, groups, or projects and perform actions like adding reviewers, approving, submitting, or deleting changes via the Gerrit API. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 214 次。

如何安装 gerritaction?

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

gerritaction 是免费的吗?

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

gerritaction 支持哪些平台?

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

谁开发了 gerritaction?

由 Jia(@craftslab)开发并维护,当前版本 v0.1.0。

💬 留言讨论