Borrowing it
Nothing to install: this file belongs to shenjingnan/haimen. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shenjingnan/haimen/main/.agents/skills/resolve-git-conflicts/SKILL.mdgit clone --depth 1 https://github.com/shenjingnan/haimenWrote 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.
[](https://agentmods.dev/skills/shenjingnan/haimen/resolve-git-conflicts)<a href="https://agentmods.dev/skills/shenjingnan/haimen/resolve-git-conflicts"><img src="https://agentmods.dev/badge/skills/shenjingnan/haimen/resolve-git-conflicts.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.01716 |
| Opus 5 | $0.00022 | $0.00858 |
| Sonnet 5 | $0.00009 | $0.00343 |
| Haiku 4.5 | $0.00004 | $0.00172 |
Grade A, and why
resolve-git-conflicts 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 7d ago.
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.
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.
Resolve Git Conflicts
Overview
结构化解决 Git 冲突的工作流。按文件类型自动分类、按策略优先级处理,安全的自动合并与交互式确认结合,确保冲突解决后项目状态正确。
上下文获取
以下命令将在技能加载时自动执行,结果将注入到上下文中供分析:
- 冲突上下文: !
bash .agents/skills/resolve-git-conflicts/scripts/collect-context.sh
When to Use
git status显示 unmerged paths- 代码中出现
<<<<<<</=======/>>>>>>>冲突标记 - merge / rebase / cherry-pick 操作后出现冲突
git ls-files --unmerged返回非空结果
Core Workflow
digraph conflicts {
rankdir=TB;
node [shape=box];
detect [label="1. 冲突检测"];
classify [label="2. 文件分类与分析"];
resolve [label="3. 策略执行"];
verify [label="4. 验证"];
done [label="完成,等待用户确认" shape=ellipse];
detect -> classify;
classify -> resolve;
resolve -> verify;
verify -> done [label="通过"];
verify -> classify [label="失败,重新分析"];
}
Step 1: 冲突检测
根据上方注入的上下文信息:
- 冲突文件列表: 查看
---[conflicted files]---部分 - 详细 unmerged 信息: 查看
---[unmerged entries]---部分 - 冲突文件数量: 查看
---[conflict file count]---部分 - 每个文件的冲突块数: 查看
---[conflict blocks per file]---部分
向用户展示:冲突文件数量、每个文件的冲突块数量。
Step 2: 文件分类与分析
将冲突文件按以下类型分类:
| 类型 | 文件示例 | 优先级 |
|---|---|---|
| 锁文件 | Cargo.lock, pnpm-lock.yaml, package-lock.json, yarn.lock |
最高 |
| 文档文件 | *.md, *.txt, *.rst |
高 |
| 配置文件 | *.json, *.yaml, *.toml, *.env |
高 |
| 代码文件 | *.ts, *.js, *.py, *.java 等 |
中 |
| 二进制文件 | *.png, *.jpg, *.woff 等 |
中 |
| 敏感文件 | .env*, *secret*, *credential* |
特殊 |
对每个文件,使用上方注入的 ---[conflict blocks per file]---
中的冲突块数量,并读取冲突内容进行分析。
Step 3: 策略执行
按文件类型选择解决策略:
锁文件 — 删除后重新生成:
rm Cargo.lock
cargo generate-lockfile
git add Cargo.lock
文档文件 — 合并双方内容,保留两边的改动。
配置文件 — 智能合并:不同字段各保留,相同字段优先 incoming(通常是更新的版本)。
What ships with it
1 file 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.
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.
- 7d ago First seen · 181 lines · 43 tokens per session scan A 928d75435c1e
resolve-git-conflicts is a skill published in the GitHub repository shenjingnan/haimen (6 stars, last pushed 6d ago), licensed MIT. It adds 43 tokens to every session and 1,716 once invoked, about $0.0002 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-31.
Other skills, from other repositories
prowler-commit
Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
comet-github
A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.
github-skill
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
codex-autoresearch
Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…
changelog-composer
Generates structured changelogs and release notes from git history and PRs, classifying breaking changes, features, fixes, performance, docs. Triggers on: "generate changelog", "write release notes", "what changed since", "prepare release", "release notes for", "diff since tag".