Skip to main content
skill CX Codex

git-merge-expert-worktree — Claude Code skill for isolated worktree merges

git-merge-expert-worktree — a Claude Code skill that runs merges and conflict resolution inside a dedicated git worktree. The main tree stays clean, and the skill handles its own cleanup when the operation finishes.

no license 159 installs ★ 5 updated 2026-08-31

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ulpi-io/skills --skill git-merge-expert-worktree -a claude-code
Open on GitHub

What git-merge-expert-worktree does

Also works in Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. It starts by listing current worktrees and figuring out where it is running. Then it either creates or reuses an isolated workspace for the task at hand.

Before any merge, rebase or cherry-pick, a backup tag is created. Validation follows: git status, conflict checks, build or test commands where the project needs them. Cleanup goes through git worktree remove and prune — never rm -rf.

There are hard rules. Non-session branches are never auto-deleted. Force-removing a dirty worktree requires explicit confirmation. The skill will not activate on its own; ask for a worktree merge specifically. For a standard in-place merge, this is the wrong tool.

What it helps with

  • merge a branch without touching the main tree
  • sort out conflicts in a separate checkout
  • recover from a broken merge by recreating the worktree
  • remove stale worktrees safely
  • verify a merge before pushing

Example prompts for the agent

  • Merge feature/payments into main inside a separate worktree
  • Resolve conflicts for release-2.1 in a worktree
  • Clean up stale worktrees and confirm main is untouched

How to install git-merge-expert-worktree

1Skills CLI (Vercel)

npx skills add ulpi-io/skills --skill git-merge-expert-worktree -a claude-code

2Manually: put the files in place

~/.claude/skills/git-merge-expert-worktree/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/git-merge-expert-worktree/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about git-merge-expert-worktree

How do I install git-merge-expert-worktree in Claude Code?

Run npx skills add ulpi-io/skills --skill git-merge-expert-worktree -a claude-code. The skill lands in ~/.claude/skills/git-merge-expert-worktree/SKILL.md.

How is this different from a regular merge?

Everything happens in a linked worktree, so the main checkout stays untouched until you decide to integrate. The skill never merges in the main tree when worktree isolation was requested.

Does it delete branches?

Only ephemeral session branches, and only after the work is done. User branches are never auto-deleted, and a dirty worktree needs explicit confirmation before force removal.

Similar skills

All skills for Git and GitHub →

From the same set49

The whole set →
update-claude-learnings The update-claude-learnings skill turns one confirmed observation about Claude Code into a project rule in CLAUDE.md. It checks placement and asks before changing persistent memory. CX Codex +1 162installs update-agent-learnings The update-agent-learnings skill turns one confirmed lesson from a session into lasting agent guidance and syncs it to relevant agent files. Use it when a behavior rule should carry over to future sessions. CX Codex +1 160installs map-project-monorepo map-project-monorepo builds self-contained CLAUDE.md files for every monorepo member and keeps the project root minimal. CX Codex +1 160installs commit Creates targeted git commits from working diffs, checks for secrets and conflict markers, and stages files individually by name. CX Codex +1 159installs create-pr create-pr opens a GitHub pull request from the real branch diff: commits pending work first, runs the narrowest checks, pushes, then creates and verifies the PR with gh. CX Codex +1 156installs update-skill-learnings update-skill-learnings captures one validated rule about skill design or quality in a central learnings file. Use it when a session reveals guidance worth keeping. CX Codex +1 155installs start start is a Claude Code skill that routes incoming tasks, selects domain skills, evaluates sub-agent delegation, and limits context exploration before code edits. CX Codex +1 152installs pr-retro The pr-retro skill measures a feature branch against its base and reports merge-readiness with recommendations. Run it before reviewing a PR. CX Codex +1 150installs

Project sponsors

Companies that keep this analytics open