Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
74bb5e8
docs(agents): formalize triage label group and add git-conventions doc
claude Sep 13, 2026
cfff410
docs(agents): tighten pointers and close a setup gap
claude Sep 13, 2026
2f94330
feat(skills): add setup-chiptus-env, chaining setup-matt-pocock-skills
claude Sep 13, 2026
60c80e5
refactor(agents): collapse agent:wip/agent:pr into agent label + status
claude Sep 13, 2026
5f7bba8
docs: drop stale PR-side-label reference, note GitHub/Linear status p…
claude Sep 13, 2026
6fc7239
docs(agents): fix false cap-count claim and --state/--status mismatch
claude Sep 13, 2026
c087158
feat(skills): auto-install matt-pocock skills, external domain-docs
claude Sep 13, 2026
e395773
feat(skills): relocate the whole docs/agents/ folder, not just domain…
claude Sep 13, 2026
a66e999
feat(skills): default external docs pointer to an env var, not .git/ …
claude Sep 13, 2026
f0c398f
refactor(skills): move external-docs resolution off CLAUDE.md onto co…
claude Sep 13, 2026
c198261
refactor(skills): merge the two tracker templates into one
claude Sep 13, 2026
c5b9f7d
refactor(skills): split autonomic-issues.md into a skeleton + tracker…
claude Sep 13, 2026
10416c2
fix(skills): stop splitting a numbered list across the slot boundary
claude Sep 13, 2026
1f81515
refactor(skills): collapse to one file, tracker specifics in one smal…
claude Sep 13, 2026
dbe6d2a
fix(skills): row/column terminology mismatch in Tracker specifics note
claude Sep 13, 2026
50c0626
fix(skills): GitHub column drops agent:wip/agent:pr for one agent label
claude Sep 13, 2026
3331857
fix(skills): move GitHub-PR-parity note to the GitHub column
claude Sep 13, 2026
4239bc3
fix(skills): pr-review-fixer falls back to MCP GitHub tools when gh i…
claude Sep 13, 2026
3dc1777
docs(skills): document GitHub's lack of a native triage-role label group
claude Sep 13, 2026
02e2acf
fix(skills): row-count mention was stale after adding a fifth row
claude Sep 13, 2026
ec60bd9
docs(skills): suggest a triage/ label prefix for GitHub to echo Linea…
claude Sep 13, 2026
3b64f37
refactor(skills): writing-for-agents pass on setup-chiptus-env
claude Sep 13, 2026
0306a89
docs: add handoff for a discussion pass on setup-chiptus-env's design
claude Sep 13, 2026
fa4a42d
chore: move setup-chiptus-env skill to its own PR
claude Sep 13, 2026
9d380cf
fix(skills): the gh-availability check in pr-review-fixer never ran
claude Sep 14, 2026
cbca638
refactor(skills): disclose pr-review-fixer's gh-missing fallback to i…
claude Sep 14, 2026
7700e05
chore: split off the settled repo-docs changes
claude Sep 16, 2026
d91603f
fix(skills): gh-missing.md can't actually derive owner/repo via git
claude Sep 16, 2026
36a6b3a
fix(skills): drop duplicated closing sentence from gh-missing.md
claude Sep 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions .agents/skills/pr-review-fixer/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
PR comments", "address review feedback", "fix review comments", "what comments are
on this PR", "respond to code review", or similar. Trigger even if they just say
"let's fix the PR comments" or "what did reviewers say".
allowed-tools: Bash(${CLAUDE_SKILL_DIR}/scripts/fetch-review-threads.sh) Bash(${CLAUDE_SKILL_DIR}/scripts/resolve-thread.sh *) Bash(gh pr comment *)
allowed-tools: Bash(${CLAUDE_SKILL_DIR}/scripts/fetch-review-threads.sh) Bash(${CLAUDE_SKILL_DIR}/scripts/resolve-thread.sh *) Bash(gh pr comment *) Bash(command -v gh) mcp__github__pull_request_read mcp__github__resolve_review_thread mcp__github__add_reply_to_pull_request_comment mcp__github__add_issue_comment
---

# PR Review Comment Fixer
Expand All @@ -17,10 +17,26 @@ whatever the user approves.

## Phase 1: Fetch threads

Run !`${CLAUDE_SKILL_DIR}/scripts/fetch-review-threads.sh`. It resolves the current PR, fetches review
threads, review bodies, and issue comments, and filters out resolved threads and
empty bodies with `jq` before any of it reaches you: you only ever see live,
unresolved feedback. Output is `{threads, reviews, issueComments}`.
Using the Bash tool yourself — not the auto-exec markdown form (an exclamation
mark immediately before a backtick-fenced command), which runs unconditionally
before you get a turn and is exactly what broke the branch below — check once
whether `gh` is on `PATH`: `command -v gh`. Some session types
(e.g. a remote/cloud session) have no `gh` CLI and rely on the `mcp__github__*`
tools instead. Don't discover this by running the fetch script and reacting to its
failure — check first, with this command, and pick the right path.

**`gh` available:** run `${CLAUDE_SKILL_DIR}/scripts/fetch-review-threads.sh` via
the Bash tool. It resolves the current PR, fetches review threads, review bodies,
and issue comments, and filters out resolved threads and empty bodies with `jq`
before any of it reaches you: you only ever see live, unresolved feedback. Output
is `{threads, reviews, issueComments}`.

**`gh` missing:** read [`gh-missing.md`](./gh-missing.md)'s "Phase 1" section and
follow it instead — it reconstructs the same `{threads, reviews, issueComments}`
shape via `mcp__github__pull_request_read`.

Either way, everything from Phase 2 on reads `{threads, reviews, issueComments}`
the same way regardless of which path produced it.

If all three arrays are empty, tell the user and stop.

Expand Down Expand Up @@ -96,17 +112,20 @@ Parse the user's free-text reply to determine which comments to fix. Be flexible
For each selected comment:

- If `small` or `medium`: implement the fix now. After editing, confirm with a brief
"Fixed #N: [what changed]" note. Then resolve the thread:
"Fixed #N: [what changed]" note. Then resolve the thread — `gh` available:
```bash
${CLAUDE_SKILL_DIR}/scripts/resolve-thread.sh <thread-id>
```
`gh` missing: [`gh-missing.md`](./gh-missing.md)'s "Phase 4" section.
(Only resolve inline threads; top-level review bodies and issue comments don't have
a thread ID to resolve.)
- If `large`: don't attempt it now. Say: "Comment N is too large for this session:
suggest tackling it in a dedicated follow-up." Do not resolve the thread.
- If the comment is a **question**: no code change needed. Explain the answer
(optionally as a reply via `gh pr comment --body ...` if the user wants
to post it, but don't do this unless asked). Resolve the thread after answering.
(optionally posted as a reply, if the user wants it posted, but don't do this unless
asked — `gh` available: `gh pr comment --body ...`; `gh` missing:
[`gh-missing.md`](./gh-missing.md)'s "Phase 4" section). Resolve the thread after
answering.

After all fixes are applied, give a short summary of what was changed and what was
deferred.
Expand Down
33 changes: 33 additions & 0 deletions .agents/skills/pr-review-fixer/gh-missing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Fallback: gh is missing

Reached from `SKILL.md` only when Phase 1's `command -v gh` check comes back
empty (e.g. a remote/cloud session with no `gh` CLI, relying on the
`mcp__github__*` tools instead). Skip this file entirely when `gh` is available.

## Phase 1: fetch threads

Reconstruct the same `{threads, reviews, issueComments}` shape from
`mcp__github__pull_request_read`. This skill's `allowed-tools` grants no git
command, so don't try to derive owner/repo/PR number by shelling out — use
what you already know about the repo from this session's own context (its
scope, working directory, or what the user told you), and ask the user for
the PR number if it's genuinely ambiguous:

- `method: get_review_comments` → review threads. Each has `id` (the GraphQL
thread node ID — this is what `resolve_review_thread` below needs, keep it),
`is_resolved`, `path`, `line`, and `comments[]` with `author`/`body`. Keep
only `is_resolved == false` — the tool doesn't filter this for you the way
the script's `jq` does.
Comment on lines +16 to +20
- `method: get_reviews` → review bodies; keep only non-empty `body`.
- `method: get_comments` → top-level PR/issue comments (the script's
`issueComments`).

## Phase 4: resolve and reply

- Resolve a thread with `mcp__github__resolve_review_thread`, passing the
thread's GraphQL `id` (kept from `get_review_comments` above).
- A reply, if the user wants one posted:
- Inline thread reply: `mcp__github__add_reply_to_pull_request_comment`
with the numeric comment ID from the thread's comment `html_url` (the
`#discussion_r<id>` suffix — not the thread's GraphQL `id`).
- Top-level PR comment: `mcp__github__add_issue_comment`.
Loading