typescript-type-designlisted
Install: claude install-skill ValentinNikolaev/agent-skills
# TypeScript Type Design
Build the smallest type-level mechanism that expresses a required caller contract. Selected topics adapt wshobson's [typescript-advanced-types](https://github.com/wshobson/agents/blob/044b4b21f083948e69ec878a7b07c8d0951a6ffa/plugins/javascript-typescript/skills/typescript-advanced-types/SKILL.md), under the bundled `LICENSE.wshobson-agents`. Examples here are rewritten.
## Route precisely
- Use to implement or repair generic inference, conditional or mapped types, discriminated unions, branded domain types, declaration utilities, or compile-time consumer constraints.
- Use `api-and-interface-design` to decide the consumer-facing contract before implementation, `code-review` to inspect a changed implementation without edits, and `zod` to implement Zod runtime schemas.
- Use `vet-dependency` to select a validation library and `deprecation-and-migration` for a breaking public-contract rollout. Do not introduce advanced types merely because a project uses TypeScript.
## Establish the actual environment
Read repository instructions, owning package, compiler and supported consumer versions, effective tsconfig/project references, module/exports configuration, local type-test convention, and the relevant callers. Preserve unrelated work. Do not install dependencies, switch package managers, enable strictness flags, or replace module resolution without that change being in scope. In particular, `bundler` resolution is not a universal Node configuration.