clean-gone-branches
FeaturedThis skill should be used when user asks to "clean gone branches", "remove deleted local branches", "prune branches removed from remote", or explicitly invokes "clean-gone-branches".
AI & Automation 1,141 stars
108 forks Updated today Apache-2.0
Install
Quality Score: 91/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Clean Gone Branches
Remove local git branches that have been deleted from the remote.
## Process
1. **Update remote references**
- Run `git fetch --prune`.
2. **Inspect local state**
- Run `git branch -vv` to find branches marked as `[gone]`.
- Run `git worktree list` to see whether any of those branches still have worktrees.
3. **Remove worktrees first**
- For each `[gone]` branch that still has a worktree, remove the worktree before deleting the branch.
4. **Delete the gone branches**
- Delete each local branch marked as `[gone]`.
5. **Report the result**
- List removed worktrees and deleted branches.
- If there are no `[gone]` branches, report that nothing needed cleanup.
Details
- Author
- fcakyon
- Repository
- fcakyon/claude-codex-settings
- Created
- 1 years ago
- Last Updated
- today
- Language
- Python
- License
- Apache-2.0
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
clean-branches
Delete local branches whose remote has been deleted ([gone]), including their worktrees. Use for branch cleanup after merging PRs.
775 Updated today
kdlbs Code & Development Listed
clean-gone-branches
Remove local git branches whose configured upstream is marked [gone], including associated worktrees.
3 Updated today
dceoy AI & Automation Listed
gh-clean-branches
Prune stale local branches — detects branches whose remote is gone and merged feature branches still hanging around. Shows a combined list for confirmation before deleting anything.
0 Updated 1 weeks ago
seansmithworks