plugins/github/skills/fix-pr/SKILL.md
Gets an existing GitHub pull request ready to merge when the user gives only a PR number. Checks out the PR, inspects mergeability, resolves or reports conflicts, syncs with the base branch, runs appropriate local validation, watches CI until green, handles draft/review/conversation blockers, pushes fixes when needed, and reports the exact remaining merge blockers. Use when the user asks to get a PR ready to merge, prepare a PR for merge, make PR
npx skillsauth add lucasilverentand/skills fix-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.
Use this when the user gives a PR number and wants the PR ready to merge. Assume the current repository is the target repo unless the PR lookup fails.
Do not merge the PR unless the user explicitly asks for that. The job is to make the PR merge-ready and report the exact state.
Expected input: a PR number, for example 123 or PR #123.
If the user gives only a number:
owner/repo from origin.gh pr view <number> and continue.Ask for more information only when the current directory does not identify a GitHub repo or the PR number does not exist there.
Before touching the branch:
git status --short
If there are local changes, do not overwrite them. If they are unrelated and the repo supports worktrees, create or use a clean worktree. Otherwise stop and ask how to handle them.
Fetch the latest remote state:
git fetch --all --prune
Read the PR:
gh pr view <number> --json number,title,url,state,isDraft,baseRefName,headRefName,headRepositoryOwner,author,mergeable,mergeStateStatus,reviewDecision,reviewRequests,statusCheckRollup,latestReviews,commits
Stop immediately if the PR is closed or merged. Report that there is nothing to prepare.
Work through this checklist in order. Keep going until the PR is merge-ready or a blocker needs the user's judgment.
gh pr checkout <number>
After checkout, confirm:
git branch --show-current
git status --short
If checkout lands in a detached state, create a local branch matching the PR head name.
If isDraft is true:
Fetch the base branch:
git fetch origin <baseRefName>
Determine whether the PR branch is behind:
git log --oneline HEAD..origin/<baseRefName>
If the branch is behind, update it using the repo's established pattern:
AGENTS.md, CONTRIBUTING.md, or existing branch history.After resolving conflicts:
git status --short
Commit conflict resolutions with a signed, co-authored commit if the repo requires signed commits.
Refresh the PR state:
gh pr view <number> --json mergeable,mergeStateStatus
Interpret blockers:
mergeable: CONFLICTING or mergeStateStatus: DIRTY means conflicts remain.mergeStateStatus: BEHIND means the branch still needs base updates if the repo requires up-to-date branches.mergeStateStatus: BLOCKED usually means reviews, conversations, or required checks are blocking merge.UNKNOWN can be transient; wait briefly and query again before treating it as a blocker.Inspect the repo and run the checks that fit the project before relying on CI:
bun run, npm run, pnpm run, yarn runcargo test, go test ./..., pytest, ruff, swift test, xcodebuild test, etc.AGENTS.md, CONTRIBUTING.md, README.md, task runners, or CI workflow files.If a check fails:
If a check cannot run because of missing secrets, unavailable services, or machine-specific tooling, report it clearly and rely on CI for that part.
If you changed the branch:
git push
If you rebased and the push is rejected, use:
git push --force-with-lease
Never force-push a branch owned by someone else without checking the PR author/head repository and being explicit about the risk.
Watch required checks first:
gh pr checks <number> --required --watch --fail-fast
Then inspect all checks:
gh pr checks <number>
If checks fail, use the monitoring-ci skill's diagnose-fix-watch loop:
For flaky infrastructure failures, rerun only failed jobs once. If the same check fails again, treat it as real.
Check review state:
gh pr view <number> --json reviewDecision,latestReviews,reviewRequests
Review readiness:
APPROVED is ready from a review standpoint.CHANGES_REQUESTED is a blocker; read the requested changes and fix what is clear.REVIEW_REQUIRED is a remaining blocker unless the repo allows self-merge without approval.Check unresolved review threads when GraphQL access is available:
gh api graphql -f query='
query($owner:String!, $repo:String!, $number:Int!) {
repository(owner:$owner, name:$repo) {
pullRequest(number:$number) {
reviewThreads(first:100) {
nodes { isResolved path line }
}
}
}
}' -F owner=<owner> -F repo=<repo> -F number=<number>
Unresolved threads are blockers unless they are clearly informational and the repo does not require conversation resolution. Do not resolve conversations just to make the checklist pass; resolve only when the underlying issue has actually been addressed.
Query the final PR state:
gh pr view <number> --json url,isDraft,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup
gh pr checks <number>
The PR is merge-ready only when:
Report the result plainly:
If everything is ready, say that the PR is ready to merge. Do not say you merged it unless you actually did.
development
Cross-platform Apple Human Interface Guidelines: color, typography, layout, materials, motion, accessibility, SF Symbols, branding, plus shared UI elements (activity views, rating indicators, web views, …) and meta sections (components, patterns, technologies). Use when the design topic is platform-agnostic. User says: "iOS color tokens", "SF Symbols", "Apple typography", "dark mode guidance".
development
Guides a full system design from idea to spec — sequences requirements gathering, architecture decomposition, data modeling, API design, and document writing into a coherent workflow with clear handoffs. Use when the user asks to "design a system", "build X from scratch", "architect something end-to-end", "plan a new service", or has a broad design ask that spans multiple concerns. Also use when the user says things like "I need to build X" without specifying which aspect to start with. This is the entry point for any design task that isn't clearly scoped to a single skill (data model only, API only, etc.).
development
Synthesizes build-ready design systems and DESIGN.md files from chat briefs, screenshots, moodboards, videos, URLs, live pages, or local image folders while preserving the target product identity. Use when the user asks to "make a design system from these screenshots", "turn this moodboard into DESIGN.md", "extract the design language from this video", "define the UX vibe and rules from these references", or create cohesive UI rules from visual inspiration.
development
Reviews and critiques an existing or proposed system design — flags single points of failure, missing non-functional requirements, scaling bottlenecks, security gaps, operational blind spots, unjustified tech choices, and places where the design will fall over under load or failure. Produces a structured review with severity-tagged findings, not just vibes. Use when the user asks for a second opinion on an architecture, requests a design review, wants feedback on a proposed system, pastes a design doc, or says things like "review this design", "what's wrong with X", "poke holes in this", or "is this a good architecture".