Skip to content
Back to skills

Principle Type System Discipline

ASecurity

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, exhaust variants, derive from authoritative schemas.

  • 20,617 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
developmenttypescriptgodatabase

Works with

  • claude code
  • cursor
  • cli

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add cursor/plugins --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/cursor-principle-type-system-discipline-plugins/badge)](https://www.skillsdirectory.com/skills/cursor-principle-type-system-discipline-plugins)

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, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas."
disable-model-invocation: true
---

# Type System Discipline

In Claude Code, read [the Claude Code adapter](../../docs/harness/claude-code.md) once per session before you follow this skill. It maps the Cursor names in pstack skills to Claude Code.

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.

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 development →

Comments

Loading comments…

Newsletter

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