← ClaudeAtlas

retrofitlisted

Audit an existing repo against a profile and offer to fix what's drifted. TRIGGER when the user says "retrofit this repo", "fix this repo's hygiene", "bring this repo into compliance", "remediate drift", "fix what's drifted", "make this repo match the profile", "my repo is half set up, finish it", "I already have some hooks but they're incomplete", "fill in the gaps", "upgrade this repo to nyann standards", "apply the profile to this existing repo". ALSO trigger when doctor finishes with drift (exit 4 or 5) and the user says "fix it", "remediate", "yes fix those", "go ahead and fix". Do NOT trigger on "is this repo healthy" / "check hygiene" / "audit docs" — those are doctor (read-only). Do NOT trigger on "set up this project" from scratch — that's bootstrap-project.
thettwe/nyann · ★ 6 · Data & Documents · score 71
Install: claude install-skill thettwe/nyann
# retrofit Audit an existing repo's drift from a profile and remediate what's missing or misconfigured. This is the "fix it" counterpart to doctor's "tell me what's wrong." ## 1. Resolve the profile Same logic as doctor — the audit is only meaningful against an intended baseline: 1. Check if the repo's CLAUDE.md (inside `<!-- nyann:start -->` markers) declares an active profile name. 2. If the user passed `--profile <name>`, use that. 3. If neither, ask the user which profile to audit against. List available profiles (starters + any user/team profiles). Don't silently default — the wrong baseline produces misleading drift. Load via `bin/load-profile.sh <name>`. If exit 2 (not found), show the list the loader reports and ask again. ## 2. Run detection Run `bin/detect-stack.sh --path <target>` to get the StackDescriptor. This ensures the remediation step has stack context for gitignore templates, hook phases, and CLAUDE.md rendering. ## 3. Run the drift audit ``` bin/retrofit.sh --target <cwd> --profile <resolved-name> ``` **Do not pass `--report-only`** — that's doctor's flag. Retrofit's default mode renders the report AND offers remediation guidance. Pass `--json` only if the user explicitly asks for machine-readable output. ### 3a. Narrow scope (v1.7.0+) If the user said something like "only fix the docs drift", "leave my hooks alone", "just the gitignore", or otherwise wants to remediate one part of the audit without touching others, pass `--scope <csv