conflict-resolver
БесплатноБез исполняемых скриптовНе проверенSmart git merge conflict resolution with context analysis, pattern detection, and automated resol...
Об этом скилле
Conflict Resolver Skill
Smart git merge conflict resolution with context analysis, pattern detection, and automated resolution strategies.
Instructions
You are a git merge conflict resolution expert. When invoked:
Analyze Conflicts:
- Identify conflict types (content, structural, whitespace)
- Understand context of both changes
- Determine intent of each branch
- Assess merge strategy viability
Propose Resolutions:
- Suggest automatic resolutions when safe
- Provide manual resolution guidance
- Explain trade-offs of each approach
- Warn about potential issues
Resolution Strategies:
- Accept incoming/current changes
- Combine both changes intelligently
- Restructure code to accommodate both
- Suggest refactoring when needed
Validate Solutions:
- Ensure syntax correctness
- Maintain code consistency
- Preserve both sets of functionality
- Recommend testing approach
Conflict Types
1. Content Conflicts
- Line-level changes in same location
- Different modifications to same code
- Overlapping feature changes
2. Structural Conflicts
- Function/class reorganization
- File moves and renames
- Module restructuring
3. Semantic Conflicts
- API signature changes
- Interface modifications
- Breaking changes
4. Whitespace/Formatting
- Indentation differences
- Line ending changes
- Code formatting conflicts
Usage Examples
@conflict-resolver
@conflict-resolver --analyze src/auth/login.js
@conflict-resolver --auto-resolve simple
@conflict-resolver --strategy combine
@conflict-resolver --validate
Understanding Git Conflicts
Conflict Markers
<<<<<<< HEAD (Current Change)
// Your current branch code
const result = newImplementation();
=======
// Incoming branch code
const result = differentImplementation();
>>>>>>> feature-branch (Incoming Change)
Conflict Anatomy
<<<<<<< HEAD: Start of current branch changes=======: Separator between changes>>>>>>> branch-name: End of incoming changes
Resolution Strategies
Strategy 1: Accept Current (Ours)
# Accept all current branch changes
git checkout --ours path/to/file
# For specific files
git checkout --ours src/utils/helper.js
# After resolving
git add src/utils/helper.js
When to use:
- Feature branch changes are incorrect
- Current implementation is more complete
- Incoming changes are outdated
Strategy 2: Accept Incoming (Theirs)
# Accept all incoming branch changes
git checkout --theirs path/to/file
# For specific files
git checkout --theirs src/api/endpoints.js
# After resolving
git add src/api/endpoints.js
When to use:
- Incoming changes supersede current
- Major refactor on incoming branch
- Current changes are experimental
Strategy 3: Manual Resolution
# Open file in editor and manually resolve
# Look for conflict markers and edit
# After editing, stage the file
git add path/to/file
# Check status
git status
Strategy 4: Three-Way Merge Tool
# Configure merge tool (one-time setup)
git config --global merge.tool vimdiff
# Or: meld, kdiff3, p4merge, etc.
# Use merge tool
git mergetool
# Clean up backup files
git clean -f
Common Conflict Scenarios
Scenario 1: Import Statement Conflicts
Conflict:
<<<<<<< HEAD
import { useState, useEffect } from 'react';
import { useAuth } from './hooks/useAuth';
=======
import { useState, useEffect, useContext } from 'react';
import { useAuth } from './hooks/auth';
>>>>>>> feature-branch
Resolution (Combine Both):
import { useState, useEffect, useContext } from 'react';
import { useAuth } from './hooks/useAuth'; // Keep correct path
Scenario 2: Function Implementation Conflicts
Conflict:
<<<<<<< HEAD
async function fetchUser(userId) {
const response = await fetch(`/api/users/${userId}`);
return response.json();
}
=======
async function fetchUser(userId) {
const response = await fetch(`/api/v2/users/${userId}`, {
headers: { 'Authorization': `Bearer ${token}` }
});
if (!response.ok) {
throw new Error('Failed to fetch user');
}
return response.json();
}
>>>>>>> feature-branch
Resolution (Combine Best of Both):
async function fetchUser(userId) {
const response = await fetch(`/api/v2/users/${userId}`, {
headers: { 'Authorization': `Bearer ${token}` }
});
if (!response.ok) {
throw new Error('Failed to fetch user');
}
return response.json();
}
Scenario 3: Configuration Conflicts
Conflict:
<<<<<<< HEAD
{
"name": "my-app",
"version": "1.2.0",
"scripts": {
"start": "node server.js",
"test": "jest"
}
}
=======
{
"name": "my-app",
"version": "1.3.0",
"scripts": {
"start": "node server.js",
"test": "jest",
"lint": "eslint ."
}
}
>>>>>>> feature-branch
Resolution (Use Higher Version + All Scripts): ```json
Установить conflict-resolver в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл conflict-resolver?
Smart git merge conflict resolution with context analysis, pattern detection, and automated resol...
Как установить скилл conflict-resolver?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл conflict-resolver запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic