repo-hygiene
Skill3 starsChanged 24 days agoMITView on GitHub
Read-only git/GitHub hygiene check for a repo - dev vs main drift, unmerged and dead branches (incl. squash-merged), merge conflicts per branch via side-effect-free git merge-tree, open PRs and failing GitHub Actions. Use when asked for a codehygiene check, repo health, "is alles gemerged", "loopt dev goed t.o.v. main", "dode branches opruimen", "zijn er merge conflicts", "falen de actions", stale branches or branch cleanup.
- Commits and pushes
15 other projects use a version of this.
Adopted by
Most recently taken up by
- Smaui94/ClaudeSkillCollectiontheir own version, first seen Nov 8, 2026
- yunsii/wezdecktheir own version, first seen Oct 25, 2026
- arndvs/ctrlshfttheir own version, first seen Oct 15, 2026
- talas9/anti-halltheir own version, first seen Oct 13, 2026
- Donemeb/Donemeb-Skillstheir own version, first seen Oct 13, 2026
- baseballyama/rsveltetheir own version, first seen Oct 9, 2026
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★ 249same name
- marcfargas/skills★ 4same name
- marcoguillermaz/Tierward★ 4same name
- yunsii/wezdeck★ 4same name
- rikvanriel/code-hygiene★ 2same name
- talas9/anti-hall★ 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 repository51 other files it gives its agents.
- guidelines/CLAUDE.mdCLAUDE.md
- animate-expoSkill
- animateSkill
- animation-vocabularySkill
- apple-designSkill
- ask-sonnerSkill
- batch-grill-meSkill
- bi-dashboardsSkill
- bouw-loopSkill
- brandkitSkill
- code-auditSkill
- commit-disciplineSkill
- councilSkill
- createlooppromptSkill
- data-visualizationSkill
- design-taste-frontendSkill
- diagram-designSkill
- dicht-loopSkill
- e2e-rulesSkill
- e2eSkill
- emil-design-engSkill
- find-animation-opportunitiesSkill
- find-bugsSkill
- fixing-accessibilitySkill
- fix-loopSkill
- frontend-gotchasSkill
- goalSkill
- improve-animationsSkill
- keten-loopSkill
- make-interfaces-feel-betterSkill
- mobile-nativeSkill
- office-docsSkill
- pick-ui-librarySkill
- polijst-loopSkill
- polpohire-designSkill
- pre-pr-gatesSkill
- projectstructuurSkill
- prototypeSkill
- readmeSkill
- reaSkill
- redesign-existing-projectsSkill
- render-proofSkill
- review-animationsSkill
- skill-finderSkill
- speur-loopSkill
- supergoalSkill
- systematic-debuggingSkill
- theme-selectorSkill
- transitions-devSkill
- ux-heuristicsSkill
- waak-loopSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Only side effect: git fetch --prune (updates remote-tracking refs).
- Distinctive: line 32
Run the script on the repo.
- Distinctive: line 46
Never delete protected branches or a branch with an open PR.
“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
One deterministic script gathers everything; you interpret and propose cleanup. Nothing is deleted or merged without explicit per-action approval.
Quick start
~/.claude/skills/repo-hygiene/scripts/hygiene.sh <repo-path>Env overrides: MAIN=main DEV=dev STALE_DAYS=30 PROTECT_RE='^(main|dev|release/.*)$'.
Auto-detect: main = origin/HEAD; dev = first of dev, develop, development, acceptance, staging.
What it checks
- dev vs main: commits ahead/behind both ways, plus a dry-run merge dev -> main. main ahead of dev = hotfix not back-merged.
- Remote branches:
DEAD (gemerged)= ancestor of main/dev;DEAD (PR gemerged, squash)= head of a merged PR with no open PR;STALE= unmerged and older than STALE_DAYS; conflict column =git merge-tree --write-treeagainst dev (or main). Exit 0 OK, 1 conflict, other = no merge-base (usually a branch from rewritten history). - Local branches: upstream gone, or already merged into main.
- Open PRs: base, mergeable state, draft.
- Actions: latest run per workflow on main and dev, plus the last 20 failures anywhere.
Only side effect: git fetch --prune (updates remote-tracking refs).
Workflow
- Run the script on the repo. Long output: read it fully before summarising.
- Report as a short scorecard, worst first:
- FAIL: failing workflow on main/dev, dev -> main conflict, main ahead of dev.
- WARN: open PRs with CONFLICTING, stale unmerged branches with conflicts, PR stacks (PR whose base is another feature branch).
- Cleanup: count of DEAD remote branches + local branches that can go.
- For each failing Actions run, fetch the cause before reporting it:
gh run view <id> --log-failed | tail -40. Report cause + fix, not just "failed". - Propose cleanup as ready-to-run commands, grouped, and ask before running:
STALE branches with unique commits: list them, ask per branch (merge, rebase or delete). Never delete protected branches or a branch with an open PR.git push origin --delete <branch> <branch> ... git branch -D <branch> ... - Merge conflicts: resolve them one branch at a time.
Gotchas
voor op basefor a squash-merged branch is high but meaningless; the PR check is what counts.? (geen merge-base): branch predates a history rewrite; almost always safe to delete after confirming its PR is closed.- Without
ghauth or a GitHub remote, sections 4-5 and squash detection are skipped.
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.

