Address github comments skill

Use when you need to address review or issue comments on an open GitHub Pull Request using the gh CLI.

by davila7·MIT license·★ 32,299 Stars on the repo·GitHub ↗

Use now

Files of Address github comments

davila7/main1 file shown
SKILL.md
Show the full text56 lines

Address GitHub Comments

Overview

Efficiently address PR review comments or issue feedback using the GitHub CLI (gh). This skill ensures all feedback is addressed systematically.

Prerequisites

Ensure gh is authenticated.

gh auth status

If not logged in, run gh auth login.

Workflow

1. Inspect Comments

Fetch the comments for the current branch's PR.

gh pr view --comments

Or use a custom script if available to list threads.

2. Categorize and Plan
  • List the comments and review threads.
  • Propose a fix for each.
  • Wait for user confirmation on which comments to address first if there are many.
3. Apply Fixes

Apply the code changes for the selected comments.

4. Respond to Comments

Once fixed, respond to the threads as resolved.

gh pr comment <PR_NUMBER> --body "Addressed in latest commit."

Common Mistakes

  • Applying fixes without understanding context: Always read the surrounding code of a comment.
  • Not verifying auth: Check gh auth status before starting.
1---
2name: address-github-comments
3description: Use when you need to address review or issue comments on an open GitHub Pull Request using the gh CLI.
4---
5 
6# Address GitHub Comments
7 
8## Overview
9 
10Efficiently address PR review comments or issue feedback using the GitHub CLI (`gh`). This skill ensures all feedback is addressed systematically.
11 
12## Prerequisites
13 
14Ensure `gh` is authenticated.
15 
16```bash
17gh auth status
18```
19 
20If not logged in, run `gh auth login`.
21 
22## Workflow
23 
24### 1. Inspect Comments
25 
26Fetch the comments for the current branch's PR.
27 
28```bash
29gh pr view --comments
30```
31 
32Or use a custom script if available to list threads.
33 
34### 2. Categorize and Plan
35 
36- List the comments and review threads.
37- Propose a fix for each.
38- **Wait for user confirmation** on which comments to address first if there are many.
39 
40### 3. Apply Fixes
41 
42Apply the code changes for the selected comments.
43 
44### 4. Respond to Comments
45 
46Once fixed, respond to the threads as resolved.
47 
48```bash
49gh pr comment <PR_NUMBER> --body "Addressed in latest commit."
50```
51 
52## Common Mistakes
53 
54- **Applying fixes without understanding context**: Always read the surrounding code of a comment.
55- **Not verifying auth**: Check `gh auth status` before starting.
56 

Discussion