← ClaudeAtlas

repo-hygienelisted

Clean git clutter in this repo — remove merged and orphaned worktrees under .claude/worktrees/, delete stale merged local branches, and report merged-PR / closed-issue housekeeping. Read-only scan by default; destructive steps require an explicit --apply/typed yes and never touch GitHub or the worktree you're standing in. Use when worktrees or branches have piled up after merges.
noctua84/nescio-ai · ★ 0 · AI & Automation · score 73
Install: claude install-skill noctua84/nescio-ai
# /repo-hygiene Clean git clutter along three dimensions — leftover **worktrees** under `.claude/worktrees/`, **stale merged branches** with no worktree, and **GitHub housekeeping** (merged PRs with still-open issues) — driven by a read-only scan that runs first and mutates nothing. Nothing destructive happens without an explicit, typed human `yes`; the two scripts split the work so detection is always dry-run and removal is always guarded. Safety-first is the whole point: this skill would rather leave a candidate untouched than delete something a snapshot got wrong. ## When to use - After one or more PRs merge and the worktrees / branches they spawned pile up. - When `git worktree list` has grown long enough to be hard to read, and you can't tell at a glance which entries are safe to drop. - When an orphan directory lingers under `.claude/worktrees/` — a folder whose branch is gone, or whose worktree registration git no longer tracks. ## Run from a safe checkout You cannot remove the worktree you are standing in — git refuses, and so does this skill. Run it from the main checkout (e.g. `~/dev/your-repo`) or from any non-target worktree. The scan self-excludes the current worktree and its branch automatically, so it can never nominate the ground under your feet as a candidate. But standing in **main** is still the better habit: from there every sibling worktree is removable, and nothing you want cleaned gets silently skipped just because you happened to be inside it.