Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Typescript Modeling?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/andersseen-typescript-modeling)
---
name: typescript-modeling
description: Unions, readonly data, satisfies and generics. Use when defining or changing TypeScript types and domain models.
---
# TypeScript modeling
Use the type system to express relationships that matter at runtime.
## Shapes
Choose `type` or `interface` for local semantics and ecosystem fit, not dogma. Use discriminated
unions for variants and exhaustive switches where missing cases would be a bug.
## Contracts
Annotate exported APIs and external boundaries. Let inference handle obvious locals. Use `satisfies`
when a value should be checked against a contract without widening away useful literal information.
## Mutability and generics
Mark data `readonly` when mutation is not part of the contract. Use generics only when they express
a real relationship between inputs and outputs; avoid type puzzles that make maintenance harder.