Overview
git-cleanup is an open-source productivity skill for Claude Code and compatible agents, published by trailofbits. Its author describes it as: “Safely analyzes and cleans up local git branches and worktrees by categorizing them as merged, squash-merged, superseded, or active work.”. The project has 6.6k stars on GitHub and is available under the CC-BY-SA-4.0 license. Add it to your setup with `/plugin marketplace add trailofbits/skills`.
What git-cleanup does
Safely clean up accumulated git worktrees and local branches by categorizing them into: safely deletable (merged), potentially related (similar themes), and active work (keep).
What’s inside
The SKILL.md for git-cleanup is organised into these sections:
- When to Use
- When NOT to Use
- Core Principle: SAFETY FIRST
- Critical Implementation Notes
- Squash-Merged Branches Require Force Delete
- Group Related Branches BEFORE Categorization
- Thorough PR History Investigation
- Workflow
- Phase 1: Comprehensive Analysis
- Phase 2: Group Related Branches
- Phase 3: Categorize Remaining Branches
- Phase 4: Dirty State Detection
Installation
Add git-cleanup to your agent with:
/plugin marketplace add trailofbits/skills Review a skill’s source before installing it — skills can instruct your agent to run commands. This command comes from the skill’s public repository, which is the source of truth for setup steps. New to skills? Read how to install Claude Code skills.
Supported agents
- Claude Code — ships a claude code plugin marketplace
License
git-cleanup is published under the CC-BY-SA-4.0 license.
Strengths
- Clear CC-BY-SA-4.0 license — safe to read and adapt within its terms
- Ships in trailofbits/skills, an established project with 6,646 GitHub stars
- Works with Claude Code
- Actively maintained — repository updated in the last 90 days
Author
Topics
Alternatives to git-cleanup
Similar skills from other repositories:
Compare git-cleanup alternatives side by side →
Frequently asked questions
- What does git-cleanup do?
- Safely analyzes and cleans up local git branches and worktrees by categorizing them as merged, squash-merged, superseded, or active work.
- How do I install git-cleanup?
- Run /plugin marketplace add trailofbits/skills in your agent, then reload your skills. Review the source at https://github.com/trailofbits/skills before installing.
- Is git-cleanup free to use?
- Yes. git-cleanup is free and open source under the CC-BY-SA-4.0 license, so you can read, run, and adapt it within that license's terms.
- Which agents does git-cleanup work with?
- git-cleanup lists Claude Code — named in its SKILL.md, its plugin marketplace or its repository topics. Skills use the portable SKILL.md format, so other agents that read that format may load it too.
- Where does git-cleanup come from?
- git-cleanup ships inside trailofbits/skills, a repository that contains 41 catalogued skills in total. The repository's 6,646 GitHub stars apply to that whole collection, not to this skill on its own.