agentleFS
shinzoxDshinzoxD/knackbox/skills/coding/git-conflict-resolution/SKILL.md

git-conflict-resolution

Skill0 starsChanged 5 months agoApache-2.0View on GitHub

Resolve git merge and rebase conflicts carefully while preserving

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify with build/tests when available.

    line 26
  2. Distinctive:

    If both sides are valid but incompatible product-wise, stop and ask.

    line 27
  3. Distinctive:

    Never leave conflict markers in the final suggestion.

    line 50
  4. Distinctive:

    Do not invent code that was not shown.

    line 51
  5. Distinctive:

    Prefer regenerating lockfiles over hand-merging when safe.

    line 52
  6. Distinctive:

    Avoid drive-by refactors while resolving.

    line 53
  7. Distinctive:

    Semantic conflict without markers: call out API/behavior divergence.

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git Conflict Resolution

Resolve conflicts by understanding both sides, not by blindly keeping "ours" or "theirs". Prefer a working tree that builds and preserves intentional behavior from each branch.

Workflow

  1. Identify conflict type: merge, rebase, cherry-pick, or stash pop.
  2. List conflicted files. Prioritize build/config, then core logic, then docs.
  3. For each file, restate what each side intended from the hunks and context.
  4. Produce a resolved version. Remove all conflict markers.
  5. Verify with build/tests when available; stage and continue the operation.
  6. If both sides are valid but incompatible product-wise, stop and ask.

Output format

## Conflict plan
**Operation:** merge | rebase | …
**Files:** …

### path/to/file
- **Ours intent:** …
- **Theirs intent:** …
- **Resolution:** …
- **Snippet or steps:** …

### Commands
```bash
# status / add / continue / abort

## Rules

1. Never leave conflict markers in the final suggestion.
2. Do not invent code that was not shown; mark assumptions.
3. Prefer regenerating lockfiles over hand-merging when safe.
4. Avoid drive-by refactors while resolving.
5. Offer abort when risk of data loss or confusion is high.
6. Binary files: choose a side explicitly.

## Edge cases

- **Rebase:** conflicts may repeat per commit; resolve toward the new base carefully.
- **Modify/delete:** confirm whether the file should exist.
- **Semantic conflict without markers:** call out API/behavior divergence.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.