retrofitlisted
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