resolve-conflicts

Merges a target branch into the current branch and resolves git conflicts by intent.

Updated Dec 25, 2021
One-click install
npx skills add https://github.com/kotahashihama/dotfiles --skill resolve-conflicts-kotahashihama
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resolve-conflicts
Source: https://github.com/kotahashihama/dotfiles/tree/main/home/.claude/skills/resolve-conflicts
Command: npx skills add https://github.com/kotahashihama/dotfiles --skill resolve-conflicts-kotahashihama

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Merging another branch often produces conflicts that are resolved mechanically by keeping one side, losing the intent of the other. This Skill merges a specified branch (defaulting to main) into the current branch, reads both sides of each conflict, and resolves them based on what each change is trying to accomplish, ending with a proper merge commit. ## Core Features & Use Cases - Intent-aware conflict resolution: Reads both HEAD and incoming changes to choose a resolution that satisfies both sides rather than blindly picking one. - Post-merge verification: Runs lint, type checks, and tests even when no conflicts occur, catching broken references and dead imports that git cannot detect. - Regeneration of generated files: Rebuilds mocks and generated test files instead of hand-merging them. - Use Case: You are on a feature branch and say "main を取り込んで" — the Skill fetches origin/main, merges it, resolves any conflicts file by file, runs checks, and creates the merge commit without pushing. ## Quick Start Ask the assistant to merge main into the current branch and resolve any conflicts, for example by saying "main を取り込んでコンフリクトを解消して".

Frequently Asked Questions about resolve-conflicts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resolve git merge conflicts by understanding both sides?

Read what each side of the conflict markers intends to change, then choose a resolution that satisfies both intents rather than keeping one side mechanically. After resolving, stage the files and create the merge commit.

How to merge main into my current branch with git?

Fetch the latest main with git fetch origin main, then run git merge origin/main from your branch. If conflicts appear, resolve the marked files, stage them with git add, and commit the merge.

Why run tests after a merge with no conflicts?

A clean git merge only means the same lines were not edited twice. One side may have moved or deleted code that the other side's new files still reference, and only type checks and tests that exercise those files will surface the breakage.

Should I hand-merge generated files like mocks or _test.go?

No. Generated files should be regenerated with the project's generation command rather than merged by hand, since manual merging of generated output is error-prone and quickly diverges from the source definitions.

Does this merge workflow push the merge commit automatically?

No. The workflow stops at creating the merge commit locally. Pushing is left to the user's explicit decision so that remote changes remain under deliberate human control.