Skip to content

Repo Hygiene

Chris Purcell edited this page Apr 7, 2026 · 1 revision

This page is auto-generated from the plugin's README. Do not edit directly — changes will be overwritten on the next sync.

Repo Hygiene

Autonomous maintenance sweep for any git repository.

Summary

/hygiene runs four parallel mechanical checks against the repository and Claude Code's local plugin state, then performs a three-phase semantic pass for Claude Code plugin marketplace repos. The plugin auto-detects the repository type. Safe corrections are applied without confirmation; destructive or ambiguous changes require explicit approval via a multi-select prompt. A --dry-run flag shows the full plan without touching anything.

Principles

[P1] Act on Intent: Invoking /hygiene is consent to a full sweep. It gates only on operations that are destructive or whose scope exceeds what a maintenance sweep implies.

[P2] Succeed Quietly, Fail Transparently: Scripts emit structured JSON. Individual fix-command failures are logged and skipped rather than aborting the whole sweep.

[P3] Scope Fidelity: Auto-fix is reserved for findings where the correct action is unambiguous. Everything with judgement involved surfaces for approval.

[P4] Safety by Construction: Orphan directory deletion is gated on three independent path checks enforced in the command itself, not just the script.

What It Checks

  1. .gitignore completeness — checks for missing patterns
  2. Marketplace JSON validation — trailing slashes, schema conformance
  3. Orphan detection — temp directories, dangling references
  4. Stale commits — uncommitted changes from prior sessions
  5. Plugin READMEs — placeholder detection, structure, cross-references
  6. Root README — plugin coverage completeness
  7. docs/ accuracy — broken paths, stale plugin references

Requirements

  • Claude Code
  • Python 3 (no external packages)
  • Must be run from within a git repository

Installation

/plugin marketplace add L3DigitalNet/Claude-Code-Plugins
/plugin install repo-hygiene@l3digitalnet-plugins

Usage

/hygiene           # full sweep with approval gates
/hygiene --dry-run # show plan without touching anything

Clone this wiki locally