Runs external LLM code reviews (OpenAI Codex or Google Gemini CLI) on uncommitted changes, branch diffs, or specific commits. Use when the user asks for a second opinion, external review, codex review, gemini review, or mentions /second-opinion.
git-cleanup
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).
Installation
Add git-cleanup to your agent with:
/plugin marketplace add trailofbits/skills Always review a skill's source before installing it. This command comes from the skill's public repository; the linked repo is the source of truth for exact setup steps.
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
When to use it
Reach for git-cleanup when you want productivity help from your agent without writing the same instructions every session. Load the skill and the agent picks it up automatically for relevant tasks.
Strengths
- Clear CC-BY-SA-4.0 license — safe to read and adapt
- Ships in trailofbits/skills, an established project with 6,646 GitHub stars
- Actively maintained (recent commits)
Topics
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.
- 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.
Related skills
More Productivity →Iteratively reviews and fixes Claude Code skill quality issues until they meet standards. Runs automated fix-review cycles using the skill-reviewer agent. Use to fix skill quality issues, improve skill descriptions, run automated skill review loops, or iteratively refine a skill. Triggers on 'fix my skill', 'improve skill quality', 'skill improvement loop'. NOT for one-time reviews—use /skill-reviewer directly.
Prepare and publish DeepChat releases in this repository. Use when Codex needs to bump the app version, update CHANGELOG.md, keep release notes bilingual from v1.0.1 onward with English bullets first and Chinese bullets second, run release checks, create or update versioned release branches such as release/v1.0.1, continue a half-finished release, fast-forward main with the documented release flow, create or push version tags, or clean up release branches after publishing.
Comprehensive code review assistant that analyzes code quality, security, and best practices
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks