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.
npx skills add posit-dev/skills --skill pr-threads-address -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/pr-threads-address/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/pr-threads-address/
1Skills CLI (Vercel)
npx skills add posit-dev/skills --skill pr-threads-address -a codex2Manually: put the files in place
.agents/skills/pr-threads-address/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add posit-dev/skills --skill pr-threads-address -a cursor2Manually: put the files in place
.cursor/skills/pr-threads-address/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install posit-dev/skills pr-threads-address2Manually: put the files in place
.github/skills/pr-threads-address/SKILL.md1Skills CLI (Vercel)
npx skills add posit-dev/skills --skill pr-threads-address -a gemini-cli2Platform CLI
gemini skills install https://github.com/posit-dev/skills --path github/pr-threads-addressManually: put the files in place
.devin/skills/pr-threads-address/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add posit-dev/skills --skill pr-threads-address -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-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