regression-guardlisted
Install: claude install-skill fagemx/edda
# Regression Guard — Scan, Fix, Prevent
When you fix a bug or quality issue, don't just fix it — add automated prevention so it can never happen again. This skill follows a systematic approach: scan the entire codebase for a class of problems, classify findings, batch fix, then add tooling to prevent regression.
**Inspired by**: vm0 e7h4n's pattern — "修了就防回歸"
Your args are: `$ARGUMENTS`
Parse the args:
- `scan <category>` — Scan codebase for a specific problem category
- `guard <description>` — After fixing something, add regression prevention
- `audit` — Full audit across all categories
Categories: `type-safety`, `error-handling`, `security`, `testing`, `dead-code`, `performance`, `dependencies`
---
## Operation 1: Scan
Systematically scan the codebase for a class of problems, classify by severity, produce an actionable report.
### Step 1: Choose Scanning Tools
| Category | Tools |
|----------|-------|
| type-safety | `bun run lint`, `grep "as any\|@ts-ignore"` |
| error-handling | `grep "try.*catch"`, `grep "console.error"` |
| security | `grep "eval\|exec\|innerHTML"`, `grep "password\|secret\|token"` in non-.env |
| testing | `grep "\.skip\|\.only"`, `grep "setTimeout" in *.test.ts` |
| dead-code | `bun run knip`, `grep "// TODO\|// FIXME\|// HACK"` |
| performance | `grep "JSON.parse.*JSON.stringify"` (deep clone), `grep "\.forEach"` in hot paths |
| dependencies | `npm audit`, `bun run knip` |
### Step 2: Run Scans
Execute ALL relevant scans and collect raw