Apply Matt's TS patterns to an existing project
何時使用: Your project has anys and shrug-worthy types and you want a principled cleanup.
前置條件
- Skills installed — git clone https://github.com/mattpocock/skills ~/.claude/skills/mattpocock
步驟
-
ScanUse mattpocock/ts-review. Scan /src and list every
any, every unsafe cast, every type hole. Group by file.✓ 已複製→ Itemized findings, not a summary -
Fix with principlesFix the top 20, narrowest fix per case. Respect Matt's "prefer inference" rule — don't explicit-annotate what TS can infer.✓ 已複製→ Minimal diffs, type-safety gained
-
CheckRun
tsc --noEmit. Any regressions?✓ 已複製→ Clean compile or precisely-scoped remaining items
結果: A measurably more type-safe codebase following a principled methodology.
注意事項
- Skill applies Matt's opinions where your team disagrees (e.g. interface vs type) — Override with "skip the interface-vs-type conversion, keep existing style"