From grt
This skill should be used when the user asks to "list gerrit changes", "download a patchset", "read review comments", "push to gerrit", "address review feedback", "summarize review comments", or mentions Gerrit code review, Change-Id, patchsets, or review workflows. It operates via the grt CLI tool.
How this skill is triggered — by the user, by Claude, or both
Slash command
/grt:grtThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before using any grt command:
Before using any grt command:
.gitreview exists in the repo root. If missing, tell the user to create one or run grt setup.grt is in PATH by running which grt. If missing, instruct the user to install it (see docs/user/installation.md).grt setup to fix.grt review -l # Brief: change number, branch, subject
grt review -ll # Verbose: adds topic column
grt review -l <branch> # Filter by target branch
grt review -l --format json # JSON array of ChangeInfo objects
For programmatic use, prefer --format json — it outputs a JSON array of full ChangeInfo objects with number, branch, subject, topic, status, owner, etc.
grt comments # Auto-detect change from HEAD's Change-Id
grt comments <CHANGE> # Specific change number
grt comments --format json # Structured JSON for programmatic use
grt comments --format text # Human-readable (default)
grt comments --unresolved # Only unresolved threads
grt comments --all-revisions # Comments from all patchsets
grt comments --include-robot-comments # Include CI/automated comments
For programmatic parsing, always use --format json. See references/comment-json-schema.md for the output schema.
Use cross-change search mode to aggregate comments across multiple changes in a project. When --project or --age is provided without a specific change, grt queries all matching changes and returns aggregated results.
grt comments --project openstack/nova --age 30d --comment-by [email protected] --has-replies --format json
This returns a JSON object with a "changes" array, one entry per change. Additional filters:
--comment-by <PATTERN> — retain only threads where a commenter's name, email, or username matches the pattern--has-replies — retain only threads that received at least one reply--label <NAME=VALUE> — retain only threads by commenters who voted a specific label value (e.g., Code-Review=-1)--after/--before — narrow to a date range (YYYY-MM-DD)grt review -d <CHANGE> # Download latest patchset
grt review -d <CHANGE>,<PS> # Download specific patchset
grt review -d <CHANGE> --format json # JSON output with branch, patchset, upstream
Creates a branch named review/<owner>/<topic> or review/<change>/<patchset>.
With --format json, outputs a DownloadResult object: { "branch", "change_number", "patchset", "upstream" }.
Safety: Always check git status --porcelain before downloading. If there are uncommitted changes, warn the user and ask whether to stash or abort.
grt review -x <CHANGE> # Standard cherry-pick
grt review -X <CHANGE> # Cherry-pick with "(cherry picked from ...)" indication
grt review -N <CHANGE> # Apply to working directory only, no commit
All three accept <CHANGE>,<PS> to target a specific patchset.
grt review -m <CHANGE>,<PS_FROM>-<PS_TO> # Diff two patchsets
grt review -m <CHANGE>,<PS_FROM> # Diff PS_FROM against current revision
Always dry-run first, then ask for user confirmation before the actual push.
# Step 1: Preview
grt review --dry-run [branch]
# Step 2: Show dry-run output to user, ask for confirmation
# Step 3: Actual push (only after explicit user approval)
grt review --yes [branch]
# Step 4 (optional): Structured output
grt review --yes --format json [branch]
With --format json, push outputs a PushResult object: { "commits", "remote", "branch", "change_id", "refspec" }.
Common push options:
grt review -t <topic> # Set topic
grt review --reviewers alice bob # Add reviewers
grt review --cc alice # Add CC
grt review --wip # Mark work-in-progress
grt review --ready # Mark ready for review
grt review -f # Post-push cleanup (checkout default, delete branch)
When the user asks to "address review feedback", "fix review comments", or similar, follow the 6-phase feedback loop protocol. This is a structured workflow for fetching review comments, planning fixes, implementing them, and pushing an updated patchset.
Summary of phases:
| Phase | Action | Checkpoint? |
|---|---|---|
| 1. Fetch | grt comments --format json --unresolved | |
| 2. Summarize | Present comments grouped by file, classify each | |
| 3. Plan | Read source, propose fixes, get user approval | YES |
| 4. Implement | Edit code, run tests | |
| 5. Push | git commit --amend, dry-run, user confirms push | YES |
| 6. Verify | grt comments --format json to confirm new patchset |
Phases 3 and 5 are mandatory checkpoints — never skip user approval at these points.
See references/feedback-loop-protocol.md for the detailed protocol.
git log -1 --format=%B | grep 'Change-Id:'git branch --show-current (or parse the JSON output from --format json)https://<host>/c/<project>/+/<number> -- host from .gitreview, project from git config--format json for list, download, and push commands to get structured output instead of parsing textWhen asked to "address all open feedback" or work across multiple changes:
grt review -l --format json to list open changes--dry-run first, show the output, and wait for explicit user approval.credentials.toml, .netrc, or any file containing passwords or tokens.git status --porcelain and warn about uncommitted changes.git commit --amend, confirm the HEAD commit has a Change-Id: trailer.reset --hard, clean -f, push --force, or checkout . without explicit user request.| Exit Code | Meaning | Recovery |
|---|---|---|
| 0 | Success | — |
| 1 | Generic error (auth failed, not found, server error) | Check credentials and change number |
| 2 | Hook-related error | Run grt setup --force-hook |
| 3 | Malformed input (bad argument format) | Check argument syntax (e.g., CHANGE,PS format) |
| 40 | Network/connectivity error | Check network, VPN, Gerrit server status |
| 128 | Git config error (no Gerrit host configured) | Run grt setup to configure the repository |
For the full flag reference with mutual exclusivity rules and all options, see references/grt-commands.md.
npx claudepluginhub seanmooney/grt --plugin grtFetches Qodo PR review issues, applies fixes interactively or in batch, and replies to inline comments. Supports GitHub, GitLab, Bitbucket, Azure DevOps, and Gerrit.
Interactively responds to PR review feedback: fetches comments, verifies findings, asks for user approval, makes changes, and posts replies. Use when addressing GitHub pull request reviews.
Walks through code review comments one at a time, triaging each with the user before making any code changes. Supports review.jsonl, GitHub PRs, documents, and conversation input.