haimen: Skill for Claude Code

.agents/skills/resolve-git-conflicts/SKILL.md

resolve-git-conflicts is a skill for Claude Code, Codex from shenjingnan/haimen. It costs 43 tokens per session (1,716 once invoked), scanned A, original, MIT.

A guided process for resolving Git merge or rebase conflicts, which happen when Git cannot combine competing edits automatically.

In plain words
What is it for?
For finding conflicted files, grouping them by type, applying resolution strategies, checking the result, and reporting the conflicts that still need user confirmation.
Why use it?
It organizes conflict detection, file classification, resolution, and verification so unresolved markers or incorrect merges are less likely to remain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is shenjingnan/haimen's own configuration. It tells Claude Code and Codex how to work on haimen itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything haimen configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/shenjingnan/haimen/main/.agents/skills/resolve-git-conflicts/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/shenjingnan/haimen

Made for: Claude Code, Codex.

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 resolve-git-conflicts

README.md
[![agentmods](https://agentmods.dev/badge/skills/shenjingnan/haimen/resolve-git-conflicts.svg)](https://agentmods.dev/skills/shenjingnan/haimen/resolve-git-conflicts)
Your own site
<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>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,716 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00043 $0.01716
Opus 5 $0.00022 $0.00858
Sonnet 5 $0.00009 $0.00343
Haiku 4.5 $0.00004 $0.00172

Measured 7d ago against content hash 928d75435c1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/collect-context.sh), 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.

.agents/skills/resolve-git-conflicts/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.

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(通常是更新的版本)。

Read the full file on GitHub · 181 lines

Files

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.

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. 7d ago First seen · 181 lines · 43 tokens per session scan A 928d75435c1e

Subscribe to this mod's changes

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.

Related

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.

prowler-cloud/prowler · 33 tokens

gh-auth-isolation

Safely manage multiple GitHub identities (EMU + personal) in agent workflows.

github/gh-aw · 20 tokens

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.

rpamis/comet · 72 tokens

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.

zeenie-ai/OpenCompany · 51 tokens

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…

leo-lilinxiao/codex-autoresearch · 80 tokens

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".

Mathews-Tom/armory · 67 tokens