Content
Command
/cleanup
Clean up local branches and stale references.
Install
$ npx -y skills add owainlewis/youtube-tutorials --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/cleanup
Context preview
What this command does when you run it.
Clean up local branches and stale references.
Command definition
cleanup.mdCleanup
Clean up local branches and stale references.
Instructions
1. Fetch and prune remote references: `git fetch --prune` 2. List all local branches: `git branch` 3. Identify branches that have been merged into main 4. Show the list and confirm before deleting anything 5. Delete confirmed branches: `git branch -d <branch>`
Rules
- Only delete branches that have been fully merged
- Use `-d` (safe delete), never `-D` (force delete) unless explicitly asked
- Never delete `main` or `develop`
- Show the full list of branches to delete and get confirmation first
- Report how many branches were cleaned up
Also check
- `git stash list` — remind the user if they have stashed work
- Any branches with unpushed commits — warn before suggesting deletion
Stats
409
Stars
84
Forks
Active
Maintenance
Python
Language
MIT
License
1mo ago
Last commit
10mo ago
Created
6h ago
Added
Other commands on youtube-tutorials.
Command
Command
Command
Command
Command
Command

