Claude Cursor Skill

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".

LLM Mart · 0 points · 7 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download fcakyon-claude-codex-settings-plugins_github-dev_skills_clean-gone-branches-4632eb3.zip · 0 KB
Part of fcakyon/claude-codex-settings — 83 skills

Install

skills CLI npx skills add https://github.com/fcakyon/claude-codex-settings/tree/main/plugins/github-dev/skills/clean-gone-branches
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install fcakyon-claude-codex-settings@llmmart
Git git clone https://github.com/fcakyon/claude-codex-settings.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole fcakyon/claude-codex-settings collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

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.
Files (claude-codex-settings)
  • SKILL.md 945 B
    ---
    name: clean-gone-branches
    description: 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".
    ---
    
    # 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.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related