← ClaudeAtlas

repo-hygienelisted

Drives a long-running, incremental refactor of a messy codebase toward reusable layouts, extracted components, and clean structure. Use whenever the task involves auditing a repo for structural debt, planning the next step of a multi-week refactor, or generating a single well-scoped backlog issue for automated/nightly refactor runs. Also use it when asked to clean up huge monolithic pages, extract layouts or components, migrate page CSS to Tailwind, set up a repeating refactor workflow, or 'improve repo hygiene'. Stack-aware: dispatches to Astro, static-HTML, Worker-TS, or Python audits automatically. Trigger even if the user only says 'what should I clean up next' about a project.
arndvs/ctrlshft · ★ 0 · Web & Frontend · score 64
Install: claude install-skill arndvs/ctrlshft
# Repo Hygiene Turn a spaghetti codebase into a component-based, well-structured one, one mergeable issue at a time. This is the generalized successor to the Astro-only refactor pilot — it detects the stack and applies the matching audit and phase model. This skill runs in two modes: - **Audit mode** — measure the repo, report where it stands, propose the next task. Human reads it. - **Issue mode** — same analysis, but the output is exactly one GitHub issue, written for a *different* agent to execute later with no access to your reasoning. This is the mode the nightly cron uses. The output is always **one** task. Not a roadmap, not a batch. The whole design assumes a nightly cadence, so shipping one small correct thing beats proposing five. ## Core principle: the code is the state, the ledger is the memory Never trust `.refactor/state.json` about what the codebase looks like. It drifts the moment someone merges a hand-written PR. Instead: - **Ground truth about the code** comes from running `scripts/audit.mjs`, every single run, before deciding anything. - **The ledger** (`.refactor/state.json`) is only for things the code can't tell you: which tasks were rejected and why, which approaches were tried and reverted, which files are off-limits, the current phase. When the audit and the ledger disagree about progress, the audit wins and you update the ledger to match. Say so in your output — silent reconciliation hides the fact that someone did work outside the loop. ##