agentsclimarketplace

Clean gone branches

Skill funsaized/claude-and-codex-settings/plugins/github-dev/skills/clean-gone-branches

This 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".From its SKILL.md

Install
npx -y skills add funsaized/claude-and-codex-settings --skill clean-gone-branches

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 3 commands, including `git fetch --prune` and 2 more.

SKILL.md

0.9 KB, 173 tokens by cl100k_base, as published. Nobody here has run it

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.

Keep looking

Skills are one crate of 608,666. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.