pr-fix/SKILL.md
Use when the user wants to action external review feedback or fix CI failures on an open pull request. Single-purpose — does not handle merge conflicts (use merge-main) or open PRs (use pr-open). Trigger phrases - "/pr-fix", "fix the pr", "address review comments", "fix ci".
npx skillsauth add paulund/skills pr-fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Action external review feedback and CI failures on an existing PR. Single-purpose: focuses on the fixes; does not handle merge conflicts (use merge-main) and does not open new PRs (use pr-open).
When invoked with arguments, the first line of the prompt may carry a context envelope as JSON:
{ "pr": 123, "branch": "agent/issue-582-foo" }
When invoked without context, detect the PR from the current branch:
gh pr view --json number,headRefName,state,reviewDecision,statusCheckRollup
If no PR exists for the current branch, stop and report. (Use pr-open to create one.)
gh pr view <pr> --json mergeStateStatus,reviewDecision,statusCheckRollup
gh pr checks <pr> --json name,state,conclusion
Report a one-line summary: review decision, failing-check count, mergeable state.
If mergeStateStatus == DIRTY: stop and tell the caller to invoke merge-main first. This skill does not resolve merge conflicts.
gh api repos/{owner}/{repo}/pulls/<pr>/comments \
--jq '.[] | select(.in_reply_to_id == null) | {id, path, line, body, diff_hunk}'
Each top-level comment is a review thread. Skip threads where the latest reply is from the agent (already actioned).
For every unresolved thread:
gh api repos/{owner}/{repo}/pulls/<pr>/comments \
-f body="Done in <commit-sha-after-step-5>" \
-F in_reply_to=<comment_id>
For threads you decline (genuinely out of scope), reply with a one-line reason and a tracking-issue link if you create one.
Only touch failing checks that the review comments did not already resolve:
gh run list --branch <branch> --status failure --limit 1 --json databaseId
gh run view <run-id> --log-failed
Diagnose the root cause from the logs. Fix the code. Do not skip the failure or comment-out the check.
Group changes by concern. Commit messages should describe the why:
git add <files>
git commit -m "Address review: <one-line summary>"
git push origin HEAD
After push, post the commit SHA into each thread's reply if it wasn't known when you replied.
{ "pr": <N>, "threadsActioned": <count>, "threadsDeclined": <count>, "ciFixed": <bool> }
mergeStateStatus == DIRTY (caller invokes merge-main).merge-main.pr-open.quality-gate's job.development
Use when the user wants to run the project's lint + types + build sequence as a gate before pushing, opening a PR, or merging. Invoked by chained dev skills between phases. Trigger phrases - "/quality-gate", "run the quality gate", "check it builds".
tools
Use when the user wants to verify a PR's feature works at runtime by booting the dev server, exercising the affected UI via Chrome DevTools MCP, and posting a screenshot summary back to the PR. Idempotent — skips if `verified` or `verify-failed` is already on the PR. Trigger phrases - "/pr-verify", "verify this PR", "runtime check the pr".
testing
Use when the user wants a security-focused review pass on a PR with findings actioned as commits on the same branch. Trigger phrases - "/pr-security-review", "security review and fix".
testing
Use when the user wants to open a pull request for an already-pushed branch that implements a specific issue. Idempotent — returns the existing PR if one is already open for the branch. Trigger phrases - "/pr-open", "open the pr", "create pr for this branch".