Skip to main content
skill CX Codex

pr-threads-address — Claude Code skill: what it does, how to install

Finds unresolved PR review threads on the current branch, implements the requested code changes with unit tests, and helps reply and resolve.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add posit-dev/skills --skill pr-threads-address -a claude-code
Open on GitHub

What pr-threads-address does

This skill systematically handles open pull request review feedback on your current branch. It first queries the PR number and repository slug via gh. Then it retrieves all unresolved threads using gh-pr-review. For each comment, the agent reads the requested change, edits the files, and writes unit tests whenever feasible.

All commits follow the conventional commit specification. One commit per thread keeps Git history clean. Once the fixes are done, the skill provides a summary. If you confirm, it posts replies explaining the modifications and resolves the threads via their PRRT_... node IDs.

Prerequisites are strict. You must have the GitHub CLI and the agynio/gh-pr-review extension installed, or the workflow fails immediately. Every gh pr-review command also requires both --pr and --repo flags.

What it helps with

  • Implement requested code changes from open PR review threads
  • Add unit tests to verify review feedback fixes
  • Format commits following the conventional commit specification
  • Post replies to reviewers and resolve completed threads

Example prompts for the agent

  • Address all unresolved review threads on this PR and add unit tests
  • Work through the PR review feedback on the current branch and commit the fixes
  • Review unresolved comments, apply the requested changes, and resolve the threads

How to install pr-threads-address

1Skills CLI (Vercel)

npx skills add posit-dev/skills --skill pr-threads-address -a claude-code

2Manually: put the files in place

~/.claude/skills/pr-threads-address/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pr-threads-address/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about pr-threads-address

How to install pr-threads-address in Claude Code?

Install the skill by running npx skills add posit-dev/skills --skill pr-threads-address -a claude-code.

What does the pr-threads-address skill do?

It iterates through unresolved review comments on your pull request, applies code edits, adds tests, creates conventional commits, and optionally resolves threads with replies.

What tools are required to use this skill?

You need the GitHub CLI gh and the agynio/gh-pr-review extension. You can install the extension with gh extension install agynio/gh-pr-review.

Source text

SKILL.md · MIT
---
name: pr-threads-address
description: "Address PR review feedback by systematically working through every unresolved PR review thread on the current branch's PR - analyze each comment, make the requested code changes (with tests where useful), commit, and optionally reply and resolve."
compatibility: Requires gh CLI and the gh-pr-review extension
metadata:
  author: Barret Schloerke (@schloerke)
  version: "1.0"
license: MIT
---

## Prerequisites

### gh pr-review extension

Before using this command, check if the gh pr-review extension is installed:

```bash
gh extension list | grep -q pr-review || gh extension install agynio/gh-pr-review
```

### Resolve PR context

Every `gh pr-review` subcommand requires both `--pr <number>` and `--repo <owner/repo>` — do not omit either. Look the values up once at the start of the workflow and substitute the literal numbers and slugs into every later command.

Get the PR number for the current branch:

```bash
gh pr view --json number -q .number
```

Get the repository slug:

```bash
gh repo view --json nameWithOwner -q .nameWithOwner
```

Then pass the resulting values directly — e.g. `--pr 42 --repo posit-dev/skills` — on every subsequent `gh pr-review` call in this workflow (review view, comments reply, threads resolve, etc.).

## Workflow

1. Fetch and display all unresolved PR review threads
2. Analyze each thread to understand the requested changes
3. For each thread:
   1. Make the necessary code modifications
   2. (When possible) Add unit tests to verify the change
   3. Commit the changes with descriptive commit messages using conventional commit specification
4. Report back with a summary of addressed threads
5. Ask if the user wants to resolve the threads. If so, reply to each thread indicating what was done and then resolve the thread.

## CLI Reference

### View PR Reviews and Comments

Display all reviews, inline comments, and replies for a pull request:

```bash
gh pr-review review view --pr <number> --repo <owner/repo>
```

**Common filters:**

- `--reviewer <login>` — Filter by specific reviewer
- `--states <list>` — Comma-separated review states (APPROVED, CHANGES_REQUESTED, COMMENTED, DISMISSED)
- `--unresolved` — Show only unresolved threads
- `--tail <n>` — Show only the last n replies per thread
- `--include-comment-node-id` — Include GraphQL node IDs for replies

### Reply to Review Threads

```bash
gh pr-review comments reply --thread-id <PRRT_...> --body "<reply-text>" --repo <owner/repo> --pr <number>
```

For multi-line replies, pass `--body "$(cat <<'EOF' ... EOF\n)"` heredoc syntax.

### Resolve a Thread

```bash
gh pr-review threads resolve --thread-id <PRRT_...> --pr <number> --repo <owner/repo>
```

Thread IDs (format `PRRT_...`) come from `review view --include-comment-node-id`.

© Barret Schloerke (@schloerke) · MIT · posit-dev/skills

Similar skills

All skills for Git and GitHub →

From the same set18

create-release-checklist Generates a release checklist for an R package and creates a corresponding GitHub issue. Useful for package maintainers preparing a new release. CX Codex +1 704installs release-post Writes a release announcement for an R or Python package following Tidyverse or Shiny blog conventions. Useful when NEWS.md exists but the post does not. CX Codex +1 684installs r-cli-app Teaches the agent to turn an R script into a command-line app: argument parsing, help text and subcommands come from the script itself. CX Codex +1 682installs pr-threads-resolve Resolves every unresolved review thread on the current branch's PR in one pass. Handy once the feedback is handled and only the unresolved badges are left. CX Codex +1 668installs alt-text Writes and improves alt text for charts and images in R packages and Quarto documents. Useful when figures on a pkgdown site or in .qmd files have no description. CX Codex +1 587installs ggsql Teaches the agent to write and edit ggsql queries, where a SQL statement and a graphics spec share one syntax. Useful when you want a plot straight from a table or CSV. CX Codex +1 522installs implement Coordinates the rollout of a plan file by splitting work across parallel subagents. It checks git branch status and monitors progress. CX Codex +1 491installs review-testing Goes over the tests you wrote with a feature or bug fix and points out weak assertions, needless mocks and brittle spots. Useful when the suite is green but you don't trust it. CX Codex +1 474installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor