Skip to content
Back to skills

Principle Type System Discipline

ASecurity

Apply when designing types, schemas, or function signatures. Make illegal states unrepresentable, brand semantic primitives, and exhaust variants.

  • 25 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
ai-agentstypescriptgodjango

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add watt-mind/factory --skill principle-type-system-discipline --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Principle Type System Discipline?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Principle Type System Discipline
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/watt-mind-principle-type-system-discipline/badge)](https://www.skillsdirectory.com/skills/watt-mind-principle-type-system-discipline)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.