TypeScript skill

Static types are not runtime contracts.

Use this skill where TypeScript is green but external data, casts, duplicated state, or UI logic still make the next change risky.

The Job

The TypeScript skill reviews the gap between compile-time confidence and runtime truth. It looks for casts, trusted external data, state drift, UI-owned business rules, and tests that only prove mocks.

Run it on:

API edges, React state changes, auth and billing flows, cache logic, schema migrations, and build config changes.

Signals

Unsafe casts

any, unknown as, non-null assertions, and double casts that silence uncertainty instead of narrowing it.

Trusted runtime data

API responses, local storage, URLs, events, and feature flags used as if TypeScript had seen them at runtime.

State drift

One fact split across component state, stores, cache, URL params, and server state without a clear owner.

UI-owned business rules

React components deciding permissions, billing states, workflow transitions, or validation without a boundary.

Example Findings

P1 API trust leak

The checkout flow casts a gateway response and branches on fields that may not exist.

P2 duplicated selected team

Team identity lives in URL, store, cache key, and component state with no single source of truth.

P2 mock-only coverage

The test proves the hook called the client. It never proves request shape, error mapping, or retry behavior.

Review Prompt

Review this diff with the Vølven TypeScript debt skill.
Focus on unsafe casts, trusted runtime data, duplicated state,
React-owned business rules, mocked tests, and build config drift.
Ignore ESLint, tsc, Prettier, and framework-check duplicates.
Findings first. Include smallest useful fix.