git-conflict-resolver

git-conflict-resolver is a skill for Cursor from asasugar/SuperSpec. It costs 107 tokens per session (1,533 once invoked), scanned A, original, MIT.

An interactive toolkit for finding, examining, and resolving Git merge or rebase conflicts. A conflict happens when Git cannot safely combine competing changes from different branches.

In plain words
What is it for?
Use it to detect conflict regions, analyze their context and history, choose whether to keep one side or merge both, resolve files individually or in batches, and verify the result.
Why use it?
It shows the affected files and proposed changes, then asks for approval before applying each resolution.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/asasugar/superspec/git-conflict-resolver
Any agent
npx skills add asasugar/SuperSpec --skill git-conflict-resolver
Clone the repo
git clone --depth 1 https://github.com/asasugar/SuperSpec

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-conflict-resolver

README.md
[![agentmods](https://agentmods.dev/badge/skills/asasugar/superspec/git-conflict-resolver.svg)](https://agentmods.dev/skills/asasugar/superspec/git-conflict-resolver)
Your own site
<a href="https://agentmods.dev/skills/asasugar/superspec/git-conflict-resolver"><img src="https://agentmods.dev/badge/skills/asasugar/superspec/git-conflict-resolver.svg" alt="Measured on agentmods" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,533 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.01533
Opus 5 $0.00053 $0.00766
Sonnet 5 $0.00021 $0.00307
Haiku 4.5 $0.00011 $0.00153

Measured 5d ago against content hash 1c8d7d1f419f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

git-conflict-resolver scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/analyze_conflict.py, scripts/batch_resolve_interactive.py, scripts/detect_conflicts.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/git-conflict-resolver/SKILL.md · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git冲突解决器

自动检测、分析和解决Git分支合并冲突的工具集。

快速命令

场景 命令
检测冲突 python scripts/detect_conflicts.py
分析冲突 python scripts/analyze_conflict.py <file>
交互式解决 python scripts/resolve_conflict_interactive.py <file> <ours|theirs|merge>
批量解决 python scripts/batch_resolve_interactive.py
撤销解决 git checkout --conflict=merge <file>

工作流程

解决Git冲突的标准流程:

  1. 检测冲突 - 识别所有冲突文件
  2. 分析冲突 - 分析冲突类型和影响范围
  3. 选择策略 - 根据冲突类型选择解决策略
  4. 确认修改 - 每次修改前都会征询开发者同意,显示变更预览
  5. 解决冲突 - 执行解决操作
  6. 验证结果 - 确认冲突已解决

重要: 所有冲突解决操作都是交互式的,每次修改前都会:

  • 显示变更预览(diff)
  • 征询开发者同意
  • 只有确认后才应用更改

检测冲突

使用 scripts/detect_conflicts.py 检测当前仓库中的所有冲突:

python scripts/detect_conflicts.py

脚本会输出:

  • 冲突文件列表
  • 每个文件的冲突数量
  • 冲突区域位置
  • 文件统计信息

分析冲突

使用 scripts/analyze_conflict.py 分析单个冲突文件的详细信息:

python scripts/analyze_conflict.py <file_path>

分析包括:

  • 冲突类型识别
  • 解决策略建议
  • Git提交历史
  • 冲突上下文

解决策略

根据冲突情况选择策略:

交互式解决(推荐)

使用 scripts/resolve_conflict_interactive.py 进行交互式解决,每次修改前都会:

  • 显示变更预览(diff)
  • 征询开发者同意
  • 只有确认后才应用更改
python scripts/resolve_conflict_interactive.py <file> <strategy>

策略选项:

  • ours - 保留当前分支的更改
  • theirs - 保留目标分支的更改
  • merge - 智能合并双方更改

批量交互式解决

使用 scripts/batch_resolve_interactive.py 批量处理多个冲突文件:

python scripts/batch_resolve_interactive.py

脚本会:

  1. 检测所有冲突文件
  2. 逐个显示冲突详情和建议策略
  3. 让开发者选择解决策略
  4. 显示变更预览并征询同意
  5. 只有确认后才应用更改

非交互式解决(不推荐)

使用 scripts/resolve_conflict.py 直接解决(不推荐,不会征询同意):

python scripts/resolve_conflict.py <file> <strategy>

Manual (手动解决)

复杂的业务逻辑冲突需要手动审查和合并。

  1. 打开冲突文件
  2. 审查两边的代码
  3. 手动合并或重写
  4. 删除冲突标记
  5. 使用 git add <file> 标记为已解决

批量处理

对于多个冲突文件,使用交互式批量处理脚本:

python scripts/batch_resolve_interactive.py

流程:

  1. 自动检测所有冲突文件
  2. 逐个显示冲突详情和建议策略
  3. 每次修改前显示变更预览并征询同意
  4. 只有确认后才应用更改
  5. 逐个验证处理结果

重要: 批量处理也是交互式的,每个文件都会单独确认。

常见场景

场景1: 合并功能分支到主分支

  1. 检测冲突: python scripts/detect_conflicts.py
  2. 分析主要冲突文件
  3. 通常保留功能分支的更改(ours策略)
  4. 复杂冲突手动处理

Read the full file on GitHub · 181 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 181 lines · 107 tokens per session scan A 1c8d7d1f419f

Subscribe to this mod's changes

git-conflict-resolver is a skill published in the GitHub repository asasugar/SuperSpec (15 stars, last pushed 5mo ago), licensed MIT. It adds 107 tokens to every session and 1,533 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.