cleanup

Identify and delete outdated git worktrees and branches.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/tokyo-megacorp/autoimprove --skill cleanup-tokyo-megacorp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cleanup
Source: https://github.com/tokyo-megacorp/autoimprove/tree/main/skills/cleanup
Command: npx skills add https://github.com/tokyo-megacorp/autoimprove --skill cleanup-tokyo-megacorp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bash, git, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps manually identify and delete outdated or unused git worktrees and branches, preventing clutter and potential conflicts in your repository.

Core Features & Use Cases

  • Worktree and Branch Cleanup: Detects and removes orphaned worktrees and stale branches that are no longer related to active experiments or development.
  • Repository Hygiene: Ensures that the project workspace remains tidy by safely pruning unneeded resources without affecting live experiments or protected branches.
  • Use Case: When performing routine maintenance, run this Skill to clean up temporary branches and worktrees generated during automated experiments or manual cleanup efforts.

Quick Start

Use the cleanup skill to preview and then remove obsolete worktrees and branches from your repository.

Frequently Asked Questions about cleanup

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

FAQPage Schema
How do I safely remove stale git worktrees and branches from my repository?

To clean up orphaned git worktrees and stale branches, you run bash scripts that identify outdated resources and safely delete them while protecting active or tagged items. This maintains repository hygiene by removing unneeded worktrees and branches generated during automated experiments or routine maintenance.

What is the best way to clean up orphaned git worktrees after automated experiments?

Cleaning up orphaned git worktrees after automated experiments involves detecting temporary worktrees and stale branches no longer tied to active development. This Skill runs bash and git commands to identify and remove those redundant resources, ensuring your project workspace remains tidy and preventing potential conflicts.

Do I need bash to prune outdated git branches and worktrees?

Yes, you need bash and git installed to prune outdated git branches and worktrees. This Skill relies on bash scripts and git commands to execute the cleanup operations, safely identifying and deleting obsolete worktrees and stale branches while preserving protected items in your repository.

Does the cleanup process protect active branches and tagged items from being deleted?

Yes, the git worktree and branch cleanup process protects active branches and tagged items from deletion. It identifies outdated resources while specifically safeguarding active or tagged items, ensuring that live experiments and protected branches remain unaffected during repository maintenance.

What happens to my repository if I never remove unused git worktrees?

If you never remove unused git worktrees, your repository accumulates clutter and faces potential conflicts from orphaned resources. This Skill prevents clutter by safely identifying and deleting outdated worktrees and stale branches, maintaining workspace hygiene and removing redundant resources from temporary experiments.