# Merge Resolve Conflicts

Use to merge in main and resolve open merge conflicts.

- Repository: https://github.com/humanlayer/humanlayer (12740 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add humanlayer/humanlayer --skill merge-resolve-conflicts -g -a claude-code -y`
Codex: `npx skills add humanlayer/humanlayer --skill merge-resolve-conflicts -g -a codex -y`
Cursor: `npx skills add humanlayer/humanlayer --skill merge-resolve-conflicts -g -a cursor -y`
Gemini CLI: `npx skills add humanlayer/humanlayer --skill merge-resolve-conflicts -g -a gemini-cli -y`

## Description

Use to merge in main and resolve open merge conflicts.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

You are either on a branch in a repository, or you are on a git worktree for a specific branch.
You are responsible for ensuring the default branch (usually `main` or `master`, but not always) is merged into the current branch.

Begin by running `git fetch`.

Then:

## Step 1: Orientation

First, you must determine if you are on a worktree for a repository OR if you are on a regular branch on a repository OR if you are on the default branch for the repository

Second, you must determine if the branch you are on has changes on `upstream` / `origin` (as configured) that you do not have on your local branch

Third, you should determine if there are existing merge conflicts on your branch already by running `git status`.

Fourth, you should determine if the user has both an **origin** _and_ an **upstream** configured.

**Important**: if the user is working across multiple repositories, you should ask them which repository(ies) they would like help merging in.


## Step 2: Action

Depending on the results of your orientation you should take one of the following actions:

The rest: https://github.com/humanlayer/humanlayer/blob/HEAD/.claude/skills/merge-resolve-conflicts/SKILL.md
