/tslateman-skills:typescript-review [path or package to review, defaults to working-tree changes]from tslateman-skills
Review TypeScript code for agent-typical anti-patterns: as-any and double casts to silence tsc, ts-ignore without reason, non-null assertions, empty catch blocks, floating promises, untyped JSON at boundaries, eslint-disable suppression. Runs tsc and typescript-eslint with a targeted rule set, then judges each trigger with a type-design lens. Use when: reviewing agent-written TypeScript, before committing TS changes, or on "typescript review", "ts review", "review this typescript", "check for any abuse". For generic bug hunts use /code-review; for generic judgment use /vibe-check.
Ships in tslateman-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
TypeScript's type system is opt-out, so the agent-typical minimal edit
is an escape hatch: as any where the types disagree, ! where null
might flow, @ts-ignore where neither works. Each edit satisfies tsc
by telling it to stop looking; the runtime error the type was guarding
against still ships. This review hunts that debt class specifically.
Changed files:
!git diff --name-only HEAD 2>/dev/null | grep -E '\.(ts|tsx)$' || echo "(not a git repo or no changed .ts/.tsx files — review the given path instead)"
Review $ARGUMENTS if given; otherwise the changed .ts/.tsx files
above; otherwise ask which package. Read the scoped files fully before
judging — every finding needs the surrounding type flow, not just the
line.
npx tsc --noEmit
npx eslint . --rule '{"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/ban-ts-comment": "warn"}'
If the project has its own eslint config with typescript-eslint, run
that instead and say so. Check tsconfig.json first: if strict is
off (or strictNullChecks/noImplicitAny disabled), report that
before anything else — every finding below is masked by it.
Then grep the scoped files for triggers the tooling can't judge:
| Trigger | Suspicion |
|---|---|
as any / as unknown as | Type disagreement silenced — what does the real type say? |
@ts-ignore / @ts-expect-error without comment | Who silenced tsc, and is the reason written down? |
! non-null assertion | Proven non-null, or a strictNullChecks silencer? |
catch {} / catch (e) {} empty or log-only | Error swallowing — can the caller tell this failed? |
?. chains ending in ?? default | Legitimate optional, or undefined smeared past its origin? |
JSON.parse( / await res.json() unvalidated | Untyped data entering as a trusted type — wants a schema (zod) or type guard |
e.message.includes( | Error control flow by string match — wants error subclasses or discriminated unions |
eslint-disable | Same question as ts-ignore |
Promise without await/void/.catch | Floating promise — rejection disappears |
For each trigger hit, decide which of three buckets it belongs in — this is the review's actual work:
@ts-expect-error with a reason on a known library gap is not a
finding; ! right after an explicit check the narrower missed is
defensible.! with a narrowing check, add the
missing await, rethrow or surface the caught error.A repeated trigger is one finding, not many: five as any on the same
API response point at one unvalidated boundary.
Findings ordered by severity, each with file:line, the bucket, why it
matters in one sentence, and the suggested fix. Then a one-paragraph
verdict: do the types describe the data, or describe what tsc was told
to accept? End with the counts: N fine / N mechanical / N restructure.
If the user asks you to apply fixes, apply bucket 2 directly and run tsc, eslint, and the test suite after; bucket 3 gets a plan first.
as any, !, @ts-ignore, or eslint-disable as a
fix.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
61 skills in this plugin
/adrGenerate Architecture Decision Records that capture the reasoning behind technical decisions. Use when the user asks to "create an ADR", "document a decision", "record why we chose X", or discusses architectural trade-offs worth preserving./arenaSpawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape./automagic-problem-discoveryAudit a workspace for recurring friction, pick the highest-leverage one, and build the automation that removes it. Use when the user asks "what should I automate", "what's wasting my time", "find the friction in my workflow", wants a self-improvement pass over their own tooling, or runs this on a recurring loop./blast-radiusFind what a change could break somewhere else before it ships, beyond the diff, and prove the one fact it's safe because of by running real code instead of writing it up. Use for 'blast radius of X', 'what could this break', or reviewing a small diff you don't trust./brainstormThis skill should be used when the user asks to "brainstorm", "generate ideas", "ideate", "what are my options", "think of ways to", "explore possibilities", or wants divergent thinking on any topic. Also triggers on "what could we do about", "help me think through", or "creative options for"./broRe-explain the previous assistant message in a much simpler way — for when the reply made you go 'bro what'. Use /bro to get a plain-language version of the last answer.tslateman-skills@tslateman is listed by tslateman/claude-plugins — review the source before installing
npx claudepluginhub tslateman/claude-plugins --plugin tslateman-skills