About resolving-merge-conflicts
The resolving-merge-conflicts skill guides an agent through checking Git merge or rebase state, resolving conflicts in context, and running the project’s automated checks. It is intended for development work that needs to preserve change intent and complete the merge or rebase.
Key features
- 01Inspect merge or rebase state
- 02Review commits, PRs, and issue context
- 03Resolve conflicts hunk by hunk
- 04Run project automated checks
- 05Complete and commit merge or rebase
Use cases
- 01Resolve Git merge conflicts
- 02Investigate conflicting changes during a rebase
- 03Validate and commit conflict resolutions
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ vinvcn/ mattpocock-skills-zh-cn --skill resolving-merge-conflictsAfter installing, type/resolving-merge-conflictsin Claude Code to confirm it loaded.
Bundled filesagents/openai.yaml
Details
From the project README-
查看当前 merge/rebase 状态。检查 git history 和冲突文件。
-
为每个冲突找到 primary sources。深入理解每个变更为什么产生,以及原始意图是什么。阅读 commit messages,检查 PRs,检查原始 issues/tickets。
-
解决每个 hunk。 尽可能保留双方意图。若二者不兼容,选择符合本次 merge 目标的一方,并记录 trade-off。不要发明新行为。始终解决冲突;不要
--abort。 -
发现项目的 automated checks 并运行它们,通常是 typecheck、tests、format。修复 merge 引入的问题。
-
完成 merge/rebase。 Stage 所有内容并 commit。若正在 rebase,继续 rebase 流程直到所有 commits 都完成。