cleanup
Skill4 starsChanged 16 days agoApache-2.0View on GitHub
List local branches that are already merged and stale worktree records across all tracked repositories, then delete only what the user approves. Run only when the user explicitly asks to clean up branches.
84 other projects use a version of this.
Adopted by
Most recently taken up by
- udecode/ustacktheir own version, first seen Nov 29, 2026
- Integralist/agent-skillstheir own version, first seen Nov 26, 2026
- SleepyStew/mstacktheir own version, first seen Nov 22, 2026
- ma-serra/claude-skillsjtheir own version, first seen Nov 22, 2026
- yuan-ai-cloud/yuanliaofan-harnesstheir own version, first seen Nov 22, 2026
- alexeygrigorev/.agentstheir own version, first seen Nov 22, 2026
Used with
Projects with it also use you-might-not-need-a-callback, you-might-not-need-a-memo and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
bibektimilsina00Skillyou-might-not-need-a-callback
Analyze and fix useCallback anti-patterns in your code
Also in 3 projects that use this
bibektimilsina00Skillyou-might-not-need-a-memo
Analyze and fix useMemo/React.memo anti-patterns in your code
Also in 3 projects that use this
Scylla23Skillredo
Re-run the last routed task one model tier up (haiku → sonnet → opus → fable). User-invoked escalation when the previous result missed. Pass --dry-run to preview without running.
Also in 3 projects that use this
SocialKit-APISkillvideo-transcripts
Extract transcripts from social videos through SocialKit across YouTube, TikTok, Instagram, Facebook, X/Twitter, LinkedIn, and direct video file URLs. Use when the user asks to transcribe, get captions or subtitles, pull the spoken text, or read what a video says, including one video or many at once. Returns full text plus timestamped segments. Not for posting, private accounts, or unrelated website scraping.
Also in 3 projects that use this
SentrySkilldb-migrate
Create database migrations using Drizzle Kit. Use when adding/modifying tables, columns, or indexes. Ensures schema.ts and migrations stay in sync.
Also in 3 projects that use this
AnasX7Skillimprove
Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on source code — never implements, fixes, or refactors anything itself. Use when asked to audit a codebase, find improvement opportunities (bugs, security, performance, test coverage, tech debt, migrations, DX), suggest features or where to take the project next (roadmap, product direction), or generate handoff plans for another agent to implement.
Also in 5 projects that use this
- +3 more from bibektimilsina00
Other versions84 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 84
- simstudioai/sim★ 30ksame name
- pipecat-ai/pipecat★ 18ksame name
- civitai/civitai★ 7.3ksame name
- mampfes/hacs_waste_collection_schedule★ 2.3ksame name
- trycompai/comp★ 2.2ksame name
- udecode/dotai★ 1.2ksame name
- udecode/ustack★ 1.2ksame name
- LedgerHQ/ledger-live★ 634same name
- ericboy0224/learn-docker-and-k8s★ 472same name
- udecode/better-convex★ 452same name
74 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 71 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
If no report appears above (only Claude Code runs that line), run the script once yourself and use its output: bash …
- Distinctive: line 28
Ask what to delete, one decision per repository and group ("merged", "squash-merged").
- Distinctive: line 34
Delete only branches listed under "Merged into the base" or "Squash-merged".
- Distinctive: line 36
Never delete the current branch, the base branch, a branch checked out in a worktree, or any remote branch.
“Common” is measured: kept by at least 6 in 10 of the 71 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
git-parity: cleanup
Report (already generated; nothing was deleted):
!bash "${CLAUDE_PLUGIN_ROOT}/scripts/git-parity.sh" cleanup $ARGUMENTS
If no report appears above (only Claude Code runs that line), run the script once yourself and use its output: bash <plugin-root>/scripts/git-parity.sh cleanup <arguments the user gave>, where <plugin-root> is two directories above this file.
On Windows the script needs a POSIX shell. When the repositories live in WSL, run this (the quoting is deliberate: write the script's Windows path with forward slashes, no backslashes and no inner quotes, because PowerShell strips the quotes and bash eats backslashes):
wsl.exe -d <distro> -- bash -c 'bash "$(wslpath -u <windows-path-with-forward-slashes>/scripts/git-parity.sh)" cleanup <arguments>'
Examples of the path: C:/Users/me/.codex/plugins/cache/git-parity/git-parity/<version> or //wsl.localhost/Ubuntu-24.04/home/me/project/.agents/plugins/git-parity. Otherwise use Git Bash. Do not reimplement the script in PowerShell, and do not edit line endings: the file already uses LF.
If the output ends with a "Setup" section or a "Note:" about the current repository, no list (or not this repository) is saved yet. After the report, tell the user in one or two sentences which groups were detected, ask about anything listed under "Ask the user about", and ask once whether to save. On a yes, run the printed add command(s) exactly; if a command fails, show it so the user can run it. Do not ask again in this session after a no.
What to do
- Show the report grouped as it is, translating prose to the user's language; keep names and commands verbatim. For long lists, show the count and the first few names, and offer the full list.
- Ask what to delete, one decision per repository and group ("merged", "squash-merged"). Every question needs at least two options (for example "delete" and "keep").
- For each approval, run exactly the printed command. To delete only some branches, run the same command with only those names.
- End with: deleted (count per repo), kept.
Hard rules
- Delete only branches listed under "Merged into the base" or "Squash-merged". The script verified those: the first group is fully contained in the base; the second has a deleted remote branch and a merged pull request.
- Branches under "merge NOT verified" get no command on purpose. Never delete them on your own. If the user insists, show
git log --oneline <base>..<branch>first so they see what would be lost, and ask again. - Never delete the current branch, the base branch, a branch checked out in a worktree, or any remote branch.
- A deleted branch can be restored from
git reflogfor a while; mention this once after deleting.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

