Get the FREE Ultimate OpenClaw Setup Guide →

gh-address-comments

npx machina-cli add skill tech-leads-club/agent-skills/gh-address-comments --openclaw
Files (1)
SKILL.md
1.4 KB

PR Comment Handler

Guide to find the open PR for the current branch and address its comments with gh CLI.

Prerequisites: Ensure gh is authenticated before running commands. Check authentication status with gh auth status. If not authenticated, instruct the user to run gh auth login to authenticate with GitHub.

1) Inspect comments needing attention

  • Run scripts/fetch_comments.py which will print out all the comments and review threads on the PR

2) Ask the user for clarification

  • Number all the review threads and comments and provide a short summary of what would be required to apply a fix for it
  • Ask the user which numbered comments should be addressed

3) If user chooses comments

  • Apply fixes for the selected comments

Notes:

  • If gh hits auth/rate issues mid-run, prompt the user to re-authenticate with gh auth login, then retry.

Source

git clone https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(development)/gh-address-comments/SKILL.mdView on GitHub

Overview

gh-address-comments helps you address review and issue comments on the open PR for the current branch using the gh CLI. It verifies gh authentication first and prompts you to login if needed, guiding you through selecting which comments to fix. It is not used for creating PRs, CI debugging, or general Git operations.

How This Skill Works

The skill checks authentication with gh auth status and prompts for gh login if necessary. It then runs scripts/fetch_comments.py to list all comments and review threads, numbers them, and asks you which to address. When you select comments, it applies fixes to those threads on the open PR for the current branch.

When to Use It

  • Address PR comments on the open PR for the current branch.
  • Fix review feedback reported in the PR and respond with updates.
  • Respond to PR reviews by addressing specified threads.
  • Handle PR comments by triaging and applying fixes to selected threads.
  • If gh prompts for authentication during the process, re-authenticate with gh auth login and continue.

Quick Start

  1. Step 1: Verify authentication with gh auth status and run gh auth login if not authenticated.
  2. Step 2: Run scripts/fetch_comments.py to list all PR comments and threads for the current branch.
  3. Step 3: Choose which numbered comments to address and apply fixes to those threads.

Best Practices

  • Always verify gh authentication status with gh auth status before starting.
  • Run scripts/fetch_comments.py to get a clear list of all comments and threads.
  • Number threads and comments and provide a concise summary of required fixes.
  • Only address the comments you select; avoid making unrelated changes.
  • If you encounter auth or rate issues, re-authenticate with gh auth login and retry.

Example Use Cases

  • Address PR comments on the current branch by selecting thread #4 and applying the requested fix.
  • Resolve blocking feedback by addressing threads #2 and #5 on the open PR for feature/login.
  • Respond to a reviewer’s request for tests by addressing the related comments and adding tests.
  • Triage and fix multiple comments across threads 1–3 in a single pass.
  • If an auth prompt appears mid-run, re-auth with gh auth login and continue addressing comments.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers