Skip to content
backnotprop avatar

Principle Type System Discipline

Type-system discipline that makes illegal states unrepresentable and parses external data at boundaries.

CCM score
62 of 100
skills.sh installs
13.4K
GitHub stars
5.5K
last updated
Nov 30, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers branding semantic primitives, parsing external data at boundaries, and deriving types from authoritative schemas
  • Brands primitives that share a type but differ in meaning, validating once at creation
  • Treats JSON, RPC payloads, CLI args, config, environment variables, and database rows as untyped until parsed
  • Applies when designing types, reviewing function signatures, or writing code in statically-typed languages; TypeScript syntax is covered by the typescript-best-practices skill

Install

$ npx -y skills add backnotprop/pstack --skill principle-type-system-discipline -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Type System Discipline

Make the compiler reject impossible states, mismatched primitives, and unhandled variants.

  • Brand semantic primitives. If two arguments share a primitive type but mean different things, give each its own type. Validate once at creation.
  • External data is untyped until parsed. JSON, RPC payloads, CLI args, config, environment variables, and database rows go through a parse function at the boundary that returns the typed model.
  • Derive types from authoritative schemas. When a schema file owns a shape, derive the type from it instead of hand-rolling a parallel one.

For TypeScript syntax, see the typescript-best-practices skill.

Details

Repository
github.com/backnotprop/pstack
First seen
Nov 30, 2026

More from backnotprop/pstack

All 44

Similar to Principle Type System Discipline