pr-threads-resolve — Claude Code skill: bulk resolve PR review threads
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.
npx skills add posit-dev/skills --skill pr-threads-resolve -a claude-codeWhat pr-threads-resolve does
The skill drives the gh-pr-review extension for the GitHub CLI. It first checks whether the extension is installed and installs it if not. Then it reads the PR number for the current branch and the repo slug, and substitutes those literal values into every later call.
Next it lists the unresolved threads with file, line and comment text, and asks which ones to resolve. You can confirm all of them or pick a subset. Resolved threads get a summary at the end.
For the bulk path there is a ready pipeline: list threads with --unresolved, pull the PRRT_... ids out with jq, and pipe each one into gh pr-review threads resolve. Every subcommand needs both --pr <number> and --repo <owner/repo> — drop either and the call fails. That is why the skill tells you to look up the PR context once at the start and reuse the numbers and slugs.
What it helps with
- clear every review thread on the current branch's PR
- drop the unresolved status after the edits are in
- resolve a chosen subset and leave contested threads open
- see which reviewer comments are still hanging on the PR
- feed the thread list through
jqandxargs
Example prompts for the agent
- resolve all unresolved review threads on this branch's PR
- list the unresolved threads and ask me which to resolve
- resolve only the threads in
src/api.ts
How to install pr-threads-resolve
1Skills CLI (Vercel)
npx skills add posit-dev/skills --skill pr-threads-resolve -a claude-code2Manually: put the files in place
~/.claude/skills/pr-threads-resolve/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/pr-threads-resolve/
1Skills CLI (Vercel)
npx skills add posit-dev/skills --skill pr-threads-resolve -a codex2Manually: put the files in place
.agents/skills/pr-threads-resolve/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add posit-dev/skills --skill pr-threads-resolve -a cursor2Manually: put the files in place
.cursor/skills/pr-threads-resolve/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install posit-dev/skills pr-threads-resolve2Manually: put the files in place
.github/skills/pr-threads-resolve/SKILL.md1Skills CLI (Vercel)
npx skills add posit-dev/skills --skill pr-threads-resolve -a gemini-cli2Platform CLI
gemini skills install https://github.com/posit-dev/skills --path github/pr-threads-resolveManually: put the files in place
.devin/skills/pr-threads-resolve/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add posit-dev/skills --skill pr-threads-resolve -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about pr-threads-resolve
How do I install pr-threads-resolve in Claude?
Run npx skills add posit-dev/skills --skill pr-threads-resolve -a claude-code. The skill lands at ~/.claude/skills/pr-threads-resolve/SKILL.md.
What does pr-threads-resolve do?
It bulk resolves unresolved review threads on the current branch's PR. Typically you run it after addressing the comments by hand or with /pr-threads-address.
What does the skill need to run?
The GitHub CLI plus the gh-pr-review extension. The skill checks for the extension and installs it with gh extension install agynio/gh-pr-review when it is missing.
Source text
SKILL.md · MIT
---
name: pr-threads-resolve
description: Bulk resolve unresolved PR review threads on the current branch’s PR — typically after threads have been addressed manually or via /pr-threads-address
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 first
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 (list, resolve, view, reply).
## Workflow
1. Fetch and display all unresolved PR review threads
2. Show thread details (file, line, comment text)
3. Ask for confirmation or allow selective resolution
4. Resolve the confirmed threads
5. Report back with a summary of resolved threads
## CLI Reference
### List Review Threads
```bash
gh pr-review threads list --pr <number> --repo <owner/repo>
```
Filter with `--unresolved` or `--resolved`.
### Resolve / Unresolve Threads
```bash
gh pr-review threads resolve --thread-id <PRRT_...> --pr <number> --repo <owner/repo>
gh pr-review threads unresolve --thread-id <PRRT_...> --pr <number> --repo <owner/repo>
```
### Bulk Resolve Example
Substitute the actual PR number and repo slug resolved in "Resolve PR context first" — the `42` / `owner/repo` below are placeholders.
```bash
gh pr-review threads list --pr 42 --unresolved --repo owner/repo | \
jq -r '.threads[].id' | \
xargs -I {} gh pr-review threads resolve --thread-id {} --pr 42 --repo owner/repo
```
© Barret Schloerke (@schloerke) · MIT · posit-dev/skills