agentleFS
Marwan-Ahmed-devMarwan-Ahmed-dev/vibecode-pro-max/.agents/skills/vc-merge-worktree/SKILL.md

vc:merge-worktree

Skill0 starsChanged 4 months agoMITView on GitHub

Merge a git worktree branch back into the main checkout and clean up the worktree. Use when the user asks to merge, archive, or clean up a completed worktree.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for safe worktree merge and cleanup.

    line 12
  2. Distinctive:

    Run git status --short and stop if there are uncommitted changes.

    line 17
  3. Very specific:

    If merge succeeds, remove the worktree with git worktree remove <path>.

    line 22
  4. Very specific:

    Delete the local branch with git branch -d <branch>.

    line 23
  5. Distinctive:

    Never run from main or master.

    line 29
  6. Distinctive:

    Never delete a branch before a successful merge.

    line 30
  7. Distinctive:

    Stop on conflicts and explain the exact recovery state.

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Merge Worktree

Use this skill for safe worktree merge and cleanup. Skip RIPER-5 mode routing for this operational task.

Workflow

  1. Confirm the current path is a worktree, not the main checkout.
  2. Run git status --short and stop if there are uncommitted changes.
  3. Capture the current branch and worktree path.
  4. Locate the main checkout with git worktree list.
  5. Switch to the main checkout and update main if the user wants latest remote changes included.
  6. Merge the worktree branch into main.
  7. If merge succeeds, remove the worktree with git worktree remove <path>.
  8. Delete the local branch with git branch -d <branch>.
  9. Run git worktree prune.
  10. Report the merge result and whether a push is still needed.

Safety

  • Never run from main or master.
  • Never delete a branch before a successful merge.
  • Stop on conflicts and explain the exact recovery state.

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.