lugassawan

Cleanup Merged — Git skill for Claude Code

Git community

Clean up worktree and local + remote branch for a merged PR.

How to install Cleanup Merged

Installs to ~/.claude/skills/lugassawan-swe-workbench-cleanup-merged/SKILL.md

Terminal
mkdir -p ~/.claude/skills/lugassawan-swe-workbench-cleanup-merged && curl -fsSL https://raw.githubusercontent.com/lugassawan/swe-workbench/HEAD/commands/cleanup-merged.md -o ~/.claude/skills/lugassawan-swe-workbench-cleanup-merged/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Cleanup Merged does


description: Clean up worktree and local + remote branch for a merged PR argument-hint: [PR number — optional, defaults to current branch]

Target: $ARGUMENTS (PR number if provided; otherwise derive from current branch)

Invoke `swe-workbench:workflow-cleanup-merged` to perform the full cleanup.

Pass the PR number from $ARGUMENTS to the skill if provided. If $ARGUMENTS is empty, the skill will derive the target branch from the current branch.

When the skill completes, print a summary

Alternatives in Git

  • Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
  • Local Review — You are tasked with setting up a local review environment for a colleague's branch 10k ★
  • Merge Command — Finalize worktree work: update docs, commit, merge to main, clean up 1.3k ★

Full documentation available on GitHub

View Source Repository