task-cleanup

Community

Auto-clean task branches, reclaim resources.

Authorcowwoc
Version1.0.0
Installs0

System Documentation

What problem does it solve?

After a task is completed and merged, leftover task branches and Git worktrees clutter the repository and consume disk space. Manually cleaning these up is tedious and often forgotten. This Skill automates the safe removal of these artifacts, keeping your repository tidy and efficient.

Core Features & Use Cases

  • Worktree Removal: Safely removes all task-related Git worktrees, including agent-specific ones.
  • Branch Deletion: Deletes all task-related Git branches, preventing branch accumulation.
  • Audit Trail Preservation: Crucially, preserves the task directory containing task.json, task.md, and approval flags for future auditing.
  • State Transition: Updates the task's state to CLEANUP in task.json for accurate tracking.
  • Use Case: Once a task is fully complete and merged to main, invoke this Skill to automatically remove all associated branches and worktrees. This keeps your repository tidy, reclaims disk space, and ensures a clean development environment without manual effort.

Quick Start

After your task is in the 'COMPLETE' state, clean it up: cd /workspace/main /workspace/main/.claude/scripts/task-cleanup.sh "implement-formatter-api"

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: task-cleanup
Download link: https://github.com/cowwoc/styler/archive/main.zip#task-cleanup

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository