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 Principle Type System Discipline?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/watt-mind-principle-type-system-discipline)
---
name: principle-type-system-discipline
description: "Apply when designing types, schemas, or function signatures. Make illegal states unrepresentable, brand semantic primitives, and exhaust variants."
disable-model-invocation: true
---
# Type System Discipline
Use the type system (TypeScript, Pydantic/mypy, Django Ninja schemas, JSON Schema) to make illegal states unrepresentable at compile or parse time.
- **Model states as discriminated unions / tagged variants** instead of bags of optional booleans.
- **Brand or wrap semantic primitives** (IDs, currencies, tax-inclusive vs. net amounts, verified vs. candidate records) so they cannot be mixed silently.
- **Exhaustively match variants** so adding a new enum or status produces a type error everywhere it must be handled.