fix-prlisted
Install: claude install-skill sgomez/developer-skills
# Fix PR
Reads review comments, implements fixes, pushes, replies to threads.
**Contract doc.** Change mechanics come from the repo's
`docs/agents/code-host.md` — read it first if present. The commands below
are the **GitHub factory defaults** (`gh`), used verbatim when that doc is
absent or confirms GitHub; when it defines a different mechanic for an
operation (checkout, read feedback, reply, publish commits), the doc wins.
"PR" below means whatever the code host calls a reviewable change.
## Invoke
```
/fix-pr # fixes current branch PR
/fix-pr 42 # fixes PR #42
```
## Flow
### 1. Identify and check out the PR
Get the change metadata — GitHub default:
```bash
gh pr view <PR> --json number,title,headRefName,state
```
Refuse if PR is closed or merged.
If the current branch is not the PR branch (the /developer pipeline runs this
in a fresh worktree), first confirm **where you are**:
```bash
git rev-parse --path-format=absolute --git-dir --git-common-dir # two different paths = linked worktree
```
`--path-format=absolute` is not optional: without it git prints whichever form
is shortest from your cwd, so from a subdirectory of the primary checkout the
two answers differ (`/abs/path/.git` vs `../.git`) and the check reads a
primary checkout as a worktree.
As a /developer worker you must be in a linked worktree; if both paths are
equal you are in the user's primary checkout — do not check anything out,
end with `RESULT blocked reason=escaped worktree`.