using-repo-hygiene
Skill3 starsChanged 7 months agoMITView on GitHub
Use when starting any conversation in a repo — establishes the repo-hygiene skill set and the moments each sub-skill applies
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cleaning-existing-codebaseSkill
- gating-commitsSkill
- keeping-docs-freshSkill
- keeping-files-smallSkill
- orienting-to-repoSkill
- testing-new-codeSkill
- writing-commit-messagesSkill
- writing-docstringsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
If you were dispatched as a subagent to execute a specific task, skip this skill.
- Distinctive: line 31
User instructions win: If the user says "skip the orientation," skip it.
- Very specific: line 32
Coordinate with peer skill sets: If superpowers:test-driven-development is already in play, testing-new-code is satisfied by that workflow.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<SUBAGENT-STOP>
If you were dispatched as a subagent to execute a specific task, skip this skill.
</SUBAGENT-STOP>Using Repo Hygiene
This plugin keeps a codebase healthy as you work in it. Each sub-skill triggers on a specific moment — invoke it then via the Skill tool.
Important override: This skill set INVERTS the usual "no comments unless WHY is non-obvious" default. In a repo using this plugin, docstrings on functions and file headers ARE expected. Quality matters (see repo-hygiene:writing-docstrings); silence does not.
Trigger Table
| When this happens | Invoke |
| Starting substantive work in a repo you don't already understand | repo-hygiene:orienting-to-repo |
| Writing or modifying a function, class, or source file | repo-hygiene:writing-docstrings |
| About to add lines to a file >400 lines, or your edit pushes one past that | repo-hygiene:keeping-files-small |
| Changing a public API (renamed export, new flag, new route, changed signature) | repo-hygiene:keeping-docs-fresh |
| Adding business logic, branching code, or fixing a bug | repo-hygiene:testing-new-code |
| Drafting any commit message | repo-hygiene:writing-commit-messages |
| User asks to commit, merge, or push | repo-hygiene:gating-commits |
| User asks to "clean up" or apply repo-hygiene to an existing codebase | repo-hygiene:cleaning-existing-codebase |
Priority
- User instructions win. If the user says "skip the orientation," skip it.
- Coordinate with peer skill sets. If
superpowers:test-driven-developmentis already in play,testing-new-codeis satisfied by that workflow. - Otherwise apply at the triggers above.
Bypass
A user can bypass a hygiene skill for one turn with #hygiene-skip <reason> in their message. Acknowledge the bypass and proceed.
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.

