
Resolve Conflicts
Teach your agent structured merge-conflict resolution for imports, tests, and ambiguous diffs during PR integration.
Overview
Resolve-conflicts is an agent skill most often used in Ship (also Build integrations) that applies documented patterns to merge import, test, and structural git conflicts with explicit resolution notes.
Install
npx skills add https://github.com/antinomyhq/forge --skill resolve-conflictsWhat is this skill?
- Import conflicts: combine, deduplicate, and group by module with language-specific style
- Rust example merging `HashMap`/`HashSet` and domain types into grouped `use` statements
- Test conflicts treated as additive—keep both sides when tests are non-exclusive
- Requires a one-line resolution explanation per conflict for auditability
- Offers numbered options to the user when the correct merge choice is unclear
Adoption & trust: 540 installs on skills.sh; 7.4k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You hit `<<<<<<<` markers in a PR and waste time picking the wrong side or leaving broken duplicate imports.
Who is it for?
Solo developers merging feature branches, resolving bot PRs, or cleaning conflict-heavy rebases on TypeScript or Rust codebases.
Skip if: Pure binary or generated artifact conflicts where you should regenerate instead of hand-editing, or legal merge disputes without repo context.
When should I use this skill?
Git reports conflict markers during merge or rebase, especially in imports, tests, or language-specific module blocks.
What do I get? / Deliverables
Conflicts resolve to merged, style-consistent code with a one-line rationale per hunk, or clear numbered options when the diff alone is insufficient.
- Conflict-free source files
- Per-conflict one-line resolution explanations
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Merge conflicts surface most often when integrating branches before release, which maps to Ship review and PR workflows. Conflict resolution is part of code review and merge readiness, not greenfield feature coding.
Where it fits
Clean import conflicts on a feature PR before asking a teammate to approve.
Merge upstream dependency updates that touched the same module headers.
Hotfix branch rebased onto main with overlapping test additions.
How it compares
Use for semantic merge strategy in chat—not as a replacement for `git mergetool` on huge refactors.
Common Questions / FAQ
Who is resolve-conflicts for?
Builders and small teams who want an agent to follow consistent git conflict rules during PR merges and rebases.
When should I use resolve-conflicts?
During Ship when reviewing PRs with import or test conflicts, and during Build when integrating long-running branches before you cut a release.
Is resolve-conflicts safe to install?
It guides text merges only; always re-run tests and review the Security Audits panel on this Prism page before enabling third-party agent skills.
SKILL.md
READMESKILL.md - Resolve Conflicts
# Conflict Resolution Patterns This document provides detailed patterns for resolving specific types of conflicts. **Important**: For each conflict you resolve, provide a one-line explanation of your resolution strategy. When the correct resolution isn't clear from the diff, present numbered options to the user. ## Import Conflicts When both branches modify import statements, merge both sets of imports: ### Pattern: Combine and Deduplicate ``` <<<<<<< HEAD import { foo, bar } from './module'; import { baz } from './other'; ======= import { foo, qux } from './module'; import { newThing } from './another'; >>>>>>> branch ``` **Resolution:** Merge all unique imports, group by module: ``` import { foo, bar, qux } from './module'; import { baz } from './other'; import { newThing } from './another'; ``` ### Rust Imports ``` <<<<<<< HEAD use std::collections::HashMap; use crate::domain::User; ======= use std::collections::HashSet; use crate::domain::Account; >>>>>>> branch ``` **Resolution:** ``` use std::collections::{HashMap, HashSet}; use crate::domain::{Account, User}; ``` **Key principles:** - Combine all unique imports - Remove duplicates - Follow language-specific style (group by module, alphabetize) - Preserve any re-exports or aliases from both sides **One-line explanation example**: "Merging imports by combining unique imports from both branches and grouping by module." ## Test Conflicts Tests should almost always include both changes, as tests are additive. ### Pattern: Merge Test Cases ``` <<<<<<< HEAD #[test] fn test_user_creation() { ... } #[test] fn test_user_validation() { ... } ======= #[test] fn test_user_creation() { ... } #[test] fn test_user_deletion() { ... } >>>>>>> branch ``` **Resolution:** Include all tests (assuming test_user_creation is identical): ``` #[test] fn test_user_creation() { ... } #[test] fn test_user_validation() { ... } #[test] fn test_user_deletion() { ... } ``` ### Test Setup/Fixtures Conflicts When both branches modify test fixtures, merge the changes: ``` <<<<<<< HEAD fn setup() -> TestContext { TestContext { user: create_test_user(), admin: create_admin(), } } ======= fn setup() -> TestContext { TestContext { user: create_test_user(), database: init_test_db(), } } >>>>>>> branch ``` **Resolution:** ``` fn setup() -> TestContext { TestContext { user: create_test_user(), admin: create_admin(), database: init_test_db(), } } ``` **Key principles:** - Keep all test cases unless they test the exact same thing - Merge test fixtures and setup functions - If test names conflict but test different things, rename one - Preserve all assertions from both sides **One-line explanation example**: "Including all test cases from both branches and merging test fixtures." ## Lock File Conflicts Lock files (Cargo.lock, package-lock.json, yarn.lock, etc.) should be regenerated rather than manually resolved. ### Pattern: Regenerate Lock File ```bash # For Cargo.lock git checkout --theirs Cargo.lock # or --ours, either works cargo update # or cargo build # For package-lock.json git checkout --theirs package-lock.json npm install # For yarn.lock git checkout --theirs yarn.lock yarn install # For Gemfile.lock git checkout --theirs Gemfile.lock bundle install # For poetry.lock git checkout --theirs poetry.lock poetry lock --no-update ``` **Key principles:** - Always regenerate, never manually merge - Choose either version (--ours or --theirs), doesn't matter - Run the package manager's update/install command - The result will include dependencies from both branches **One-line explanation example**: "Regenerating lock file with package manager to include dependencies from both branches." ## Configuration File Conflicts Configuration files often need careful merging of both changes. ### Pattern: Merge Configuration Values ```yaml <<<<<<< HEAD server: port: 8080 timeout: 30 max_connectio