From tsc-error-triage
Diagnose and resolve TypeScript compiler errors by finding the smallest root-cause fix before editing call sites.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tsc-error-triage:tsc-error-triageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- The user asks you to fix TypeScript compiler errors or strict-mode regressions.
tsc failures.tsconfig hardening or module-resolution changes have already been made and the next task is fixing the resulting compiler errors in root-cause order.Never patch leaf errors when a shared root cause is unresolved.
Fix the first causal error in the chain — broken export, generic constraint, config mismatch — before touching downstream call sites. One root-cause fix can collapse dozens of leaf errors.
Required before editing
tsconfig chain for the failing files.Helpful if present
@ts-expect-error or wrapper helpers.tsc --noEmit for a single-project setup or tsc -b for a project-references setup as the safest fallback.any, @ts-ignore, or unsafe assertions unless the repository already documents that escape hatch.tsconfig-hardening when first causal failures point to compiler configuration, project references, or module-resolution drift rather than source typings.project-references-migration when the main issue is an incomplete or inconsistent tsc -b / composite workspace migration.type-test-authoring only after compiler stability is restored and you need compile-time regression locks.Re-run the same typecheck command and confirm the targeted errors are gone.
Check that no new class of compiler error was introduced nearby.
Run targeted tests for the touched surface when the repository has them.
Keep references/triage-scenarios.md in sync when a new root-cause pattern or noisy downstream failure shape becomes common.
Smoke test:
tsconfig-hardening)tsc --noEmit reports:
src/use.ts(8,12): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
src/index.ts(3,1): error TS2305: Module '"./api"' has no exported member 'makeId'.
Fix the missing export or shared generic first; the argument errors are downstream noise.High-fanout fix
export function parseId(value: string | undefined): string {
if (!value) throw new Error('missing id');
return value;
}
One shared helper like this can collapse dozens of leaf errors once its return type is truthful.Before
export const toId = (value) => value.toString();
After
export const toId = (value: string | number) => value.toString();
references/error-patterns.md - common compiler error families, likely root causes, and preferred first checks.references/triage-scenarios.md - compact scenario matrix for root-cause-first compiler triage.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub matt-riley/lucky-hat --plugin tsc-error-triage