跳到正文
Skillpedia
通用编程15k · #10935

fix-merge-conflicts

它能做什么

让助手逐步处理合并冲突,直到分支可以再次构建。适合在合并或变基时遇到冲突的开发者。

适用场景

  • ✓当你的分支存在尚未解决的合并冲突时。
  • ✓当你希望冲突解决后构建能够再次正常工作时。
  • ✓当你希望以最少的修改解决冲突,并获得简短总结时。

技能链接

https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/fix-merge-conflicts/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/fix-merge-conflicts/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的分支与 main 存在合并冲突。请解决它们,确保能够构建,并告诉我你选择了什么。”

每周 5 个新技能,1 分钟读完。

工作原理

助手会找到存在冲突的文件,用最小且正确的编辑解决每个冲突,使用包管理工具重新生成锁文件,并运行构建和测试。然后它会暂存结果,并总结关键决定。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Fix merge conflicts

Trigger

Branch has unresolved merge conflicts and needs a reliable path to a buildable state.

Workflow

  1. Detect all conflicting files from git status and conflict markers.
  2. Resolve each conflict with minimal, correctness-first edits.
  3. Prefer preserving both sides when safe. Otherwise, choose the variant that compiles and keeps public behavior stable.
  4. Regenerate lockfiles with package manager tools instead of hand-editing.
  5. Run compile, lint, and relevant tests.
  6. Stage resolved files and summarize key decisions.

Guardrails

  • Keep changes minimal and readable.
  • Do not leave conflict markers in any file.
  • Avoid broad refactors while resolving conflicts.
  • Do not push or tag during conflict resolution.

Output

  • Files resolved
  • Notable resolution choices
  • Build/test outcome
常见问题

它会推送分支吗?

不会。解决冲突的过程中,它不会推送或打标签。

它会手动编辑锁文件吗?

不会。它会改用包管理器重新生成锁文件。

会残留冲突标记吗?

不会。解决之后,任何文件中都不应残留冲突标记。

详情

作者的原始描述

Resolve merge conflicts non-interactively, validate build and tests, and finalize conflict resolution

repo: cursor/plugins

热度

GitHub 星标
15k
排名
#10935
许可证
—
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能