๐ŸŒฟ
DevOpsGo

Clean Branches

by kdlbs

Clean Branches is a DevOps skill for Claude Code, published by kdlbs in kandev.

679 stars95 forkson kdlbs/kandevAdded 2026/08/23+3% in starsRepository updated 2026/08/23
acpagent-orchestrationagentic-aiagentic-development-environmentai-agentsclaude-codecode-reviewcoding-agentsdeveloper-toolsgithub-copilotgolangkanbannextjsopen-sourceself-hostedtask-managertuivibe-codingworkflow-automationworktrees
Install in seconds
Install Clean Branches
Copy Clean Branches into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/kdlbs/kandev/tree/main/.agents/skills/clean-branches ~/.claude/skills/clean-branches

Requires Node.js. Downloads this skill only โ€” not the rest of the repository โ€” into your Claude Code skills folder.

Without Node.js

git clone https://github.com/kdlbs/kandev.git

Clones the whole repository, then copy the skillโ€™s own directory into your skills folder yourself.

In this catalog

Source file
.agents/skills/clean-branches/SKILL.md in kdlbs/kandev
Installs to
~/.claude/skills/clean-branches
Collection
One of 25 skills cataloged from this repository
Category
DevOps โ€” 798 skills

What Clean Branches does

Clean Branches removes local Git branches whose remote tracking refs are gone, including any associated worktrees. Use it after merges or PR cleanup to prune stale branches safely.

Clean Branches is cataloged under DevOps on DirSkills. Clean Branches comes from a repository tagged acp, agent-orchestration, agentic-ai, agentic-development-environment and ai-agents.

Documentation

README

Clean Branches

Remove local branches that have been deleted on the remote (marked [gone]), including any associated git worktrees.

Steps

  1. Fetch and prune remote refs:

    git fetch --prune
    
  2. List branches to identify [gone] status:

    git branch -v
    

    Branches with a + prefix have associated worktrees that must be removed before deletion.

  3. List worktrees for reference:

    git worktree list
    

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Clean Branches

  • What else does kdlbs publish alongside Clean Branches?

    Clean Branches is one of 25 skills that DirSkills catalogs from kdlbs/kandev, the repository it ships in. Its siblings there include ACP Debug, Add Integration and Code Review. Each one is a separate skill with its own page in this directory, installs the same way Clean Branches does, and is maintained by kdlbs in that same repository. The rest of the collection is listed on the kdlbs/kandev page.

  • How does Clean Branches compare to other DevOps skills?

    Clean Branches ranks #610 by stars among the 798 DevOps skills in this catalog. The most-starred ones next to it are Backend Patterns, API Connector Builder and Migration. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Clean Branches against them. Open each page to compare what they document and how they install.

More from kdlbs/kandev

Clean Branches is one of 25 skills cataloged on DirSkills from kdlbs/kandev.

See all 25 skills โ†’