Skip to main content
NEW · APP STORE Now on iOS · macOS · iPad Android & Windows soon GET IT
Prompts GitHub PR Comment Resolver

agent coding skill risk: medium

GitHub PR Comment Resolver

Guides the use of the GitHub CLI to fetch, categorize, fix, and respond to review comments on a pull request.

  • External action: high

SKILL 1 file

SKILL.md
---
name: address-github-comments
description: "Use when you need to address review or issue comments on an open GitHub Pull Request using the gh CLI."
---
# 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.

```bash
gh auth status
```

If not logged in, run `gh auth login`.

## Workflow

### 1. Inspect Comments

Fetch the comments for the current branch's PR.

```bash
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.

```bash
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.

## When to Use
This skill is applicable to execute the workflow or actions described in the overview.

## Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

REQUIRED CONTEXT

  • open GitHub Pull Request
  • gh CLI authentication

TOOLS REQUIRED

  • gh

ROLES & RULES

  1. Ensure gh is authenticated.
  2. Wait for user confirmation on which comments to address first if there are many.
  3. Always read the surrounding code of a comment.
  4. Check gh auth status before starting.
  5. Use this skill only when the task clearly matches the scope described above.
  6. Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  7. Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

EXPECTED OUTPUT

Format
plain_text
Constraints
  • follow the described workflow steps
  • wait for user confirmation when many comments

FAILURE MODES

  • Applying fixes without understanding context
  • Not verifying auth

CAVEATS

Dependencies
  • Requires gh CLI authenticated
Missing context
  • How the AI should output categorized comments or proposed fixes.
  • Whether the workflow is intended for direct execution or as guidance for an agent.
Ambiguities
  • Does not specify the format or medium for proposing fixes or obtaining user confirmation.
  • 'gh pr comment' example uses an undefined <PR_NUMBER> placeholder.

QUALITY

OVERALL
0.70
CLARITY
0.75
SPECIFICITY
0.60
REUSABILITY
0.80
COMPLETENESS
0.65

IMPROVEMENT SUGGESTIONS

  • Add explicit output format instructions for listing and categorizing comments.
  • Replace the placeholder <PR_NUMBER> with a step that first retrieves the actual PR number.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR AGENT