cleanup

Automates cleanup of Git worktrees, branches, and epics with dry-run option.

1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/kelsi-andrewss/claude-multi-agent-pipeline --skill cleanup-kelsi-andrewss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cleanup
Source: https://github.com/kelsi-andrewss/claude-multi-agent-pipeline/tree/main/skills/cleanup
Command: npx skills add https://github.com/kelsi-andrewss/claude-multi-agent-pipeline --skill cleanup-kelsi-andrewss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Archive completed stories or epics by ID, delete merged git branches, and prune stale worktrees to keep the project history clean and reduce drift.

Core Features & Use Cases

  • Archive specific stories by ID to mark them done and remove their worktrees;
  • Close epics and prune associated development branches to maintain repo hygiene;
  • Prune stale worktrees and cleaned up refs to prevent clutter in local and remote repos.

Quick Start

Call /cleanup with your target tokens (story-NNN, epic-NNN, git, or all) to execute the cleanup workflow.

Frequently Asked Questions about cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate git worktree cleanup and branch deletion after merging?

Automating git worktree cleanup removes stale development branches and worktrees after merging by targeting specific story or epic IDs to safely transition states and delete remote branches. You can execute bulk operations or target individual items.

What is the best way to archive completed stories and close epics in git?

Archiving completed stories and closing epics is best handled by targeting specific IDs like story-NNN or epic-NNN, which marks them done, prunes associated worktrees, and removes merged branches to maintain repository hygiene and reduce drift.

Can I run a dry-run before deleting remote git branches and worktrees?

Yes, you can run a dry-run status to preview the cleanup workflow. This allows you to verify which stale worktrees, stories, and epics will be targeted before any actual state transitions or remote branch deletions occur.

How do I clean up in-progress worktrees without losing uncommitted changes?

Cleaning up in-progress worktrees triggers prompts for items containing uncommitted changes, ensuring safe state transitions. This prevents accidental data loss during the pruning of stale worktrees, branches, and completed stories.

Does this cleanup automation support bulk pruning of all stale branches and epics?

Yes, the cleanup automation supports bulk operations by using the 'all' token, executing the full workflow to archive stories, close epics, and prune every stale worktree and merged branch across the repository in one action.