en un clic
oh-conflict
Resolve merge conflicts on a PR by merging base into head
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Resolve merge conflicts on a PR by merging base into head
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Do the work. Pre-flight, build, detect drift, salvage if needed. Use when you have a clear aim and are ready to implement.
Resolve multi-dependency fan-in by merging dependency PRs into a common base and updating issue dependencies
Review and merge open PRs for GitHub issues as a cohesive batch
Claim a GitHub issue, create its branch and draft PR before implementation, execute the work in isolation, and hand the completed draft to RNA's full ship gate.
Check work and detect drift before committing. A second opinion that catches misalignment early. Use at natural pause points, before PRs, or when something feels off.
Agent-led PR/working-tree review triage. Start from the diff, add RNA graph/business context only where it changes review decisions, and state when raw git diff is enough.
| name | oh-conflict |
| description | Resolve merge conflicts on a PR by merging base into head |
Resolve merge conflicts on a pull request. Work in an isolated worktree, merge the base branch into the PR head, resolve conflicts with understanding of both sides' intent, verify, and push.
/oh-conflict <pr-number>
<pr-number> - the pull request number with merge conflictsissue/<number>)Load project background from AGENTS.md, relevant .oh/ artifacts, and RNA MCP context when available.
Get PR branch info:
# Save original directory for cleanup
ORIGINAL_DIR=$(pwd)
# Get head and base branch names
PR_INFO=$(gh pr view <pr-number> --json headRefName,baseRefName)
BRANCH=$(echo "$PR_INFO" | jq -r .headRefName)
BASE=$(echo "$PR_INFO" | jq -r .baseRefName)
Create worktree and set up:
git fetch origin
git worktree add .worktrees/conflict-<pr-number> -B $BRANCH origin/$BRANCH
cd .worktrees/conflict-<pr-number>
Understand the PR's intent before merging:
# Read the linked issue to understand what this PR is trying to do
PARENT_ISSUE=${BRANCH#issue/}
gh issue view $PARENT_ISSUE
# See the PR's own changes (what this branch introduced)
git log --oneline origin/$BASE..$BRANCH
git diff origin/$BASE...$BRANCH --stat
Attempt the merge:
git merge origin/$BASE --no-edit
This will fail with conflict markers in affected files.
Resolve conflicts file by file:
For each conflicted file, read both sides:
git diff --name-only --diff-filter=U # List conflicted files
Understand the intent of BOTH sides:
Resolve by preserving the intent of both sides
If the PR's changes are superseded by base, accept theirs
If both sides changed the same logic, merge the intents
Stage each resolved file: git add <file>
After all conflicts resolved, verify:
# Ensure Git has no unresolved paths and no tracked file has conflict markers
test -z "$(git diff --name-only --diff-filter=U)"
if git grep -n -e '^<<<<<<< ' -e '^=======$' -e '^>>>>>>> '; then exit 1; else echo "No conflict markers"; fi
# Run project checks
# For TypeScript projects:
pnpm typecheck
pnpm test
# For Rust projects:
cargo check
cargo test
Adapt commands to the project's build system. Capture every result and do not commit or push while a required check fails.
If verification fails (e.g., type errors from merged code):
Run the repo-local /review skill unconditionally on all staged conflict resolutions. Handle findings:
Complete the merge commit:
git commit --no-edit # Uses the auto-generated merge commit message
Push:
git push
Cleanup worktree:
cd $ORIGINAL_DIR
git worktree remove .worktrees/conflict-<pr-number>
Exit and report:
Import additions on both sides: Keep both imports
Adjacent but non-overlapping changes: Accept both
Lockfile conflicts (package-lock.json, pnpm-lock.yaml, Cargo.lock): Accept base version, then regenerate:
# Accept theirs for lockfiles
git checkout --theirs pnpm-lock.yaml
pnpm install
git add pnpm-lock.yaml
If repo-local review finds non-trivial issues during resolution:
PARENT_ISSUE=${BRANCH#issue/}
NEW_ISSUE=$(gh issue create \
--title "Fix: <brief description>" \
--body "Spawned from #${PARENT_ISSUE} during conflict resolution on PR #<pr-number>.
## Context
<what was found>
## Acceptance
- [ ] Fix applied
- [ ] Tests pass" \
--assignee @me | grep -oE '[0-9]+$')
Complete ALL descendant issues before the final push.
CRITICAL: You MUST signal completion when done. Call the signal_completion tool as your FINAL action.
Signal based on outcome:
| Outcome | Call |
|---|---|
| Conflicts resolved, pushed | signal_completion(status: "success", pr: "<pr-url>") |
| Needs human decision | signal_completion(status: "blocked", blocker: "<reason>") |
| Unrecoverable failure | signal_completion(status: "error", error: "<reason>") |
| If you do not signal, the orchestrator will not know you are done and the session becomes orphaned. |
Fallback: If the signal_completion tool is not available, output your completion status as your final message in the format: COMPLETION: status=<status> pr=<url> or COMPLETION: status=<status> error=<reason>.