Back to directory

Cleanup Worktrees

Agent skill
1 skill

Remove git worktrees whose branches have already been merged into the default branch via a closed/merged GitHub pull request. Walks every worktree under the current repo, looks up each branch's merged PR with gh, surfaces uncommitted changes, unpushed commits, and untracked planning/spec docs, then asks the user before deleting anything. Optionally archives untracked Markdown notes into the main worktree and offers to delete the now-orphan local branch after the worktree is gone. Use this whenever the user asks to "clean up worktrees", "remove merged worktrees", "prune worktrees", "delete worktrees for merged PRs", "tidy worktrees", "garbage collect worktrees", "which worktrees can I delete", or any variation where they want to know what's safe to remove after PRs land. Strongly prefer this skill over hand-rolling git worktree list + ad-hoc gh pr list calls when the user wants a per-worktree action breakdown.

Install with
Claude CodeCodexCursorGitHub CopilotGemini CLI

Supported by the Atlas install prompt. Skill-specific requirements vary.

Skill stats

Skills1CategoryGeneralStars0

About this skill

Remove git worktrees whose branches have already been merged into the default branch via a closed/merged GitHub pull request. Walks every worktree under the current repo, looks up each branch's merged PR with gh, surfaces uncommitted changes, unpushed commits, and untracked planning/spec docs, then asks the user before deleting anything. Optionally archives untracked Markdown notes into the main worktree and offers to delete the now-orphan local branch after the worktree is gone. Use this whenever the user asks to "clean up worktrees", "remove merged worktrees", "prune worktrees", "delete worktrees for merged PRs", "tidy worktrees", "garbage collect worktrees", "which worktrees can I delete", or any variation where they want to know what's safe to remove after PRs land. Strongly prefer this skill over hand-rolling git worktree list + ad-hoc gh pr list calls when the user wants a per-worktree action breakdown.

Quick start

  1. Copy the install prompt. Use the green button above this README.
  2. Send it to your agent. Paste it into your coding agent’s chat and send.
  3. Review the setup. Your agent checks the skill’s instructions, requirements, and installation scope.
Review, license & listing details
Review the source before using this skill

This is an imported listing. We haven’t certified its safety, license, or compatibility. Skills may include executable scripts.

Automated security scan: Partial

Only SKILL.md was scanned. Supporting files and scripts were not checked. No safety grade has been assigned.

0 potential findings · Scanned 11/4/2026 · Scanner 0.2.1

Content SHA-256: 6fad9ccca7a3d1ae81bf658e101796abeb59c1d3aa2dc9dcfe6566a93875b6fb

About scan coverage and limitations

About this listing

Category
General
Reported license
MIT
Listing language (estimated)
English
Review status
Not individually reviewed
Agent compatibility
Atlas installation supports Claude Code, Codex, and Cursor. Skill-specific dependencies and features are checked during setup.
Cleanup Worktrees | Agent Skills Atlas