cursor avatar

Principle Type System Discipline

Strict type discipline that makes illegal states unrepresentable, brands primitives, and parses external data at boundaries.

CCM score
58 of 100
skills.sh installs
6.2K
GitHub stars
19.4K
last updated
Nov 25, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers three core rules: branding semantic primitives, parsing untyped external data at boundaries, and deriving types from authoritative schemas
  • Requires that arguments sharing a primitive type but meaning different things each get their own type, validated once at creation
  • Treats JSON, RPC payloads, CLI args, config, environment variables, and database rows as untyped until a parse function returns the typed model
  • Points TypeScript syntax questions to the separate typescript-best-practices skill

Install

$ npx -y skills add cursor/plugins --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/cursor/plugins
First seen
Nov 25, 2026

More from cursor/plugins

All 93

Similar to Principle Type System Discipline