OpenParable
Skip to content
← Back to skills

Read Gerrit Cl

Apps & Automation
read_gerrit_cl

Read Gerrit Cl is an Agent Skill for apps & automation published in the dart-lang/sdk repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Fetch and display the full patch/diff or comments for a Gerrit CL.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/dart-lang/sdk/blob/HEAD/.agents/skills/read_gerrit_cl/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/read-gerrit-cl, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Instructions

Use this skill to inspect a Gerrit Change List (CL). This is useful for reviewing code changes, understanding the scope of a modification, checking comments.

Requirements

The following command-line tools are required:

  • curl: For making HTTP requests.
  • jq: For parsing JSON (needed for comments).
  • base64: For decoding patch content (needed for patches).

Scripts

1. Read Patch

Run the read_patch.sh script to fetch the unified diff of a CL.

Usage

./scripts/read_patch.sh <change_number> [patchset]

Arguments

  1. change_number: The numeric ID of the Gerrit change (e.g., 12345).
  2. patchset (optional): The patchset number or current (default).

Example

To fetch the patch for CL 12345 (latest revision):

./scripts/read_patch.sh 12345

To fetch a specific revision (e.g. patchset 2):

./scripts/read_patch.sh 12345 2

The output will be the unified diff format of the patch.

2. Read Comments

Run the read_comments.sh script to fetch the comments on a CL.

Usage

./scripts/read_comments.sh <change_number>

Arguments

  1. change_number: The numeric ID of the Gerrit change (e.g., 12345).

Example

To fetch comments for CL 12345:

./scripts/read_comments.sh 12345

The output will be a JSON object containing the comments.