merge

Commit, rebase, and merge the current branch into its base branch (never main).

16 stars

Best use case

merge is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Commit, rebase, and merge the current branch into its base branch (never main).

Teams using merge should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/merge/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/data-ai/merge/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/merge/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How merge Compares

Feature / AgentmergeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Commit, rebase, and merge the current branch into its base branch (never main).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

## Safety Rules

**CRITICAL — these rules must NEVER be violated:**

- **NEVER merge into `main` or `master`.** If the resolved base branch is `main` or `master`, stop immediately and inform the user.
- **NEVER force push.** Do not use `--force`, `--force-with-lease`, or `-f` with `git push`.

## Step 1: Verify Branch

```bash
git branch --show-current
```

If the current branch is `main` or `master`, **STOP** and tell the user they must be on a feature branch.

## Step 2: Commit

If there are staged changes, commit them.

1. Run `git log --format="%s" -n 20` to detect the repo's commit convention and match it.
2. If no clear convention exists, default to conventional commits with a scope, e.g. `feat(auth): add login endpoint`.
3. Always include a co-author trailer:
   ```
   Co-Authored-By: Claude <noreply@anthropic.com>
   ```
4. Skip if nothing is staged.

## Step 3: Determine Base Branch

```bash
git config --local --get "branch.$(git branch --show-current).workmux-base" 2>/dev/null
```

If no base branch is configured, **STOP** and tell the user no base branch is set. Do NOT default to main.

**If the base branch is `main` or `master`, STOP** and tell the user: "Refusing to merge into main/master. Set a different base branch or use /pr instead."

## Step 4: Rebase

Rebase onto the local base branch (do NOT fetch from origin first):

```bash
git rebase <base-branch>
```

**IMPORTANT:** Do NOT run `git fetch`. Do NOT rebase onto `origin/<branch>`. Only rebase onto the local branch name.

If conflicts occur:
- BEFORE resolving any conflict, understand what changes were made to each conflicting file in the base branch
- For each conflicting file, run `git log -p -n 3 <base-branch> -- <file>` to see recent changes
- Preserve BOTH the base branch changes AND our branch's changes
- After resolving each conflict, stage the file and continue with `git rebase --continue`
- If a conflict is too complex or unclear, ask for guidance

## Step 5: Merge

Run: `workmux merge --rebase --notification`

Related Skills

requirements-merge

16
from diegosouzapw/awesome-omni-skill

Combines multiple requirement sources into a single coherent specification, handling conflicts and redundancies while maintaining source traceability and supporting stakeholder review workflows.

sos-emergency

16
from diegosouzapw/awesome-omni-skill

Ship Operating System: Emergency Kubernetes cluster recovery, Talos reset procedures, Synology Container Manager recovery, and graceful shutdown protocols. Trigger with /sos

emergency-distress-signal

16
from diegosouzapw/awesome-omni-skill

紧急求救 - 飞船坠毁后与Stella的首次联系,帮助她评估损伤并制定初步生存计划

pr-merge-recompile

16
from diegosouzapw/awesome-omni-skill

Checkout a PR, merge origin/main, regenerate agentic workflows, and push. Use when: (1) A PR needs to be rebased and workflows recompiled, (2) User provides a PR URL and wants to update it with latest main, (3) User says 'recompile PR' or 'update PR workflows'.

git-pr-merge

16
from diegosouzapw/awesome-omni-skill

Conducts an audit of a Pull Request, merges it into main, and synchronizes the local environment. Use this skill when a PR is ready for final review and integration.

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

AI Safety Auditor

16
from diegosouzapw/awesome-omni-skill

Audit AI systems for safety, bias, and responsible deployment

AI Risk Assessment

16
from diegosouzapw/awesome-omni-skill

Identifying, assessing, and mitigating risks in AI systems including bias, safety, privacy, security, and ethical concerns.

ai-governance

16
from diegosouzapw/awesome-omni-skill

AI governance and compliance guidance covering EU AI Act risk classification, NIST AI RMF, responsible AI principles, AI ethics review, and regulatory compliance for AI systems.

ai-doc-system-auditor

16
from diegosouzapw/awesome-omni-skill

No description provided.

agent-test-automator

16
from diegosouzapw/awesome-omni-skill

Expert test automation engineer specializing in building robust test frameworks, CI/CD integration, and comprehensive test coverage. Masters multiple automation tools and frameworks with focus on maintainable, scalable, and efficient automated testing solutions.

agent-security-manager

16
from diegosouzapw/awesome-omni-skill

Agent skill for security-manager - invoke with $agent-security-manager