Merge Conflict Resolver

A professional systematic framework for AI agents to analyze, resolve, and verify complex git merge conflicts.

Install
cmdop skills install agensi-merge-conflict-resolver

Merge Conflict Resolver is a skill that gives an AI agent a structured, 9-step framework for handling git merge conflicts rather than relying on unguided inference. The workflow begins with scope assessment: the agent counts conflicts and categorizes their types, such as add/add, modify/delete, or rename/delete scenarios, including binary file collisions. It then performs contextual analysis to understand the developer’s intent — whether the branch represents a feature, bug fix, or refactor — before selecting a resolution strategy. Strategies available are Accept Ours, Accept Theirs, or Manual Merge, chosen based on objective criteria derived from the conflict context. After applying a resolution, the skill runs language-specific verification steps tailored to Python (indentation consistency), JavaScript and TypeScript (duplicate import detection), Go (struct formatting), and SQL (foreign key consistency). A final validation pass greps the working tree for leftover conflict markers and can execute build and test commands to confirm the resolved files are functional. This approach addresses a documented failure mode in standard LLM-driven conflict resolution: truncated files, deleted logic, or broken syntax that results from asking a model to resolve conflicts without a disciplined process. The skill is language-agnostic at the workflow level while providing targeted checks for the languages listed above. It is a skill, not an MCP server, so it has no executable tools of its own and operates as a reasoning framework layered on top of an agent’s existing capabilities.

Use cases

  • Resolve git merge conflicts in an automated CI/CD pipeline without manual intervention
  • Handle rename/delete and add/add conflict scenarios that trip up naive LLM prompts
  • Apply language-specific post-resolution checks for Python, JS/TS, Go, or SQL codebases
  • Ensure no leftover conflict markers remain in files before committing a merge
  • Classify conflict types and select resolution strategy automatically based on branch intent
  • Validate that resolved code still builds and passes tests after conflict resolution

When to use it

  • When an AI agent is responsible for merging branches in an automated workflow
  • When the codebase includes Python, JavaScript, TypeScript, Go, or SQL files that need language-aware verification
  • When previous unstructured conflict resolution has produced broken or truncated files
  • When a clean, linear git history is required after automated merges

When not to use it

  • When the repository uses a version control system other than git
  • When the agent lacks the ability to read file contents and execute shell commands, since this skill depends on those underlying capabilities
  • When conflict resolution requires domain-specific business logic that cannot be inferred from the code context alone
  • When language-specific checks are needed for languages outside Python, JS/TS, Go, and SQL