Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Code Merge

ASecurity

Must be invoked when the user asks to resolve merge conflicts, merge a branch, handle an MR/PR conflict, or any similar request.

1,715 stars
0 votes
0 copies
1 views
Added 8/30/2026
ai-agentsrefactoringgitapi

Works with

api

Security Analysis

A100/100

Scanned 8/30/2026

$npx -y skills add openkursar/hello-halo --skill code-merge --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Merge?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Code Merge
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/openkursar-code-merge/badge)](https://www.skillsdirectory.com/skills/openkursar-code-merge)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: code-merge
description: Must be invoked when the user asks to resolve merge conflicts, merge a branch, handle an MR/PR conflict, or any similar request.
---

# Code Merge Skill

Principles for resolving merge conflicts in a Merge Request (MR).

## Core Rule

**Functional conflicts require human decision. Non-functional conflicts may be resolved autonomously.**

A conflict is *functional* when the two sides represent different intended behavior, logic, or feature outcomes — resolving it wrong changes what the product does. A conflict is *non-functional* when both sides are semantically equivalent and only differ in form (formatting, import ordering, whitespace, comment wording, mechanical renames, auto-generated files, changelog/lockfile ordering).

## Merge Workflow

### 1. Survey the Conflict

Run `git status` and inspect each conflicted file (`git diff`, conflict markers `<<<<<<<`, `=======`, `>>>>>>>`). For each conflict, identify:

- Which files and hunks conflict.
- What each side (ours / theirs) is trying to do.
- Whether the conflict is functional or non-functional (per Core Rule).

### 2. Classify Every Conflict

For each conflict hunk, decide one of:

| Class            | Meaning                                             | Action                          |
|------------------|-----------------------------------------------------|---------------------------------|
| Non-functional   | Both sides equivalent, differ only in form          | Resolve autonomously (§3)       |
| Functional       | Sides differ in behavior / logic / feature outcome  | Escalate to human (§4)          |

Do not guess. If you cannot confidently tell whether a conflict changes behavior, treat it as **functional** and escalate.

### 3. Autonomous Resolution (Non-functional Only)

When resolving on your own, this often involves **code refactoring and file merging**, not just picking one side. Follow the intent analysis below.

#### 3.1 Analyze Intent: Keep or Discard

For each piece of conflicting code, determine whether its intent is to be **kept** or **discarded**:

- **Kept** — the code is still needed after the merge.
  - Resolve as: **latest version + all still-needed functionality**.
  - Take the newer/updated implementation, but make sure no required capability from either side is lost. Merge both sides' contributions rather than blindly overwriting.
  - After merging, verify the result compiles, references resolve, and no dead/duplicate declarations remain.

- **Discarded** — the code appears intended for removal (deleted on one side, superseded, obsolete).
  - **Do NOT discard autonomously. Confirm with the human first**, even if it looks non-functional. Report which code you believe should be dropped and why, and wait for confirmation.

#### 3.2 Refactor / File Merge Hygiene

When merging produces combined code:

- Preserve the newer API/signature; adapt older call sites to it.
- Deduplicate imports, helpers, and declarations introduced by both sides.
- Keep formatting consistent with the surrounding file, not with the conflict markers.
- Remove all conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`).

### 4. Escalate (Functional Conflicts)

For every functional conflict:

- Do **not** pick a side on your own.
- Report to the human: the file/location, what each side does, and the trade-off.
- Wait for an explicit decision before resolving.

List **all** functional conflicts together so the human can decide in one pass. Do not resolve some silently and escalate others.

### 5. Verify Before Completing

After all conflicts are resolved:

- Ensure no conflict markers remain (`git grep -n '<<<<<<<\|=======\|>>>>>>>'` or equivalent).
- Confirm the code builds / type-checks where applicable.
- Run `git status` to confirm all conflicts are marked resolved (`git add` the resolved files).
- Summarize what was resolved autonomously vs. what the human decided.

## Notes

- Never `git add .` blindly — stage only files you have actually reviewed and resolved.
- Do not run `git commit`, `git merge --continue`, or `git push` unless the user explicitly asks.
- When in doubt about functional vs. non-functional, or keep vs. discard, **default to asking the human.**

Attribution

openkursaropenkursar
View sourceSee grades on GitHubMore from openkursar →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →