address-pr-comments
End-to-end closeout of unresolved review feedback across one or more GitHub PRs.
Skill by lexfrei
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/lexfrei-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.
About
Reviews
Write a reviewNo 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 and code. 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
- End-to-end closeout of unresolved review feedback across one or more GitHub PRs. For each PR checks out the branch, fetches every source of blocking feedback (inline threads, CHANGES_REQUESTED review-submission bodies, issue comments, plus reviewDecision), verifies against current code, fixes legitimate findings (one signed-off commit + push per finding), asks approval on reply drafts, posts replies (inline reply for threads, top-level @mention for review bodies), then moves to the next PR. Returns to the original branch at the end.
- License
- BSD-3-Clause
- Instructions
- 292 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
**CRITICAL**: This skill makes PUBLIC changes — commits pushed to the PR branch and replies visible to the PR author, reviewers, and all watchers. Every commit must follow project conventions (signed off, GPG-signed where configured, conventional message). Every reply must be accurate, justified, and in English.
## Arguments
Parse `$ARGUMENTS` as a space-separated list of PR refs.
- Each ref: bare number (e.g. `2395`, uses the repo from `gh repo view --json owner,name`) OR `owner/repo#N` (e.g. `cozystack/cozystack#2395`).
- If no args: fall back to detection from the current branch via `gh pr view --json number,headRepositoryOwner,headRepository --jq '.headRepositoryOwner.login + "/" + .headRepository.name + "#" + (.number|tostring)'` — single-PR mode.
- If no args and no PR can be inferred: report the error and stop.
Normalize each ref into `OWNER`, `REPO`, `PR_NUMBER`.
## Step 0: Record the starting state
Before touching any PR branch:
```bash
ORIGINAL_REF=$(git symbolic-ref --quiet --short HEAD || git rev-parse HEAD)
if [ -z "$(git status --porcelain)" ]; then CLEAN_START=1; else CLEAN_START=0; fi
```
- `ORIGINAL_REF` is the branch to return to at the end.
- `CLEAN_START == 1` means the working tree was clean — safe to restore later.
- If the working tree is dirty, ask the user how to handle it (abort, stash, or proceed without final restore) BEFORE doing any `git checkout`.
## Step 1: Outer loop over PR refs
For each PR ref in the parsed list, execute Steps 2–10 in order. Between PRs, print a visible separator (e.g. `────── PR #N ──────`) so progress is easy to follow.
On a per-PR unrecoverable error (PR not found, branch push rejected and user chose not to force, etc.): print the error, skip the remaining steps for that PR, continue with the next ref. Do not abort the whole run.
## Step 2: Check out the PR branch
```bash
PR_BRANCH=$(gh pr view $PR_NUMBER --repo $OWNER/$REPO --json headRefName --jq .headRefName)
git fetch origin "$PR_BRANCH"
git checkout "$PR_BRANCH"
git log --oneline -5
```
**Worktree guard**: if `git checkout` fails with `fatal: '<branch>' is already used by worktree at <path>`, parse the path, `cd` into that worktree, and run the rest of the PR's steps there. Do not delete or force anything.
## Step 3: Read project agent docs
Scan the repo for agent-facing contribution rules and follow them exactly. Common locations:
- `AGENTS.md`, `docs/agents/contributing.md`, `docs/agents/*.md`
- `CONTRIBUTING.md` (look for "review comments" / "AI bot" / "commit format" sections)
Project rules OVERRIDE this skill's defaults — e.g. commit message format, reply etiquette, threads to ignore, whether a separate commit per thread is required.
## Step 4: Fetch every source of actionable feedback
Three GitHub objects can carry blocking feedback on a PR. The skill must read all three:
1. **Inline review threads** (`reviewThreads`) — comments attached to a file/line, repliable via `addPullRequestReviewThreadReply`.
2. **Review submission bodies** (`reviews[].body`) — the freeform text a reviewer types when they click *Approve / Request changes / Comment*. They have **no** `threadId` and are **not** part of `reviewThreads`. A `CHANGES_REQUESTED` review with only a body and zero inline comments is the most-common cause of a PR being blocked without any thread to reply to. Missing this source = silently ignoring the reviewer.
3. **Issue comments** — the general PR conversation (bot summaries, follow-ups).
Also pull `reviewDecision` so the skill knows when the PR is blocked but no findings remain after filtering — that almost always means a finding was missed.
```bash
SELF_LOGIN=$(gh api user --jq .login)
gh api graphql -F owner="$OWNER" -F repo="$REPO" -F pr=$PR_NUMBER -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewDecision
reviewThreads(first: 100) {
pageInfo { hasNextPage endCursor }
nodes {
id
isResolved
isOutdated
comments(first: 100) {
pageInfo { hasNextPage }
nodes {
id
path
line
originalLine
author { login }
bodyText
url
createdAt
}
}
latestComment: comments(last: 1) {
nodes {
author { login }
createdAt
}
}
}
}
reviews(first: 100, states: [CHANGES_REQUESTED, COMMENTED]) {
pageInfo { hasNextPage endCursor }
nodes {
id
state
body
author { login }
submittedAt
url
commit { oid }
comments(first: 1) { totalCount }
}
}
}
}
}'
```
Filter:
- **Threads** — keep where `isResolved == false`.
- **Threads (self-reply guard)** — additionally drop any thread where `latestComment.nodes[0].author.login == $SELF_LOGIN`. This prevents duplicate replies on re-runs against PRs with reviewers that do not auto-resolve threads after a fix lands (e.g. Gemini Code Assist). Empty `latestComment.nodes` is treated as "not me" and the thread is kept. To genuinely re-engage a previously-replied thread, the operator posts the reply manually outside the skill flow.
- **Review submissions** — keep where `state == "CHANGES_REQUESTED"` (always, even with empty body — surface as ASK so the user explains the block). For `state == "COMMENTED"`, keep only if `body != ""` AND `comments.totalCount == 0` (a COMMENTED review with inline comments is already covered by the threads query; its body is usually a meta-summary).From lexfrei/ccc, BSD-3-Clause.
More from lexfrei/ccc
- 0.637score
pore-analysis
lexfrei
Measure porosity, pore size/shape, lattice period and ordering (psi6, Voronoi coordination, radial g(r) and orientational correlation length) from a top-view…
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
taguchi
lexfrei
Plan a minimal set of debugging or testing runs with a Taguchi orthogonal array instead of changing one factor at a time.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
infostyle
lexfrei
Edit Russian prose into информационный стиль (Ilyahov/Sarycheva): strip meaningless words, unfold abstractions into facts and examples, rebuild sentences…
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
pairwise
lexfrei
Generate a minimal pairwise covering array for factors with arbitrary mixed level counts, using the bundled deterministic generator.
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
shrink
lexfrei
Find the guilty few among many boolean suspects with group testing (split-half, delta debugging) instead of toggling one thing at a time.
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
docker-prune
lexfrei
Reclaim Docker disk by pruning unused images, containers, networks, build cache, optionally volumes, and the build cache of non-default buildx builders; on…
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
brew-cleanup
lexfrei
Reclaim Homebrew disk by removing old formula/cask versions, pruning the download cache, and uninstalling orphaned dependencies (brew autoremove).
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
worktree-sweep
lexfrei
Find and remove stale git worktrees across one or many repositories.
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
lore
lexfrei
Read, search, and monitor Linux kernel mailing-list threads on lore.kernel.org.
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
stale-forks
lexfrei
Find personal forks that no longer carry value — their unique commits are already merged upstream, or they hold no unique commits at all — and remove the…
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
go-cache
lexfrei
Reclaim Go disk by clearing the build, test, fuzz, and module caches.
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
cleanup-all
lexfrei
Run the full local cleanup pipeline — stale git worktrees, dead personal forks, Docker prune, Go caches, and Homebrew — in one pass, each stage report →…
SkillAFreshness: A★ 11Claude Code +9
Signals
- Stars
- 11
- Forks
- 3
- Open issues
- 2
- Last commit (this folder)
- May 10, 2026 (5 months ago)
- Last release
- Oct 4, 2026 (24 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- BSD-3-Clause
- Repository
- github.com/lexfrei/ccc
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from lexfrei
- 0.637score
infostyle
lexfrei
Edit Russian prose into информационный стиль (Ilyahov/Sarycheva): strip meaningless words, unfold abstractions into facts and examples, rebuild sentences…
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
pore-analysis
lexfrei
Measure porosity, pore size/shape, lattice period and ordering (psi6, Voronoi coordination, radial g(r) and orientational correlation length) from a top-view…
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
pairwise
lexfrei
Generate a minimal pairwise covering array for factors with arbitrary mixed level counts, using the bundled deterministic generator.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
taguchi
lexfrei
Plan a minimal set of debugging or testing runs with a Taguchi orthogonal array instead of changing one factor at a time.
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
docker-prune
lexfrei
Reclaim Docker disk by pruning unused images, containers, networks, build cache, optionally volumes, and the build cache of non-default buildx builders; on…
SkillAFreshness: A★ 11Claude Code +9 - 0.632score
cleanup-all
lexfrei
Run the full local cleanup pipeline — stale git worktrees, dead personal forks, Docker prune, Go caches, and Homebrew — in one pass, each stage report →…
SkillAFreshness: A★ 11Claude Code +9
Cite this page
address-pr-comments skill. Agent Mart. https://agentmart.dev/skills/lexfrei-address-pr-comments (last updated 2026-10-24)