alexeygrigorev/.agents/cleanup

Claude Code and agent skill by alexeygrigorev/.agents

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Reclaim disk and de-clutter git repos by finding and removing merged git worktrees, their now-merged local branches, and plain scratch dirs (`.tmp` logs/run output/caches that aren't worktrees). Use when the disk is filling up, when `git worktree list` / `git branch` are bloated with stale agent or task worktrees (`agent-*`, `tester-*`, `issue-*`), or when asked to "clean up git" / free space. Full procedure is in worktrees.md.

Install

npx vskill@latest install alexeygrigorev/.agents/cleanup

SKILL.md

Cleanup

Removes merged git worktrees and their merged branches to reclaim disk and de-clutter branch lists. Built for repos that accumulate dozens of throwaway worktrees from coding agents. Safe because merged work is already reachable from the default branch.

Golden rules

  • Only remove worktrees whose work is committed AND merged into the default branch

(origin/<default>, usually origin/main). Both conditions, always.

  • Never discard uncommitted changes — never pass `--force`. A worktree with

uncommitted local edits is "dirty": leave it alone. Uncommitted edits are not stored by git, cannot be recovered once deleted, and may well be valuable. This is the hardest rule here.

  • Always use `git worktree remove`, never `rm -rf`. rm -rf leaves dangling

worktree registrations and stale branch refs; git worktree remove cleans both.

  • Deleting a merged branch is lossless — its commits already live in the default

branch.

Reference

  • [worktrees.md](worktrees.md) — copy-pasteable procedure: find the space hogs,

list every worktree, classify each entry as a worktree (merged/unmerged/dirty) or plain scratch, remove only clean+merged worktrees (never dirty) and stale scratch (keeping caches/content/notes), prune stale entries, then delete the merged branches.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/alexeygrigorev/.agents/cleanup/badge)](https://verified-skill.com/skills/alexeygrigorev/.agents/cleanup)

Something wrong with this skill or its page? Tell us.