360 Secure SkillHub
360 安全技能中心

fix-merge-conflicts

检测存在冲突的文件并从冲突标记中定位冲突,以最小且优先保证正确性的改动逐项解决;能安全保留双方内容时优先保留,否则选择可编译且公共行为稳定的版本;锁文件通过包管理器重新生成而非手改;最后运行编译、lint 和相关测试,暂存已解决文件并汇总关键决策与构建测试结果。

michael-denyer
热度 35.00
最近更新 2026-10-19 04:13:10
分类:开发依赖:代码执行 / 读写文件应用场景:调试排错 / DevOps / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add michael-denyer/pstack-claude/fix-merge-conflicts
Metadata
name
fix-merge-conflicts
description
Resolve merge conflicts non-interactively, validate build and tests, and finalize conflict resolution

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