跳到正文
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(原文)

安装前可以查看交给 AI 代理的指令内容。

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.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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 的全部技能

报告此技能的问题