repo-hygiene
CLAUDE.md3 starsChanged 7 months agoMITView on GitHub
repo-hygiene is a small, opinionated skill set that keeps codebases healthy as coding agents work in them. It complements (does not replace) superpowers. Where superpowers provides workflow disciplines (brainstorming, TDD, debugging, planning), this plugin provides the lower-level hygiene that should hold across every change: Each skill is a separate file under skills/<name>/SKILL.md. The bootstrap (using-repo-hygiene) is injected at session start via the hooks/session-start hook on every supported harness. Skills are documentation that shapes agent behavior. Edits should be tested, not…
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cleaning-existing-codebaseSkill
- gating-commitsSkill
- keeping-docs-freshSkill
- keeping-files-smallSkill
- orienting-to-repoSkill
- testing-new-codeSkill
- using-repo-hygieneSkill
- writing-commit-messagesSkill
- writing-docstringsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Update docs when you change public surface
- Distinctive: line 10
Test what you ship
- Distinctive: line 11
Verify before you commit
- Very specific: line 23
Don't commit edits to skills that weren't tested.
- Very specific: line 47
Update version in all of:
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
Repo Hygiene — Contributor Guidelines
What this plugin is
repo-hygiene is a small, opinionated skill set that keeps codebases healthy as coding agents work in them. It complements (does not replace) superpowers. Where superpowers provides workflow disciplines (brainstorming, TDD, debugging, planning), this plugin provides the lower-level hygiene that should hold across every change:
- Orient before you edit
- Docstring what you write
- Update docs when you change public surface
- Test what you ship
- Verify before you commit
Each skill is a separate file under skills/<name>/SKILL.md. The bootstrap (using-repo-hygiene) is injected at session start via the hooks/session-start hook on every supported harness.
If you're editing a skill
Skills are documentation that shapes agent behavior. Edits should be tested, not just written:
- RED — baseline test. Dispatch a subagent with a representative scenario WITHOUT the skill loaded. Document what it does naturally.
- GREEN — write the skill. Address the specific failure modes you saw.
- REFACTOR — close loopholes. Dispatch again WITH the skill, look for rationalizations, plug them.
Don't commit edits to skills that weren't tested. See superpowers:writing-skills for the full methodology.
What does NOT belong in this plugin
- Skills tied to a specific language, framework, or product. Those go in their own plugin.
- Anything
superpowersalready does well. Don't reinvent TDD, brainstorming, or planning. - Hard rules that should be linter / CI checks. If a regex can enforce it, it doesn't need a skill.
- Personal preferences. Skills should generalize across users.
Plugin / platform plumbing
| Platform | Manifest |
| Claude Code | .claude-plugin/plugin.json + .claude-plugin/marketplace.json |
| Codex (CLI + App) | .codex-plugin/plugin.json |
| Cursor | .cursor-plugin/plugin.json + hooks/hooks-cursor.json |
| OpenCode | .opencode/plugins/repo-hygiene.js + package.json main field |
| Gemini CLI | gemini-extension.json + GEMINI.md |
| Copilot CLI | Reuses hooks/ (detects COPILOT_CLI=1 env var) |
The SessionStart hook (hooks/session-start) reads skills/using-repo-hygiene/SKILL.md and emits it as additionalContext to whichever harness invoked it. The shape of the JSON output is platform-dependent and detected at runtime.
Bumping the version
Update version in all of:
.claude-plugin/plugin.json.claude-plugin/marketplace.json(plugins[0].version).codex-plugin/plugin.json.cursor-plugin/plugin.jsongemini-extension.jsonpackage.json
Use semver.
Filing issues / PRs
- One problem per PR.
- For skill changes: include before/after subagent test transcripts. Untested skill edits will be reverted.
- For new skills: justify that the gap isn't covered by an existing skill (in this plugin or
superpowers). - For platform plumbing: include a session transcript from the affected harness showing the bootstrap loaded.
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.

