本文へ移動
cccskills
無料GitHub で公開

resolve-merge-conflicts

Use when a merge, rebase, cherry-pick, or stash pop stops on conflicts. Not for people-mediation conflicts: use culture-conflict-mediation.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md7.4 KB
  • agents/openai.yaml148 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Resolve merge conflicts

Contract

FieldBound contract
TriggerA merge, rebase, cherry-pick, or stash pop stops on conflicts: git exits with unmerged paths.
AuthorityReversible local: writes only conflicted-file edits, staged resolutions, regenerated lockfiles, and integration continuation (committing a merge, git rebase --continue, git cherry-pick --continue, and git stash drop only after the resolution is committed); runs scoped checks; rollback is git merge --abort, git rebase --abort, git cherry-pick --abort, or git checkout -- <file>. No remote mutation. No push, no tag, no force-push.
Side effectEdits conflicted files, stages resolutions, regenerates lockfiles with package manager tooling, runs scoped checks, completes the in-progress integration.
DoneNo unmerged paths, no conflict markers in any tracked file, scoped checks pass, integration is committed and complete.

Refusal

Not for people-mediation or team-interpersonal conflicts; use culture-conflict-mediation, which addresses working friction between colleagues using Culture Index trait profiles; resolve-merge-conflicts handles text conflicts in tracked files where git stops on unmerged paths. The shared word "conflict" is the only overlap. Not for remote, credential, publish, deploy, or other irreversible changes.

Inputs

The repository root and the set of conflicting files are supplied by the in-progress git state. git status and git diff --name-only --diff-filter=U are authoritative for the conflict list.

Optional context:

  • Ancestor / theirs / yours: git show :1:<file>, git show :2:<file>, git show :3:<file>.
  • Validation command: any command the human specifies; otherwise discover the project's own type checker, tests, and formatter.

Procedure

  1. Detect the conflict state. Run git status. Identify which integration is in progress (merge, rebase, cherry-pick, or stash pop) and enumerate the unmerged paths. If zero unmerged paths, the trigger condition is not met; stop. Done when: the conflict-stop type is named and every unmerged path is listed.

  2. Gather context for each conflicted file. Read the three versions, ancestor (:1:), theirs (:2:), yours (:3:), via git show. Use read with the :conflicts selector to enumerate marker blocks; fall back to ranged read calls for files the selector returns empty. Use difft for side-by-side comparison when either intent is unclear. Done when: every conflicted file's three versions and conflict-marker blocks have been examined.

  3. Read the primary sources for both sides. Read the commit messages, pull requests, and original issues or tickets for both changes. State why each side exists in one sentence before editing any hunk. If neither side's commit, PR, or linked issue expresses a clear intent, stop and report the ambiguous files, asking the human to supply the missing intent before continuing; do not guess an intent to drive the resolution. Done when: each side's intent is stated and recorded, or ambiguous files are reported and the skill pauses for human input.

  4. Resolve each hunk. Preserve both intents when they fit together. When they genuinely conflict, choose the side that matches the integration's stated goal, name the trade-off, and record the discarded intent so the finishing commit message can name both sides' intents and the resolution rationale. Invent no new behaviour. Remove all conflict markers from each resolved file. Done when: no conflict markers remain in any tracked file and every conflict resolution has its trade-off and any discarded intent recorded.

  5. Regenerate lockfiles with tooling. If a lockfile is among the conflicting files, regenerate it with the project package manager rather than hand-editing. Done when: lockfiles are regenerated, or confirmed not among the conflicted set.

  6. Stage resolved files. Run git add <file> for each resolved file. Confirm git status shows zero unmerged paths. Done when: no unmerged paths remain in git status.

  7. Run scoped checks. Discover the repository's own commands. Run the type checker, tests, and formatter in that order when they exist. Scope runs to the resolution; fix only failures introduced by the integration. If a pre-existing failure blocks progress, stop and report it without suppressing or working around it. Done when: scoped checks pass, or pre-existing failures are reported without suppression.

  8. Finish the integration. Complete the in-progress operation:

    • Merge: commit the merge with a message that names both sides' intents and the resolution rationale, including any discarded intent recorded in Step 4.
    • Rebase: git rebase --continue until every commit is replayed and no conflict remains.
    • Cherry-pick: git cherry-pick --continue (or commit, then continue if multiple commits remain).
    • Stash pop: the stash is applied after resolution; run git stash drop only after the resolved changes are committed, so the stash stays recoverable until the resolution is in history. Done when: git status shows no conflicts and the integration is complete.

Failure and recovery

Failure classConditionRecovery
No conflict presentgit status reports zero unmerged pathsStop; trigger condition not met
Unresolvable hunkBoth sides are logically incompatible without introducing incorrect behaviourLeave the file marked, do not stage it, report the hunk and the competing intent
Lockfile regeneration failsPackage manager cannot regenerate the lockfileDo not hand-edit the lockfile; report the failure and leave it unresolved
Scoped check failureA check introduced by the integration failsFix only integration-introduced failures; report pre-existing failures without suppression
Unresolved markerAny <<<<<<< found after stagingStop; report the path and line range
Intent ambiguityNeither side's commit, PR, or linked issue expresses a clear intentStop; report the ambiguous files and ask the human to supply the missing intent before continuing
Scope creepResolving one conflict reveals additional unrelated conflicts or issuesStop at the current merge/rebase/cherry-pick/stash scope; do not refactor, clean up, or fix code outside the conflicted hunks
Non-convergenceTwo resolution attempts produce the same check failureStop; report the conflict pair, both attempted resolutions, and the failure output

Partial-result rule: If fewer than all conflicted files are resolved, the run is incomplete. Do not commit, do not claim success. Report every unresolved hunk by file and line range.

Rollback (user-requested only): git merge --abort, git rebase --abort, git cherry-pick --abort restore the pre-conflict VCS state at any point before a commit is made. git checkout -- <file> discards a staged-but-uncommitted resolution for a single file. A hard git reset --hard is never offered as a recovery path; it is the user's own action if they choose it.

Output

A per-file report listing each resolved hunk, the chosen resolution, and any unresolved remainder; lockfile regeneration result; scoped-check outcome (pass or named failure); final git status summary.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.

日本語の概要は準備中です。原文の説明を表示しています。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.

日本語の概要は準備中です。原文の説明を表示しています。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

af-xdp

無料

Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.

日本語の概要は準備中です。原文の説明を表示しています。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.

日本語の概要は準備中です。原文の説明を表示しています。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.

日本語の概要は準備中です。原文の説明を表示しています。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

agents-md

無料

Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.

日本語の概要は準備中です。原文の説明を表示しています。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

OutlineDriven のスキルをすべて見る

このスキルの問題を報告する