MCPInstall

gerrit

Submit, amend, and review Gerrit changes using git-review CLI. Use when asked to submit a patchset, download a change, rebase a change request, check CR status, or manage code reviews in Gerrit.

Installs
132
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/odyssey4me/agent-skills --skill gerrit
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads gerrit automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Gerrit Skill

This skill provides Gerrit code review integration using git-review with a Python wrapper for markdown-formatted query output on read/view operations. Action commands (submit, review, abandon) should use git-review or SSH commands directly.

Network access

Gerrit commands require outbound HTTPS to the configured Gerrit REST API. Git fetch/push and git-review require HTTPS or SSH to the configured review and repository hosts. Remote operations require outbound network access. If the agent environment restricts it, obtain access through that environment's approval or network controls before the first remote command, reusing authorization already granted. Local help and file processing do not need network access. Skill instructions do not grant network permission. Report DNS, connection, and timeout failures as network errors; do not reset credentials to resolve them. If approved access also fails, stop and report it. Authentication and permission errors require user action.

Resolving script paths

SKILL_DIR in the examples is the directory containing this loaded SKILL.md. Set it to that absolute path before running commands; do not assume the agent sets this shell variable. Quote the script path if it contains spaces.

Prerequisites

Install git-review: pip install git-review — docs

Authentication

git-review uses SSH for authentication with Gerrit servers.

# Configure Gerrit username (if different from local user)
git config --global gitreview.username yourgerrituser

# Test SSH connection
ssh -p 29418 youruser@review.example.com gerrit version

# Add SSH key to Gerrit
# 1. Generate SSH key if needed: ssh-keygen -t ed25519
# 2. Copy public key: cat ~/.ssh/id_ed25519.pub
# 3. Add to Gerrit: Settings > SSH Keys

Gerrit supports multiple authentication methods:

  • SSH (recommended): Used by git-review for all operations
  • HTTP/HTTPS: For web UI and REST API access (set password in Settings > HTTP Password)

See Gerrit Authentication for details.

Initial Setup

Configure Repository

# One-time setup for a repository
git review -s

# Or manually create .gitreview file in repository root
cat > .gitreview <<EOF
[gerrit]
host=review.example.com
port=29418
project=myproject
defaultbranch=main
EOF

See Installation Guide for details.

Script Usage

The wrapper script (scripts/gerrit.py) uses Gerrit SSH query commands and formats output as markdown. Connection details are read from .gitreview or provided via --host/--port/--username flags. See permissions.md for read/write classification of each command.

# Check Gerrit SSH access
$SKILL_DIR/scripts/gerrit.py check

# Changes
$SKILL_DIR/scripts/gerrit.py changes list
$SKILL_DIR/scripts/gerrit.py changes view 12345
$SKILL_DIR/scripts/gerrit.py changes diff 12345
$SKILL_DIR/scripts/gerrit.py changes diff 12345 --patchset 3
$SKILL_DIR/scripts/gerrit.py changes search "status:open project:myproject"

# Projects
$SKILL_DIR/scripts/gerrit.py projects list

All commands support --limit N for list commands (default 30).

Global connection options: --host, --port (default 29418), --username.

Commands (Direct git-review Usage)

For action commands, use git-review or SSH commands directly:

Submitting Changes

git review                          # Submit current branch for review
git review -t topic-name            # Submit with topic
git review -f                       # Submit and close local branch
git review --reviewers user1,user2  # Add reviewers
git review -n                       # Dry-run (show what would be done)

Full reference: git-review usage

Downloading Changes

git review -d 12345                 # Download change 12345
git review -d 12345,3               # Download patchset 3 of change 12345
git review -x 12345                 # Cherry-pick change (no branch)
git review -m 12345                 # Compare local changes to remote

Downloads create a local branch named review/username/topic.

Updating Changes

# Make changes to downloaded review
git commit --amend
git review                          # Upload new patchset

# Update to latest patchset
git review -d 12345                 # Re-download updates the branch

Advanced Options

git review -R                       # Don't rebase (submit as-is)
git review -D                       # Draft mode (WIP changes)
git review --no-cache               # Skip local cache
git review -v                       # Verbose output
git review --track                  # Track remote branch

Configuration

Per-Repository Settings

File: .gitreview (repository root)

[gerrit]
host=review.example.com
port=29418
project=myproject/subproject
defaultbranch=main
defaultremote=origin

Global Settings

# Set Gerrit username
git config --global gitreview.username myuser

# Set default remote
git config --global gitreview.remote gerrit

# Configure scheme (ssh/http/https)
git config --global gitreview.scheme ssh

Configuration stored in ~/.gitconfig

Examples

Daily Workflow

# Start work on new feature
git checkout -b feature-branch
# ... make changes ...
git commit -m "Add new feature"

# Submit for review
git review -t feature-topic
# Verify submission
$SKILL_DIR/scripts/gerrit.py changes list  # confirm change appears

# Address review comments
# ... make changes ...
git commit --amend
git review
# Verify new patchset uploaded
$SKILL_DIR/scripts/gerrit.py changes view <change-number>

Reviewing Others' Changes

# Download change for review
git review -d 12345
# Verify download
$SKILL_DIR/scripts/gerrit.py changes view 12345

# Test the change
# ... run tests, verify code ...

# Return to main branch
git checkout main
git branch -D review/user/topic

Working with Topics

# Submit with topic
git review -t authentication-refactor
# Verify submission
$SKILL_DIR/scripts/gerrit.py changes list

# All related changes will be grouped under this topic
git commit -m "Part 2: Update tests"
git review -t authentication-refactor

See common-workflows.md for more examples.

Advanced Usage

See advanced-usage.md for SSH commands, JSON output, and multi-server configuration.

Model Guidance

This skill wraps an official CLI. A fast, lightweight model is sufficient.

Troubleshooting

See troubleshooting.md for common issues and fixes.

Official Documentation

FAQ

What does the gerrit skill do?

Submit, amend, and review Gerrit changes using git-review CLI. Use when asked to submit a patchset, download a change, rebase a change request, check CR status, or manage code reviews in Gerrit.

How do I install gerrit?

Run npx skills add https://github.com/odyssey4me/agent-skills --skill gerrit in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/gerrit/ (personal) or .claude/skills/gerrit/ (project).

Which AI agents can use gerrit?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is gerrit safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains gerrit?

It is published by odyssey4me in odyssey4me/agent-skills. It has 132 recorded installs.

More from odyssey4me/agent-skills

View all →

google-calendar

odyssey4me/agent-skills

Create, update, and organize Google Calendar events and schedules. Check availability, book time, and manage calendars. Use when asked to schedule a meeting, set up an appointment, book a call, check gcal, or manage calendar events.

google

odyssey4me/agent-skills

Google Workspace CLI for Gmail, Calendar, Drive, Docs, Sheets, and Slides using gogcli. Use when asked to search email, schedule meetings, manage files, edit documents, update spreadsheets, or create presentations.

gitlab

odyssey4me/agent-skills

Create and manage GitLab issues, merge requests, pipelines, and repositories using the glab CLI. Use when asked to open an MR, review a merge request, check CI/CD pipelines, list issues, or manage code review on GitLab.

google-drive

odyssey4me/agent-skills

Open the skill to read its SKILL.md instructions.

AI & Agents299 installs

gmail

odyssey4me/agent-skills

Send, search, and organize Gmail messages, drafts, and labels. Read full threads and get shareable Google Groups permalinks. Use when asked to compose an email, reply to mail, forward a message, search inbox, manage attachments, organize Gmail, read a thread, or find a Google Groups discussion link.

google-docs

odyssey4me/agent-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing262 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.