What problem does it solve? Weak type modeling lets contradictory states compile, hides unhandled variants, and pushes preventable failures to runtime. This Skill guides you to use the type checker as a proof assistant so invalid states, mismatched primitives, and missing cases are caught at compile time. ## Core Features & Use Cases - Sum Type Modeling: Replace bags of optional fields with discriminated unions, enums with payloads, or sealed classes so illegal combinations cannot be constructed. - Branded Primitives & Boundary Parsing: Distinguish semantic types like UserId from OrderId, and parse external data (JSON, RPC payloads, env vars) into typed models at every boundary. - Exhaustiveness & Schema Derivation: Enforce compiler-checked exhaustive matching and derive types from authoritative schemas like OpenAPI specs or protobuf definitions. - Use Case: While reviewing a TypeScript function that accepts { completed: boolean; completedAt?: Date }, apply this Skill to remodel it as { kind: 'open' } | { kind: 'done'; at: Date }, eliminating the meaningless completed: true with no date state. ## Quick Start Review this function signature and its types, and refactor them so illegal states are unrepresentable and all variants are exhaustively handled.