/house-rules:housekeepfrom house-rules
Scans every hygiene lens (AI slop, dead code, dependency rot, lint/type suppressions, stale docs, house-rules violations), presents one prioritized HTML report, then fixes the findings you pick. Triggers on: deslop, anti-slop, ai slop, cleanup, tidy, housekeep, fix violations, house-rules fix.
Ships in house-rules. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Cleaning code defaults to adding. Each new helper accumulates the slop it was meant to cure. Prefer removing over adding. Consolidate before introducing utilities. Ask "can I remove this?" before asking "what should replace it?"
slop, deps, lint-debt, docs, conventions, house-rules)| id | lens | severity | effort | auto-fix | location | finding | fix |house-rules housekeep can fix itUse AskUserQuestion with multiSelect: true and question: "Which aspects should I scan?"
Options:
eslint-disable, @ts-ignore, # noqa, //nolint, #[allow], @Suppress, ...) and untyped TS any.gitmessage, PR template, .editorconfig, etc.) and contradictions with enforced behaviourSelected options map to lenses: "Code slop & dead code" → slop + house-rules; "Dependencies" → deps; "Lint & type suppressions" → lint-debt; "Stale docs" → docs; "Repo conventions" → conventions.
Skip this step if the invocation already names aspects or says "all". If nothing is selected, scan all lenses. The house-rules engine lens always runs regardless of selection.
If the user named an area, use it. Otherwise use the branch diff since the merge-base with the default branch, plus hot spots from git log --oneline over a recent stretch. If that surface is empty or scattered, widen to the whole repo. State the scope in one line.
Run house-rules check --all --format json (or scoped: --base <ref> or positional pathspecs matching step 2's scope) first; exit 1 means findings exist (not a crash), exit 2 means a usage or runtime error. Its findings go in as the house-rules lens with auto-fix marked. Then fan out Explore subagents in ONE message, one per chosen remaining lens. Each gets its reference file and the scope, returns Finding rows only, makes no edits. Skip a lens that has no surface (no dependency manifest → no deps; no docs → no docs) and record it in the report as "skipped: ". Inventory checks (the Orphaned entry point smell in the slop lens) always run repo-wide regardless of the hot-spot scope. Unchosen lenses appear in the report header as "not scanned (not selected)".
Reference files: slop → reference/deslop.md, deps → reference/deps.md, lint-debt → reference/lint-debt.md, docs → reference/docs-staleness.md, conventions → reference/conventions.md.
Merge duplicate findings (same location, same issue) across lenses. Assign ids F1..Fn in priority order. Compute tiers.
Write a self-contained HTML file to <tmpdir>/housekeep-<timestamp>.html ($TMPDIR, falling back to /tmp) so nothing lands in the repo. Open it (xdg-open / open / start) and print the absolute path. Also print a compact terminal table of the Fix now tier plus quick wins (id, tier, one-line finding). See HTML-REPORT.md. Do not fix anything yet. Ask: "Which findings should I fix? Reply with ids, a tier (e.g. fix now), or quick wins."
Accepted findings only. Lock behaviour with the narrowest regression tests before editing. Preview with house-rules housekeep --dry-run --diff before applying. Send auto-fix findings to house-rules housekeep --rules <ids> --paths <globs>. Exit 1 means error findings remain unfixed; report those as deferred, not a crash. For the rest, write a cleanup plan ordered from safest deletion to riskiest consolidation, using each lens file's pass guidance. For large sets, fan out pstack:poteto-agent delegates (≤2 files each). After each pass, run that lens's quality gate.
--rules <a,b> — limit to specific rule IDs--paths <glob,...> — restrict to files matching glob(s)--since <ref> — override the base git ref--baseline — target entries in .house-rules/baseline.json instead of the diff scope; fixed entries pruned from the file after a real (non---dry-run) run--max <n> — cap auto-fixes applied; unfixed findings are reported with --max limit reached--dry-run — run the fix in memory, write nothing; each entry shows a [dry-run] prefix (text mode)--diff — print a unified diff of each fixed file (text mode)--all — scan all repo files, not just the diff--format json — machine-readable outputUntracked scratch files are listed under "Untracked strays (not blocking)" in text mode and do not affect exit code.
Print a final terminal report: scope, fixed (file + change), deferred/skipped findings with reasons (never dropped silently), quality gates PASS/FAIL, remaining risks. Completion: a fresh reviewer subagent that sees only the diff and the accepted findings returns APPROVE; REVISE/REJECT blocks completion.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
2 skills in this plugin
npx claudepluginhub inizio/groundwork --plugin house-rules