Skip to content
Agentmart
Submit a tool

address-pr-comments

Address every unresolved review comment on a GitHub pull request — locate the PR (current branch, PR URL, PR number, or issue number with linked PR), fetch…

Skill by Acauhi99

IndexedMIT★ 1
Write a review

Chalk Labs

Need help deploying address-pr-comments?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/acauhi99-address-pr-comments

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Address every unresolved review comment on a GitHub pull request — locate the PR (current branch, PR URL, PR number, or issue number with linked PR), fetch both inline review comments and PR-level issue comments, then for each thread ground the fix in the branch's commits and diff, edit the code, make ONE commit per comment, reply to the thread, and resolve it. Trigger phrases — "address PR comments", "address review comments", "fix review feedback", "respond to PR review", "/address-pr-comments", "address the comments on PR

Use cases: writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/address-pr-comments

What's inside

Skill name
address-pr-comments
Description
Address every unresolved review comment on a GitHub pull request — locate the PR (current branch, PR URL, PR number, or issue number with linked PR), fetch both inline review comments and PR-level issue comments, then for each thread ground the fix in the branch's commits and diff, edit the code, make ONE commit per comment, reply to the thread, and resolve it. Trigger phrases — "address PR comments", "address review comments", "fix review feedback", "respond to PR review", "/address-pr-comments", "address the comments on PR
License
MIT
Compatibility
opencode
Metadata
source: Adapted from AgentSystemLabs/core (MIT) · requires_codegraph: true
Instructions
219 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

> **Tool mapping (OpenCode):** This skill uses:
> - `question` tool for user prompts (not `AskUserQuestion`)
> - `task` tool for subagents (not `Agent` or `Task` subagent syntax)
> - `skill({ name: "..." })` to load other skills (not `Skill(skill="...", args="...")`)
> - `codegraph_explore`, `codegraph_search`, `codegraph_context` for codebase exploration (preferred)
> - `todowrite` for phase/progress tracking
> - `grep`, `glob`, `read`, `bash` as fallback when `.codegraph/` not initialized
>
> **Context rule:** This skill supersedes any prior skill instructions. Follow ONLY these instructions now. Read the user's goal and any mode/include/skip from the conversation context.

> **User-question protocol:** Whenever this skill needs the user to pick between options, confirm an action, or answer a multiple-choice prompt, you MUST call the `question` tool to render a proper interactive picker. Do NOT print numbered options as plain text and wait for the user to type a number — that produces a degraded UX. Free-form questions (open-ended typing) may be asked in prose, but any time you would write "1) … 2) … 3) …", use `question` instead.


# Address PR Comments

Resolve every reviewer thread on a PR with a per-comment commit, a reply, and a resolved thread. Reviewer ends with zero unresolved threads and a clear audit trail.

---

## Phase 1 — Locate the PR

Use `todowrite` to mark this phase as in_progress.

Determine the target PR from the user's argument or current branch:

```bash
# explicit number/URL provided
gh pr view <number-or-url> --json number,headRefName,baseRefName,url,state,isDraft

# current branch
gh pr view --json number,headRefName,baseRefName,url,state,isDraft

# issue number provided — find linked PR
gh issue view <number> --json closedByPullRequestsReferences
```

**Exit conditions:**
- PR found and `state=OPEN` → continue.
- No PR for current branch → ask the user for a PR number/URL; do not guess.
- PR is `MERGED` or `CLOSED` → stop and ask the user to confirm.

Checkout the PR branch if not already on it: `gh pr checkout <number>`.

---

## Phase 2 — Fetch ALL comments

Use `todowrite` to mark this phase as in_progress.

Two distinct APIs. Run both — missing one means missing comments.

```bash
PR=<number>
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)  # e.g. owner/repo
OWNER=${REPO%/*}
NAME=${REPO#*/}

# Inline (review) comments — anchored to a file/line
gh api "repos/$REPO/pulls/$PR/comments" --paginate \
  --jq '.[] | {id, user: .user.login, path, line, body, in_reply_to_id, commit_id, created_at, html_url}'

# PR-level issue comments (top-level conversation, not anchored)
gh api "repos/$REPO/issues/$PR/comments" --paginate \
  --jq '.[] | {id, user: .user.login, body, created_at, html_url}'

# Review threads with resolved state (GraphQL — needed to skip already-resolved)
gh api graphql -f query='
  query($owner:String!,$repo:String!,$pr:Int!){
    repository(owner:$owner,name:$repo){
      pullRequest(number:$pr){
        reviewThreads(first:100){
          nodes{ id isResolved isOutdated comments(first:50){ nodes{ id databaseId body path line author{login} } } }
        }
      }
    }
  }' -f owner=$OWNER -f repo=$NAME -F pr=$PR
```

**Build a worklist** of threads where `isResolved=false`. Skip resolved threads. Note `isOutdated=true` threads — the anchor line may have moved; verify before acting.

**Pagination caps**: `reviewThreads(first:100)` truncates at 100 threads, and `comments(first:50)` truncates at 50 per thread. For larger PRs, also request `pageInfo{hasNextPage endCursor}` and re-query with `after:$cursor` until `hasNextPage=false`. If the first page already returns `hasNextPage=true`, you have not seen all threads — do NOT proceed to Phase 3 with a partial worklist.

---

## Phase 3 — Per-thread loop (fan out to subagents)

Use `todowrite` to mark this phase as in_progress.

For each unresolved thread, in order from oldest to newest, **dispatch a resolver subagent** (via `task({ subagent_type: "general", description: "Resolve PR comment thread", prompt: "..." })`) — one subagent invocation per thread, sequentially. Each subagent isolates the read-edit-commit-reply-resolve work in a fresh context, so the parent's window stays clean as you work through 10+ threads.

**Pass to the subagent** (per invocation):

```
PR_NUMBER: <number>
REPO: <owner/repo>
BASE_REF: <base branch name>

THREAD:
  threadNodeId: <GraphQL node id from Phase 2>
  isOutdated: <bool>
  rootCommentId: <REST id of the first comment — for in_reply_to>
  rootCommentDatabaseId: <database id>
  path: <file path or null>
  line: <line number or null>
  author: <github login>
  body: <comment markdown>
  isInline: <true for file-anchored, false for PR-level>
```

**The subagent's contract:**
- Read the file at `path:line` (with the branch-local diff context).
- Classify the comment: `change_request` | `question` | `nit` | `stale` | (sub-decision) `declined`.
- If applicable: edit code, commit (one commit per thread), reply via the right gh API surface, resolve the thread (unless declined).
- Return a structured JSON result.

**Why fan out?** Each thread is a self-contained unit (one comment, one diff slice, one fix, one reply). Reading file context for each one accumulates in the parent's window if done inline; isolating per-thread keeps the parent at a constant context size regardless of PR size.

**Why sequential, not parallel?** All threads commit to the same branch. Parallel commits race on `git index.lock` and blow up the one-commit-per-comment audit trail.

From Acauhi99/opencode-agent-system, MIT.

More from Acauhi99/opencode-agent-system

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
May 24, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Acauhi99

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get address-pr-comments running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying address-pr-comments?

CallGet help
Cite this page

address-pr-comments skill. Agent Mart. https://agentmart.dev/skills/acauhi99-address-pr-comments (last updated 2026-10-24)