# Gh Pr Address Comments

> Review and address GitHub PR comments for the current branch. Use when asked to fetch PR review comments (via gh CLI/API), summarize actionable items, apply code changes, and optionally reply/resolve comments. Targets PRs from the current branch against main. Use when this capability is needed.

- Skill: `tomevault-io/gh-pr-address-comments` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/gh-pr-address-comments`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/gh-pr-address-comments/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/gh-pr-address-comments

---


# Gh Pr Address Comments

## Overview
Fetch PR review comments for the current branch, decide which are actionable, implement fixes, and push updates. Optionally reply/resolve review threads in the PR UI.

## Workflow

1) **Identify the PR for the current branch**
- Ensure you are on a feature branch, not `main`.
- Use `gh pr list --head <branch>` to find the PR number.

2) **Fetch review comments (authoritative)**
- Use GitHub API via `gh api` to fetch inline comments and review summaries.
- Prioritize actionable inline comments over summary text.

3) **Triage comments**
- Mark each comment as: address now / defer / no-op.
- If unclear, ask the user before changing behavior.

4) **Implement fixes**
- Apply code changes for actionable items.
- Run minimal checks if relevant (or explain if not).

5) **Commit + push**
- Commit with a clear message and push to the same branch.

6) **Reply/resolve (optional)**
- If requested, add replies and resolve threads in the PR UI (use browser-tools if needed).

---

## Commands

### A) Find PR for current branch
```bash
branch=$(git rev-parse --abbrev-ref HEAD)
pr_number=$(gh pr list --head "$branch" --json number -q '.[0].number')
```

### B) Fetch review comments + reviews
```bash
gh api repos/<ORG>/<REPO>/pulls/<PR>/comments

gh api repos/<ORG>/<REPO>/pulls/<PR>/reviews
```

### C) Summarize actionable items
- Focus on inline comments with file + line context.
- Ignore summary-only comments unless they add new issues.

---

## Notes
- Prefer `gh api .../pulls/<PR>/comments` for inline thread data.
- The PR UI can hide threads if they’re outdated; API data is authoritative.
- If a suggestion is non-critical (perf refactors, optional UX polish), ask before changing behavior.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/harley) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

