About resolve-pr-conflicts
resolve-pr-conflicts is a skill for updating an open pull request’s branch against its current base. It guides conflict resolution, verification, and authorized pushes while protecting concurrent changes.
Key features
- 01Inspect PR state and branch refs
- 02Fetch head and base revisions
- 03Resolve conflicts with intent preserved
- 04Run relevant checks before pushing
- 05Recheck PR after update
Use cases
- 01Bring a PR branch up to date with its base
- 02Resolve conflicts while preserving both changes
- 03Verify an update before pushing to a PR
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ jssblck/ agents --skill resolve-pr-conflictsAfter installing, type/resolve-pr-conflictsin Claude Code to confirm it loaded.
Bundled filesreferences/conflicts.md
Details
From the project READMEResolve PR conflicts
Update the PR's own branch against its current base. This skill does not authorize merging the PR or retargeting it to another base.
Inspect and update
gh pr view <n> -R <owner/repo> --json state,headRefName,headRefOid,baseRefName,mergeable,isCrossRepository,maintainerCanModify
- Confirm the PR is open and record its head SHA and base branch.
- Work in a temporary worktree, preserving existing local edits.
- Fetch the PR head and base from their actual repositories; record the base tip.
- Confirm fork permissions and the destination remote before updating the PR branch.
- Merge or rebase onto the fetched base according to the repository's guidance.
Get explicit approval before rewriting a branch you do not own, unless already
authorized in the session. Disclose every rewrite. Use an explicit
--force-with-lease=<branch>:<recorded-head-sha> for an authorized rewrite.
If another contributor moved the PR head, stop and reconcile with its owner.
Never push to the base branch.
Resolve and verify
Read the conflict guidance before resolving hunks. Preserve both changes' intent and check for semantic conflicts even when Git merges cleanly. Ask when the resolution requires a product decision.
- Resolve the conflicts and complete the merge or rebase.
- Run the repository's relevant build, format, lint, and tests on the combined tree.
- Recheck the remote head and base before pushing.
- If the base moved, recheck for conflicts and apply the repository's freshness requirements. Preserve concurrent head changes and verify any changed result.
- Push the verified update to the PR branch within the user's authorized scope.
- Re-read the PR head and mergeability after the push.
- Remove the temporary worktree after preserving the completed work.
Report the resolved conflicts, any rewrite, checks run, and remaining blockers. Return to the calling workflow for CI watching or an authorized merge.