auldsyababua/instructor-workflow/merge-conflict-resolver
Claude Code and agent skill by auldsyababua/instructor-workflow
- community
Checking that the SKILL.md file is still in the repository.
Analyze branch divergence, detect potential conflicts, and guide merge resolution for any Git repository. Auto-detects current branch or accepts parameters.
Install
npx vskill@latest install auldsyababua/instructor-workflow/merge-conflict-resolverSKILL.md
Merge Conflict Resolver Skill
Overview
A comprehensive skill for analyzing Git branch divergence, detecting potential merge conflicts before they occur, and guiding users through systematic conflict resolution. This skill provides both automated analysis and manual resolution workflows.
Features
1. Intelligent Auto-Detection
- Detects current branch automatically if not specified
- Auto-discovers repository root using
git rev-parse --show-toplevel - Defaults to
origin/mainas target branch (configurable) - Works in any Git repository without hardcoded paths
2. 8-Step Analysis Workflow
- Branch Verification - Validates current branch state
- Status Display - Shows recent commits and current HEAD
- Fetch Latest - Updates remote branch information
- Commit Comparison - Analyzes branch divergence (merge-base analysis)
- Change Analysis - Shows commits unique to each branch
- File Changes - Lists modified files in both branches
- Conflict Detection - Identifies files changed in both branches (potential conflicts)
- Merge Attempt - Attempts automatic merge with detailed reporting
3. Color-Coded Output
- RED - Errors and conflict detection
- GREEN - Success messages and confirmations
- YELLOW - Warnings and important information
- BLUE - Section headers and step markers
4. Multiple Resolution Strategies
- Automated -
resolve-merge-conflicts.sh(orchestrator) - Detailed Analysis -
analyze-and-merge.sh(8-step workflow with guidance) - Simple Merge -
simple-merge.sh(basic merge helper) - Status Check -
check-merge-status.sh(non-destructive analysis)
Usage
Quick Start (Recommended)
Detailed Analysis
Status Check Only
Simple Merge Helper
When to Use This Skill
Perfect For:
- ✅ Resolving merge conflicts in feature branches
- ✅ Pre-merge analysis to detect potential conflicts
- ✅ Understanding branch divergence before creating PRs
- ✅ Teaching merge conflict resolution workflows
- ✅ Automated merge workflows in CI/CD pipelines
- ✅ Multi-developer teams with frequent branch conflicts
Not Suitable For:
- ❌ Automated conflict resolution (requires human judgment)
- ❌ Rebasing workflows (use
git rebaseinstead) - ❌ Interactive conflict resolution (use
git mergetool) - ❌ Cherry-picking specific commits (use
git cherry-pick)
Output Examples
Success Case (No Conflicts)
Conflict Case (Manual Resolution Needed)
Pre-Merge Analysis
Configuration
Environment Variables
Script Parameters
All scripts accept optional parameters:
Parameter Defaults:
source-branch:$(git branch --show-current)(current branch)target-branch:origin/main(or$DEFAULT_TARGET_BRANCH)
Error Handling
Common Errors
Not in a Git repository:
Branch doesn't exist:
Already up to date:
Dirty working directory:
Rollback and Recovery
Abort Merge in Progress
Reset to Before Merge
Preserve Work Before Resetting
Integration Examples
CI/CD Pipeline (GitHub Actions)
Pre-Merge Hook
Automated Merge Script
Troubleshooting
Merge Failed with Many Conflicts
Try rebase instead:
Lost Changes After Merge
Scripts Not Executable
Best Practices
Before Merging
- ✅ Always fetch first:
git fetch origin - ✅ Check branch status: Run
check-merge-status.sh - ✅ Analyze potential conflicts: Run
analyze-and-merge.shfirst - ✅ Commit or stash changes: Clean working directory before merge
- ✅ Review recent commits: Understand what you're merging
During Conflict Resolution
- ✅ Read conflict markers carefully:
<<<<<<<,=======,>>>>>>> - ✅ Test after each resolution: Don't resolve all at once
- ✅ Keep both changes when possible: Merge functionality, don't just delete
- ✅ Preserve security fixes: Don't accidentally revert critical changes
- ✅ Document complex resolutions: Add comments explaining why
After Merging
- ✅ Review the merge commit:
git show HEAD - ✅ Run tests: Ensure nothing broke
- ✅ Check for unintended changes:
git diff HEAD~1 - ✅ Update documentation: Note conflicts resolved
- ✅ Push promptly: Don't leave resolved merges unpushed
File Structure
Contributing
Adding Features
- Keep auto-detection logic in all scripts
- Maintain color-coded output conventions
- Provide clear error messages with actionable steps
- Test with multiple Git repository types
- Update both SKILL.md and README.md
Testing
Version History
- v1.0.0 (2025-11-17) - Initial release
- 8-step analysis workflow
- Auto-detection of branches and repository
- Color-coded output
- Multiple resolution strategies
- Comprehensive error handling
License
MIT License - Use freely in any Git workflow
Support
For issues or questions:
- Check this documentation first
- Review example outputs in README.md
- Examine script comments for implementation details
- Test in a safe repository before production use
Remember: Merge conflict resolution requires human judgment. These scripts analyze and guide, but you make the final decisions about which changes to keep.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/merge-conflict-resolver/SKILL.md
Popularity
- Repository stars
- 6
- Repository forks
- 1
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 8 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/auldsyababua/instructor-workflow/merge-conflict-resolver)