/install gerritaction
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:v1kind:workermetadata.name:gerritactionspec.gerrit.host: Gerrit base URL including schemespec.gerrit.port: Gerrit portspec.gerrit.user: Gerrit usernamespec.gerrit.pass: Gerrit password
Invocation rules
- Install the package with
pip install gerritactionbefore running commands. - Invoke the CLI as
gerritactioninstead ofpython action.py. - Always provide
--config-filewith a.ymlor.yamlfile. - Provide exactly one query selector:
--account-query,--change-query,--group-query, or--project-query. - Only use
--change-actiontogether with--change-queryin the same invocation. - Use
--output-fileonly for a new.jsonfile path. The command rejects an existing file. - If
--output-fileis 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-changesubmit-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-filewhen 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-changeorsubmit-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-queryand--change-actionin the same command. - When the user asks for structured output, add
--output-filewith a new.jsonpath. - Surface invalid combinations early, especially a
--change-actionwithout--change-query.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install gerritaction - 安装完成后,直接呼叫该 Skill 的名称或使用
/gerritaction触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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。