/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.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install gerritaction - After installation, invoke the skill by name or use
/gerritaction - Provide required inputs per the skill's parameter spec and get structured output
What is gerritaction?
Query Gerrit accounts, changes, groups, or projects and perform actions like adding reviewers, approving, submitting, or deleting changes via the Gerrit API. It is an AI Agent Skill for Claude Code / OpenClaw, with 214 downloads so far.
How do I install gerritaction?
Run "/install gerritaction" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is gerritaction free?
Yes, gerritaction is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does gerritaction support?
gerritaction is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created gerritaction?
It is built and maintained by Jia (@craftslab); the current version is v0.1.0.