agentleFS
gg-mogg-mo/repo-hygiene/CLAUDE.md

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…

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
  1. Distinctive:

    Update docs when you change public surface

    line 9
  2. Distinctive:

    Test what you ship

    line 10
  3. Distinctive:

    Verify before you commit

    line 11
  4. Very specific:

    Don't commit edits to skills that weren't tested.

    line 23
  5. Very specific:

    Update version in all of:

    line 47

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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:

  1. RED — baseline test. Dispatch a subagent with a representative scenario WITHOUT the skill loaded. Document what it does naturally.
  2. GREEN — write the skill. Address the specific failure modes you saw.
  3. 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 superpowers already 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

PlatformManifest
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 CLIgemini-extension.json + GEMINI.md
Copilot CLIReuses 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.json
  • gemini-extension.json
  • package.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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.