resolving-merge-conflicts:mattpocock/skills 方法论: engineering/resolving-merge,适用于工程实践、代码质量与开发流程优化。
resolving-merge-conflicts:mattpocock/skills 方法论: engineering/resolving-merge,适用于工程实践、代码质量与开发流程优化。
> 来源: mattpocock/skills (141k stars) — Total TypeScript 创始人 Matt Pocock
> 类目: 工程方法论
> 原文件: skills/engineering/resolving-merge-conflicts/SKILL.md
> 模型推荐: gpt-4.1 (代码工程)
Matt Pocock (Total TypeScript, 141k stars) 沉淀下来的"日常代码工程动作"skill 模板。
每一个对应一个具体动作(代码评审 / TDD / 重构 / 文档对齐 / 任务交接),不是工具,是"该怎么干这件事"的工作流模板。
michael 强调"skill 要有相应的指导功能,指导用户使用",所以这里加了下面两节让 Agent 和用户对接。
---
1. 接到任务后先按这个 skill 的检查清单走一遍
2. 清单里如果出现"先做 X 才能做 Y"的红线 → 必须先完成 X
3. 跑完清单后开始动手(改代码 / 写文档 / 评审)
4. 完工前用 `verification-before-completion`(superpowers) 或 `verification` 类 step 自检
5. 任务量大时考虑用 `dispatching-parallel-agents`(superpowers) 或 `wayfinder`(mattpocock) 拆解
1. 告诉 Agent 你要做什么(一句话即可)
2. Agent 跑 skill 清单时不要打断 — 它可能在收集上下文
3. 如果 Agent 主动问你"代码评审要不要安排一个 reviewer"等决策点 → 直接回答
4. 完工后让 Agent 跑一遍自检再交回
5. 整个过程 Agent 自动化,不需要手工介入
---
---
name: resolving-merge-conflicts
description: "Use when you need to resolve an in-progress git merge/rebase conflict."
---
1. **See the current state** of the merge/rebase. Check git history, and the conflicting files.
2. **Find the primary sources** for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.
3. **Resolve each hunk.** Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do **not** invent new behaviour. Always resolve; never `--abort`.
4. Discover the project's **automated checks** and run them — typically typecheck, then tests, then format. Fix anything the merge broke.
5. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
本 skill 专注于resolving-merg,mattpocock/skills 方法论: engineering/resolving-merge-conflicts。它将相关流程标准化,帮助用户更快拿到可靠结果,减少重复手工操作。
当你需要在resolving-merge-conflicts相关工作中获得稳定、可复用的产出时最适合——无论是单次任务还是纳入日常工作流,都能直接调用。
需要一个具体的项目或任务上下文,最好带有代码仓库或需求文档。
1. 告诉 Agent 你要做什么(一句话即可)
2. Agent 跑 skill 清单时不要打断 — 它可能在收集上下文
3. 如果 Agent 主动问你"代码评审要不要安排一个 reviewer"等决策点 → 直接回答
4. 完工后让 Agent 跑一遍自检再交回
5. 整个过程 Agent 自动化,不需要手工介入
---
本 skill 专注于resolving-merg,mattpocock/skills 方法论: engineering/resolving-merge-conflicts。它将相关流程标准化,帮助用户更快拿到可靠结果,减少重复手工操作。
当你需要在resolving-merge-conflicts相关工作中获得稳定、可复用的产出时最适合——无论是单次任务还是纳入日常工作流,都能直接调用。
需要一个具体的项目或任务上下文,最好带有代码仓库或需求文档。