Skip to content

Guide · Agent skill

How to use the Resolve Git Conflicts agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The resolve-conflicts skill is a set of instructions and helper scripts that tells an AI coding agent how to handle Git merge conflicts in a structured way. This guide explains what the skill changes about the agent's behaviour, how to install it, how to trigger it with plain requests, and what to check before letting it touch your repository. By the end you will be able to install the skill, start a conflict resolution, review the agent's plan and decide whether to approve it.

Resolve Git Conflictstailcallhq/forgecode · Apache-2.0

Quick start

  1. 1Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into your project's .claude/skills/ folder for one repository.
  2. 2Prepare your repository. Make sure Git is installed and your repository has an in-progress merge or rebase. Commit or back up your work first, because scripts and resolutions rewrite files in the working tree.
  3. 3Ask for a plan. Describe the conflict in plain language and ask the agent to start with a plan. The skill should run git status and assess each conflicted file.
  4. 4Review the Merge Resolution Plan. Check each file's conflict type, strategy and risk rating. Answer any questions the agent lists, then approve the plan or ask for changes.
  5. 5Let the agent execute and validate. After approval, the agent resolves files in the plan's order, runs the backup script for deleted-modified files where needed, and validates the result with tests and the validation script.

What an agent skill is and what this one does

An agent skill is a folder containing a SKILL.md file with instructions, plus optional reference files and scripts, that an AI agent loads when a task matches the skill's description. This one is named resolve-conflicts and its description tells the agent to invoke it as soon as you mention merge conflicts that need resolving.

Without the skill, an agent may start editing conflicted files directly. With it, the agent follows a plan-first workflow: it runs git status, categorises the conflicted files, writes a resolution plan and waits for your approval before changing anything.

  • Assesses which files conflict and what type each one is (for example deleted-modified, generated, imports, tests or configuration)
  • Writes a resolution plan with a strategy, risk level and action items for each file
  • Asks you to choose between numbered options when the correct merge is unclear from the diff
  • Explains each resolution in one line
  • Runs validation steps after resolution, such as a conflict validation script, a build and the test suite

Install the resolve-conflicts skill

Download the ZIP file from this page and unzip it. For a personal skill that applies to all your projects, place the resolve-conflicts folder inside ~/.claude/skills/. For a skill that only applies to one repository, place it inside that project's .claude/skills/ folder.

If you use the Claude apps instead, you can upload the skill under Settings → Capabilities → Skills.

  • Personal install: unzip into ~/.claude/skills/
  • Project install: unzip into the project's .claude/skills/ folder
  • Claude apps: upload under Settings → Capabilities → Skills

Check the file layout and script paths

The skill package contains SKILL.md, two reference files (references/patterns.md and references/sample-plan.md) and two scripts (scripts/handle-deleted-modified.sh and scripts/validate-conflicts.sh). Keep this folder structure intact so the agent can find the references and scripts.

The SKILL.md file refers to the scripts using the path .forge/skills/resolve-conflicts/scripts/. If you installed the skill to a different location, the agent may need to use the actual path of the scripts on your machine, so check where the folder ended up before running a script.

  • SKILL.md: the main instructions the agent reads
  • references/patterns.md: worked examples for import and test conflicts
  • references/sample-plan.md: a complete example plan to compare against
  • scripts/handle-deleted-modified.sh and scripts/validate-conflicts.sh: helper scripts

Trigger the skill with a natural request

You do not need a special command. Describe the conflict in ordinary language, and the skill's description should lead the agent to use it. Mention the conflict clearly so the agent knows what you need.

Before you ask, make sure you are inside a repository that has an in-progress merge or rebase, and that you have committed or backed up your work.

  • Resolve the merge conflicts in this branch, starting with a plan please.
  • I'm rebasing onto main and there are conflicts in the imports and test files. Can you help?
  • Two files were deleted on one branch but changed on the other. Back them up before doing anything.
  • The lock file conflicted after the merge. Can you regenerate it?
git status

Review and approve the plan

The agent should present a Merge Resolution Plan before editing any file. The plan lists each conflicted file, its conflict type, the proposed strategy, the rationale, a risk rating and action items, followed by an execution order and any decisions it needs from you.

Read the plan carefully. Approve it, ask for changes, or choose an option wherever the agent has asked you to decide. Only after approval should the agent carry out the resolution.

  • Check that every conflicted file from git status appears in the plan
  • Look at the risk rating for code logic, configuration and struct changes
  • Answer any listed questions by picking an option number

Understand the backup script for deleted-modified files

For files that one branch deleted and the other modified, the skill runs scripts/handle-deleted-modified.sh only after you approve the plan. According to the skill, the script creates timestamped backups of the modified content, analyses possible relocation targets, generates an analysis report for each file and resolves the deletion status automatically.

Review the backup directory and analysis files before accepting the result, so you can see where the changes should be applied.

  • Creates timestamped backups of modified content
  • Writes analysis reports for each file
  • Helps you decide where the changes belong if the file was moved or renamed
.forge/skills/resolve-conflicts/scripts/handle-deleted-modified.sh

Validate the result before committing

After resolution, the skill's validation steps ask the agent to run the conflict validation script, compile the project, run the test suite and manually verify high-risk changes. The skill's core principles say tests should always run after resolution.

The validation script is scripts/validate-conflicts.sh. The source describes it as a check that no conflict markers remain, so confirm the result yourself and review the diff before you commit.

  • Run scripts/validate-conflicts.sh and confirm no conflict markers remain
  • Build the project with your normal tooling
  • Run your test suite
  • Review high-risk changes by hand

What people use it for

  • Resolving conflicts in import blocks where both branches added different imports to the same file
  • Merging test files where both branches added test cases to the same suite
  • Handling a file that one branch deleted while the other branch edited it, with backups made first
  • Regenerating a lock file after a merge rather than hand-editing its conflict markers

Frequently asked questions

How do I install the resolve-conflicts skill?

Download the ZIP from this page and unzip it. Place the resolve-conflicts folder in ~/.claude/skills/ for personal use or in your project's .claude/skills/ folder for one repository. In the Claude apps, you can upload it under Settings → Capabilities → Skills.

What do I need to run the resolve-conflicts skill?

The source lists Git installed, a repository with an in-progress merge or rebase, and a Bash shell to run the included scripts. Project build and test tooling is needed for the validation step.

Is the resolve-conflicts skill free to use?

The item is listed under the Apache-2.0 licence, which is stated on this page. Check the licence file in the source repository for the full terms before you use or redistribute it.

Does the skill send my code over the network?

The listing says the skill does not use the network, but it does run scripts. The scripts back up and rewrite files in your working tree, so commit or back up your work before using it.

Can the agent resolve conflicts without asking me first?

The skill is designed to present a plan and wait for your approval before making changes. When the correct resolution is unclear, it presents numbered options for you to choose from rather than deciding on its own.

When should I not use this skill?

Skip it for simple one-line conflicts you can fix yourself, since the plan-first process adds overhead. It is also a poor fit for conflicts in logic that needs domain knowledge, where the agent will ask you to choose.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers who often merge or rebase branches with conflicts in imports, tests or configuration, and teams that want a reviewed plan before an agent edits the repository. It is less useful for trivial one-line conflicts, or for work you have not committed or backed up, since the scripts and resolutions rewrite files in the working tree.

Download the skill