fix-pr-conflict

fix-pr-conflict is a skill for Claude Code, Codex from paultyng/skill-issue. It costs 44 tokens per session (1,136 once invoked), scanned A, original, MIT.

A workflow for resolving merge conflicts in a GitHub pull request by rebasing its changes onto the target branch. A pull request is a proposed code change that has not yet been merged.

In plain words
What is it for?
Use it to inspect a pull request, rebase its branch, find conflicting files, resolve conflicts, and update the pull request.
Why use it?
It helps when GitHub reports that a pull request cannot be merged because both branches changed the same code. It guides the conflict-resolution process so the request can become mergeable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to inspect a pull request, rebase its branch, find conflicting files, resolve conflicts, and update the pull request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/paultyng/skill-issue/fix-pr-conflict
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add paultyng/skill-issue --skill fix-pr-conflict
Clone the repo
git clone --depth 1 https://github.com/paultyng/skill-issue

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fix-pr-conflict

README.md
[![agentmods](https://agentmods.dev/badge/skills/paultyng/skill-issue/fix-pr-conflict.svg)](https://agentmods.dev/skills/paultyng/skill-issue/fix-pr-conflict)
Your own site
<a href="https://agentmods.dev/skills/paultyng/skill-issue/fix-pr-conflict"><img src="https://agentmods.dev/badge/skills/paultyng/skill-issue/fix-pr-conflict.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,136 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01136
Opus 5 $0.00022 $0.00568
Sonnet 5 $0.00009 $0.00227
Haiku 4.5 $0.00004 $0.00114

Measured 8d ago against content hash 867e67abdd69, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

fix-pr-conflict scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/fix-pr-conflict/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fix PR Conflict

Resolve merge conflicts on a pull request so it becomes mergeable.

1. Identify the PR

Determine the PR number using these sources, in order of priority:

  1. Explicit number from the user's request.
  2. A PR created earlier in this conversation (check chat history for gh pr create output or PR URLs).
  3. The current branch via gh pr view.
# Try the current branch first
gh pr view --json number,headRefName,baseRefName,mergeable,mergeStateStatus 2>/dev/null

# Or by explicit number
gh pr view <number> --json headRefName,baseRefName,mergeable,mergeStateStatus

If the PR is already mergeable, report that and stop.

2. Prepare

git fetch origin <baseRefName> <headRefName>
git checkout <headRefName>

Verify the working tree is clean before proceeding.

3. Rebase onto Base Branch

git rebase origin/<baseRefName>

If the rebase completes with no conflicts, skip to step 5.

4. Resolve Conflicts

When the rebase stops on a conflict:

  1. List conflicting files: git diff --name-only --diff-filter=U
  2. Check for generated files first: if a conflicting file is code-generated (look for // Code generated ... DO NOT EDIT. headers, or paths matching known generator outputs like *.pb.go, *_gen.go, sqlc/openapi output dirs), do not attempt to merge the conflict markers. Instead:
    • Accept either side to unblock the rebase (e.g. git checkout --theirs <file> or git checkout --ours <file>), git add <file>, and continue.
    • After the rebase completes, regenerate the file from its source (buf generate, go generate, sqlc generate, etc.) and amend or add a follow-up commit with the regenerated output.
  3. For each remaining conflicting file, understand both sides:
    • Read the file to see the conflict markers.
    • Check what the base branch changed: git log --oneline origin/<baseRefName> -- <file> and read the relevant commits.
    • Check what the PR branch changed: review the current commit being applied (git log --oneline -1 REBASE_HEAD).
    • For >5 conflicting files, fan out the per-file analysis to Explore subagents (model: sonnet, per subagent-model-routing — semantic intent matters; classification requires understanding both sides' design) per parallelize-subagents and delegate-investigation. Each subagent reads one file's conflict markers + the relevant base/PR commits, returns a classification (mechanical / semantic / ambiguous) plus a resolution proposal in ≤80 words, prefixed with Status: ... per subagent-prompt-contract. Main agent applies resolutions sequentially via Edit (Explore is read-only; it analyzes, you apply).
  4. Classify the conflict:
    • Mechanical: both sides changed nearby lines but the intent is independent (e.g. adjacent import additions, unrelated function changes). Resolve by keeping both changes with correct formatting.
    • Semantic: both sides changed the same logic or API in incompatible ways. Attempt to resolve if the correct outcome is clear from context.
    • Ambiguous: the conflict involves a design decision, requirement tradeoff, or unclear intent. Stop, abort the rebase (git rebase --abort), and escalate to the user with a description of the conflict and what options exist.
  5. After resolving each file: git add <file>
  6. Continue the rebase: git rebase --continue
  7. Repeat until the rebase completes or an ambiguous conflict requires escalation.

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 96 lines · 44 tokens per session scan A 867e67abdd69

Subscribe to this mod's changes

fix-pr-conflict is a skill published in the GitHub repository paultyng/skill-issue (9 stars, last pushed 28d ago), licensed MIT. It adds 44 tokens to every session and 1,136 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.