| name | pr-autofix |
| description | Auto-fix a PR — address ALL reviewers' open feedback + failing CI, push, and reply in each addressed thread with honest attribution |
| argument-hint | [pr-number] (defaults to the current branch's PR) |
PR auto-fix
Address ALL the open review feedback on a PR, from automated and human reviewers alike, plus any failing CI. Then commit, push, and reply in each thread you addressed. This is the methodology behind Open Session's os-auto-fix label loop; it also runs standalone from a session.
You are expected to fix everything actionable, not just blockers — P2 and P3 findings included. Only leave a finding unfixed when you have a clear reason, and record that reason (see the disposition lines at the end).
This skill is headless-safe: never use AskUserQuestion or any interactive tool.
Setup
If $ARGUMENTS contains a PR number, use it; otherwise use the current branch's PR. Resolve the repo with gh repo view --json owner,name (below, <repo> is that owner/name).
gh pr view <pr> --json number,title,headRefName,state,url
If the PR isn't OPEN, stop and say so.
Gather the work
The caller may have already listed the open review feedback and failing CI checks in its prompt — treat that as current and don't re-derive it. Otherwise gather it yourself:
- Inline review comments:
gh api repos/<repo>/pulls/<pr>/comments — skip outdated ones (no current line).
- Review summaries: (every reviewer, not just bots).