principle-type-system-discipline from j-star-films-studios/vibecode-protocol-suite is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, refuse to lie to the compiler, exhaust variants, derive from authoritative schemas.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Type System Discipline
The type checker is a proof assistant. Use it to eliminate impossible states, mismatched primitives, and unhandled variants at compile time. A case the types let you ignore becomes a runtime failure the compiler could have stopped. Prefer defining errors and special cases out of existence over proliferating handlers; unrepresentable states, total functions, and interface redesign (the patterns below) are the tools.
Applies to any typed language. Skills like `typescript-best-practices` ground it in specific syntax.
**The patterns:**
- **Make illegal states unrepresentable.** Model variants as sum types: discriminated unions in TypeScript, enums with payloads in Rust/Swift/Kotlin, sealed classes in Scala, ADTs in Haskell/OCaml. Don't model state as a bag of optional fields where contradictory combinations compile. A subtle anti-pattern worth naming: `{ completed: boolean; completedAt?: Date }` admits `completed: true; completedAt: undefined`, which is meaningless. Derive the boolean from a single source like `completedAt !== null`, or model the variants explicitly as `{ kind: 'open' } | { kind: 'done'; at: Date }`. If a bug forces the question "wait, can
…
The line at the top of this page pins the label git:20260821.1b830a3, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_p6js5lbckpey5p3v
GET https://markdownregistry.com/api/v1/resolve?ref=j-star-films-studios/vibecode-protocol-suite/principle-type-system-discipline
GET https://markdownregistry.com/api/v1/blob/662ed1ad53fb491e97b9c4eac7317fba8ec5ed722fec8d71beb94da0111619cf
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
j-star-films-studios/vibecode-protocol-suite · .agents/skill-curator/SKILL.md · Use when adding, importing, reorganizing, renaming, or refactoring skills according to the Lean Unified Skills…
j-star-films-studios/vibecode-protocol-suite · .agents/skills/unslop/SKILL.md · Use when writing any text, chat responses, documentation, UI copy, or skill instructions. Cuts AI tells, filler, and…
j-star-films-studios/vibecode-protocol-suite · assets/.agent/skills/agent-engineering/arena/SKILL.md · Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for…
j-star-films-studios/vibecode-protocol-suite · assets/.agent/skills/agent-engineering/automate-me/SKILL.md · Use for "automate me", "create/update/refresh my -mode skill", "turn/capture my preferences or working style into a…
j-star-films-studios/vibecode-protocol-suite · assets/.agent/skills/agent-engineering/codex-control/SKILL.md · Use when Pi needs to delegate browser, desktop, or native-plugin tasks to the installed Codex CLI.
j-star-films-studios/vibecode-protocol-suite · assets/.agent/skills/agent-engineering/conversation-to-spec/SKILL.md · Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of…
j-star-films-studios/vibecode-protocol-suite · assets/.agent/skills/agent-engineering/crafting-effective-readmes/SKILL.md · Use when writing or improving README files. Not all READMEs are the same — provides templates and guidance matched to…
j-star-films-studios/vibecode-protocol-suite · assets/.agent/skills/agent-engineering/create-verification-skill/SKILL.md · Generate a project-local verification skill that drives your app the way a user does — any language, framework, or…
j-star-films-studios/vibecode-protocol-suite · assets/.agent/skills/agent-engineering/domain-modeling/SKILL.md · Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a CONTEXT.md…
cursor/plugins · pstack/skills/principle-type-system-discipline/SKILL.md · Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make…
cursor/plugins · harness/pstack/claude-code/skills/principle-type-system-discipline/SKILL.md · Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make…
nightly-labs/openbot · marketplace/production-catalog/bundles/pstack/skills/principle-type-system-discipline/SKILL.md · Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make…
michael-denyer/pstack-claude · plugins/pstack/skills/principle-type-system-discipline/SKILL.md · Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make…
backnotprop/pstack · skills/principle-type-system-discipline/SKILL.md · Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make…
iap/pstack-hermes · skills/principle-type-system-discipline/SKILL.md · Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make…
barbieri/local-openfinance · .agents/skills/principle-type-system-discipline/SKILL.md · Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make…
theonlyfusioncube/potetos-for-everyone · skills/principle-type-system-discipline/SKILL.md · Make invalid states hard or impossible to represent and parse external primitives into meaningful internal types at the…