repo-hygiene
Skill2 starsChanged 46 days agoMITView on GitHub
Dev-only, anti-hall repo (not part of the shipped plugin). Use before pushing, at release boundaries, or when git misbehaves - sweep merged branches and worktrees, clear a stale .git/index.lock safely, scrub private data from the public repo, run the docs-link hygiene tests.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- Smaui94/ClaudeSkillCollectiontheir own version, first seen Nov 8, 2026
- robinbril/claude-code-harnesstheir own version, first seen Nov 1, 2026
- yunsii/wezdecktheir own version, first seen Oct 25, 2026
- arndvs/ctrlshfttheir own version, first seen Oct 15, 2026
- Donemeb/Donemeb-Skillstheir own version, first seen Oct 13, 2026
- baseballyama/rsveltetheir own version, first seen Oct 9, 2026
Used with
Projects with it also use systematic-debugging.
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.
OpenAISkillsystematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- baseballyama/rsvelte★ 252same name
- marcfargas/skills★ 4same name
- marcoguillermaz/Tierward★ 4same name
- yunsii/wezdeck★ 4same name
- robinbril/claude-code-harness★ 3same name
- rikvanriel/code-hygiene★ 2same name
- Asher-Plihal/claude-skills★ 1same name
- jedarden/jeds-curated-skills★ 1same name
- SamuelNDCE/ai-workbench★ 1same name
- SamuelNDCE/claude-super-skill-library★ 1same name
5 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.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- dogfoodSkill
- engine-debugSkill
- engine-laneSkill
- gh-workSkill
- releaseSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Remove a worktree only when its branch is merged (or its commits are on dev) and git -C <dir> status --short is empty: git worktree remove …
- Very specific: line 42
No holder, no git process for this repo, and the lock is older than a minute: rm "$L" once, then retry.
- Very specific: line 54
Every hit must be either the author credit, a documented example (user@example.com), a generic path (~/.anti-hall, $HOME), or removed.
“Common” is measured: kept by at least 6 in 10 of the 14 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
repo-hygiene
The repo is public and many sessions share one machine. Keep it clean, never lose work. Deletion of anything not provably merged needs the owner's OK.
1. Branches and worktrees
git fetch --prune origin
git worktree list
git branch -vv # local branches and their upstreams
git branch -r --merged origin/dev # remote branches already in dev- Remove a worktree only when its branch is merged (or its commits are on
dev) andgit -C <dir> status --shortis empty:git worktree remove <dir>, thengit worktree prune. --mergedmisses cherry-picked work. Before deleting a branch, provedevholds a content superset:git cherry -v origin/dev <branch>prints no+lines (or every+commit's change is ondev). Thengit branch -d <branch>(lower-case-d; never-Dwithout the owner).- Remote branches: delete only merged work branches you created; never
dev,mainor the long-lived engine branches (the "work branches" ruleset blocks it anyway). Never force push. - Scratch clones under
~/.anti-hall/work/: deletetarget/dirs once their patch is handed over; keep an eye on free disk.
2. Stale .git/index.lock
fatal: Unable to create '.git/index.lock': File exists usually means another git process is
running. Remove the lock only after proving nobody holds it:
L=$(git rev-parse --git-path index.lock) # correct for worktrees and submodules
ls -l "$L"
lsof "$L" # any output = a live holder: wait, do not remove
pgrep -fl '(^|/)git( |$)' # running git commandsNo holder, no git process for this repo, and the lock is older than a minute: rm "$L" once,
then retry. A lock that keeps coming back is a bug signal (log it per the dogfood skill).
3. Public-repo agnostic scrub (before every push)
Shipped and tracked files carry no private data: no home paths, emails other than the author credit, machine names, session ids, or other projects' names. Scan what is about to leave:
git diff origin/dev...HEAD -U0 | grep '^+' | grep -nE '/Users/|/home/[a-z]|C:\\\\Users|[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[a-z]{2,}|session_[0-9A-Za-z]{8,}'Every hit must be either the author credit, a documented example (user@example.com), a
generic path (~/.anti-hall, $HOME), or removed. Also grep the diff for the names of the
private projects you work on in other repos (keep that list local, never in the repo). Local
notes (CLAUDE.md at the root, .anti-hall/, handovers) are gitignored and stay out of commits:
git status --short --ignored before staging, and never git add -f them.
4. Docs-link and hygiene tests
node --test tests/hygiene/*.test.jsCovers docs links (docs-links, readme-doc-links, docs-coverage), manifest drift, plugin
frontmatter, tracked handovers, real-HOME leaks and more. A new docs/*.md must be linked the
way existing docs are (from both docs/README.md and docs/KB.md); fix the link, never the test. Run
the full node --test before pushing dev (pushes to dev run no CI).
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.

