Adonis0123/adonis-skills / skills/worktree-tidy
worktree-tidy
FlaggedFind and remove stale git worktrees across one or many repositories: prune records of worktrees whose folder is gone, report every linked worktree with its idle days, uncommitted changes and pull/merge request state (GitHub, cnb.cool, GitLab), and remove clean ones the user confirms (idle by default, with an explicit recent-only exception), keeping their branches unless the request is merged or closed. Use when the user asks, in any language, to clean up, list, audit or prune git worktrees, or when a sidebar such as Orca shows too many worktrees. Not for deleting branches without worktrees, cleaning build caches, or removing whole repositories.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.0 KB |
| agents/openai.yaml | config | 263 B |
| references/glossary.md | markdown | 1.9 KB |
| scripts/test_worktree_tidy.py | script | 27.9 KB |
| scripts/worktree_tidy.py | script | 30.6 KB |
references/glossary.md
View on GitHub# Glossary
Vocabulary for git worktrees and when they may be removed. Use these terms exactly in reports; avoid the listed synonyms.
**Repository**:
A git repository, identified by its main worktree (the folder whose `.git` is a directory).
_Avoid_: project, repo folder
**Worktree**:
An extra checkout of a Repository (a git linked worktree). It belongs to its Repository and is never a Repository of its own.
_Avoid_: sub-project, branch folder, clone
**Activity**:
The newest of: the last commit, the last checkout or commit recorded in the worktree's HEAD log, the modification time of any uncommitted file, and the last activity a tool (Orca) recorded. Opening a folder or running `git status` is not Activity.
_Avoid_: last used, last opened
**Stale worktree**:
A Worktree with no Activity for the threshold (default 7 days), no uncommitted changes or non-regenerable ignored files, not locked, not pinned in a tool, and whose HEAD is reachable from some ref. Only Stale worktrees are removed by default. For explicit hand-removal, `--allow-recent` also permits a Worktree whose only Blocker is `recent`; it does not make that Worktree Stale. All other Blockers, re-checks before removal, and branch deletion rules still apply.
_Avoid_: expired, dead, abandoned
**Blocker**:
A reason a Worktree is kept: `main`, `locked`, `missing`, `unreadable`, `dirty`, `ignored` (non-regenerable ignored paths), `pinned`, `unsaved-head` (detached HEAD on no ref), `recent`.
_Avoid_: error, warning
**Request**:
The pull or merge request for a Worktree's branch on its host (GitHub, cnb.cool, GitLab), with state `open`, `merged`, `closed`, `none` (no request) or `unknown` (the host could not be asked).
_Avoid_: PR status, MR status
**Prune**:
Dropping git's record of a Worktree whose folder no longer exists. It never touches a folder that exists, so it runs on every scan.
_Avoid_: cleanup, gc
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |