resolve-conflicts

A guided method for combining changes when two Git branches edit the same lines. Git merge conflicts happen when Git cannot safely choose how competing edits should fit together.

In plain words
What is it for?
Use it to resolve conflicts in imports, tests, lock files, configuration, and files that were deleted on one branch and changed on another.
Why use it?
It provides a structured way to preserve both sides where possible, handle generated files correctly, and verify the result with tests.

Skill for Claude CodeCodex

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/tailcallhq/forgecode/resolve-conflicts
Any agent
npx skills add tailcallhq/forgecode --skill resolve-conflicts
Clone the repo
git clone --depth 1 https://github.com/tailcallhq/forgecode

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,729 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 $0.00068 $0.03729
Opus 5 $0.00034 $0.01865
Sonnet 5 $0.00014 $0.00746
Haiku 4.5 $0.00007 $0.00373

Measured yesterday against content hash f961abddb0ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

resolve-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 yesterday.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/handle-deleted-modified.sh, scripts/validate-conflicts.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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.forge/skills/resolve-conflicts/SKILL.md · 483 lines

How it starts

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

Git Conflict Resolution

Resolve Git merge conflicts by intelligently combining changes from both branches while preserving the intent of both changes. This skill follows a plan-first approach: assess conflicts, create a detailed resolution plan, get approval, then execute.

Core Principles

  1. Plan Before Executing: Always create a structured resolution plan and get user approval before making changes
  2. Prefer Both Changes: Default to keeping both changes unless they directly contradict
  3. Merge, Don't Choose: Especially for imports, tests, and configuration
  4. Regenerate Generated Files: Never manually merge generated files - always regenerate them from their sources
  5. Backup Before Resolving: For deleted-modified files, create backups first
  6. Validate with Tests: Always run tests after resolution
  7. Explain All Resolutions: For each conflict resolved, provide a one-line explanation of the resolution strategy
  8. Ask When Unclear: When the correct resolution isn't clear from the diff, present options to the user and ask for their choice

Workflow

Step 1: Assess the Conflict Situation

Run initial checks to understand the conflict scope:

git status

Identify and categorize all conflicted files:

  • Regular file conflicts (both modified)
  • Deleted-modified conflicts (one deleted, one modified)
  • Generated file conflicts (lock files, build artifacts, generated code)
  • Test file conflicts
  • Import/configuration conflicts
  • Binary file conflicts

For each conflicted file, gather information:

  • File type and purpose
  • Nature of the conflict (content, deletion, type change)
  • Scope of changes (lines changed, sections affected)
  • Whether the file is generated or hand-written

Step 2: Create Merge Resolution Plan

Based on the assessment, create a structured plan before resolving any conflicts. Present the plan in the following markdown format:

## Merge Resolution Plan

### Conflict Summary

- **Total conflicted files**: [N]
- **Deleted-modified conflicts**: [N]
- **Generated files**: [N]
- **Regular conflicts**: [N]

### Resolution Strategy by File

#### 1. [File Path]

**Conflict Type**: [deleted-modified / generated / imports / tests / code logic / config / struct / binary]
**Strategy**: [Brief description of resolution approach]
**Rationale**: [Why this strategy is appropriate]
**Risk**: [Low/Medium/High] - [Brief risk description]
**Action Items**:

- [ ] [Specific action 1]
- [ ] [Specific action 2]

#### 2. [File Path]

...

### Execution Order

1. **Phase 1: Deleted-Modified Files** - Handle deletions and backups first
2. **Phase 2: Generated Files** - Regenerate from source
3. **Phase 3: Low-Risk Merges** - Imports, tests, documentation
4. **Phase 4: High-Risk Merges** - Code logic, configuration, structs
5. **Phase 5: Validation** - Compile, test, verify

### Questions/Decisions Needed

- [ ] **[File/Decision]**: [Question for user] (Options: 1, 2, 3)

### Validation Steps

- [ ] Run conflict validation script
- [ ] Compile project
- [ ] Run test suite
- [ ] Manual verification of high-risk changes

Read the full file on GitHub · 483 lines

Files

What ships with it

4 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. yesterday First seen · 483 lines · 68 tokens per session scan A f961abddb0ea

Subscribe to this mod's changes

resolve-conflicts is a skill published in the GitHub repository tailcallhq/forgecode (7,599 stars, last pushed yesterday), licensed Apache-2.0. It adds 68 tokens to every session and 3,729 once invoked, about $0.0003 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.