dev-pr/SKILL.md
Use when the user wants to action PR review feedback, resolve merge conflicts on a PR branch, fix CI failures on an open pull request, or update an existing PR. Trigger phrases - "/pr", "fix the pr", "address review comments", "resolve ci failures", "update my pr".
npx skillsauth add paulund/skills dev-prInstall 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.
Detect the PR for the current branch, checkout if needed, and resolve merge conflicts, review feedback, or CI failures.
git branch --show-current
gh pr view --json number,title,headRefName,baseRefName,state,mergeStateStatus,reviewDecision
If a PR exists for the current branch and state is OPEN, use it.
If no PR exists for the current branch:
gh pr list --author @me --state open --json number,title,headRefName
Present the list to the user and ask them to pick one. After selection, checkout the branch:
git checkout <headRefName>
If the user is not on a PR branch and has no open PRs, stop cleanly.
Run in parallel:
gh pr view <number> --json mergeStateStatus,reviewDecision
gh pr checks <number> --json name,state,conclusion
gh pr view <number> --json reviews,comments
Report a concise summary:
If mergeStateStatus is DIRTY or BLOCKED due to conflicts:
dev-merge-main skill to merge origin/main into the current branch and resolve conflictsdev-merge-main completes, verify no conflict markers remain with git diff --checkgit push origin <branch>If review comments or change requests exist:
Fetch review threads and suggested changes:
gh api repos/{owner}/{repo}/pulls/{number}/comments --jq '.[] | {id, path, line, body, diff_hunk, in_reply_to_id}'
Present them to the user grouped by file and ask which to action.
For each selected item:
gh api repos/{owner}/{repo}/pulls/{number}/comments -f body="Done" -f in_reply_to=<comment_id>
For items the user chooses not to action, post a polite reply explaining why.
After all selected items are addressed, commit the changes with a clear message (e.g. Address review feedback).
If GitHub Actions checks are failing:
Ask the user: "Run GitHub Actions checks, or run the local quality gate only?"
Option A — GitHub Actions (default)
gh run list --branch <branch> --status failure --limit 1 --json databaseId
gh run view <run-id> --log-failed
Option B — Local quality gate only (bypass GitHub Actions)
Use this when the user has run out of GitHub Actions minutes or wants to defer CI costs.
Run in this order. Each step must pass before moving on.
pnpm lint # or: npx next lint, composer run lint, etc.
pnpm types # tsc --noEmit, or equivalent
pnpm test # or: npm test, composer run test, etc.
pnpm build # or: npx next build, etc.
Adapt the commands to the project's toolchain (detect package.json scripts, composer.json, Makefile, etc.).
On failure — Stop-the-Line:
Max 2 diagnose-fix cycles per issue. If still failing, stop and report the remaining failures to the user.
git push origin <branch>
If commits were squashed or amended and push is rejected, ask the user before force-pushing.
After push, verify the PR state:
gh pr view <number> --json mergeStateStatus,reviewDecision,checks
Report a summary:
dev-merge-main for merge conflicts instead of duplicating merge logicdevelopment
Use when implementing any logic, fixing any bug, or changing any behaviour. Use when you need to prove code works, when a bug report arrives, or when modifying existing functionality. Do NOT use for config changes, data migrations, or dependency updates.
development
Use when starting a new feature, when requirements are unclear, when asked to write code without a clear spec, or before any non-trivial implementation. Do NOT use for trivial bug fixes or one-line changes.
development
Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. Detects the stack from dependency files, fetches official documentation, implements following documented patterns, and cites sources for every framework-specific decision.
development
Use when preparing to ship a feature, release, or deployment. Use before merging to main, creating a release, or deploying to production. Do NOT use for CI-only changes or internal refactors that don't reach production.