
Resolve Conflicts
Use this skill immediately when the user mentions merge conflicts that need to be...
Install
npx skills add tailcallhq/forgecode --skill resolve-conflicts -g -a claude-code -y- Repository
- tailcallhq/forgecode7.6k
- Category
- Testing
- Updated
- 3d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- Yes, review before use
What it does
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
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
- Plan Before Executing: Always create a structured resolution plan and get user approval before making changes
- Prefer Both Changes: Default to keeping both changes unless they directly contradict
- Merge, Don't Choose: Especially for imports, tests, and configuration
- Regenerate Generated Files: Never manually merge generated files - always regenerate them from their sources
- Backup Before Resolving: For deleted-modified files, create backups first
- Validate with Tests: Always run tests after resolution
- Explain All Resolutions: For each conflict resolved, provide a one-line explanation of the resolution strategy
- 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


