Skip to content
Back to skills

Merge

ASecurity

Git merge, rebase, and conflict resolution specialist. Use when merging feature branches, rebasing onto main, resolving merge conflicts, merging PRs via gh CLI, or cleaning up merged worktrees and branches. Hard-blocks force-merges to main/master without explicit approval.

  • 8 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added October 3, 2026
ai-agentsgobashgit

Works with

  • cli

Security analysis

A100/100

Scanned October 3, 2026

npx -y skills add ek33450505/claude-agent-team --skill merge --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Merge?

Add the live security badge to your README. It updates with every re-scan.

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

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

Download with Pro
SKILL.md
---
name: merge
description: >
  Git merge, rebase, and conflict resolution specialist. Use when merging feature branches,
  rebasing onto main, resolving merge conflicts, merging PRs via gh CLI, or cleaning up
  merged worktrees and branches. Hard-blocks force-merges to main/master without explicit approval.
user-invocable: true
allowed-tools: [Agent, Bash, Read, Glob, Grep]
---

# Merge

This is the `/merge` skill. Dispatch the `merge` agent to handle the operation.

## How to use

```
/merge                        # detect scenario from current git state
/merge feature/my-branch      # merge a specific branch into main
/merge --pr 42                # merge PR #42 via gh CLI
/merge --rebase               # rebase current branch onto main
/merge --cleanup              # remove stale local branches + worktrees
/merge --squash feature/xyz   # squash-merge a noisy feature branch
```

## Dispatch rules

Parse the user's arguments, then dispatch the `merge` agent with a clear task prompt. Include:

1. **Source branch** — from args, or detect with `git branch --show-current`
2. **Target branch** — default `main`, or from args
3. **Strategy** — ff-rebase (default), squash, merge-commit, or PR merge
4. **Scope** — full merge vs. cleanup-only vs. conflict resolution only

### Scenario detection (when no args given)

Run `git status` and `git branch -vv` to detect the situation:

| State | Action |
|-------|--------|
| On a feature branch with commits ahead of main | Rebase + fast-forward merge |
| Unmerged paths in working tree | Conflict resolution mode |
| Local branches marked `[gone]` | Stale branch + worktree cleanup |
| Clean working tree on main | Report "nothing to merge" cleanly |

## Safety reminders (pass to agent)

- Hard-block force-merge to main/master — require `approve force-merge` in writing
- Always show `git diff --stat` before executing
- Verify merge before any branch deletion
- Never delete the currently checked-out branch

## Dispatch

Use the Agent tool to dispatch `merge` with the full context assembled above.

Do not execute git commands inline — hand off to the agent.

Attribution

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

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.