Skip to content
P

principle-type-system-discipline

Apply when designing types, reviewing a function signature

by cursorFree

#3497in AI Skills
0In stores

Description

principle-type-system-discipline is an agent skill from Cursor's plugins collection that applies a working principle when designing types, r…

Highlights

  • Illegal states unrepresentable
  • Sum types over optional fields
  • Types built up from wanted values
  • Errors defined out of existence
  • Points to TypeScript best practices
  • Installs from skills.sh

Ratings & Reviews

No ratings yet

Be the first to rate principle-type-system-discipline.

People also visit

T

typescript-magician

Designs complex generic types, refactors `any` types to strict alternatives

AI Skills
Get
T

typescript-pro

Implements advanced TypeScript type systems, creates custom type guards

AI Skills
Get
T

typescript-advanced-types

Comprehensive guidance

AI Skills
Get
T

typescript-write

Write or modify TypeScript and JavaScript code

AI Skills
Get
P

principle-model-the-domain

Apply when writing stateful logic

AI Skills
Get
T

typescript-best-practices

Reading or writing TypeScript or JavaScript files

AI Skills
Get

principle-type-system-discipline FAQ

What does this principle aim for?

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

Why avoid optional fields?

A bag of optional fields lets contradictory combinations compile, for example a completed flag with no completion date.

When should I split a type?

When a comment is needed to explain which field combinations are valid, the skill says to use a sum type.

How do I install it?

Run npx skills add https://github.com/cursor/plugins --skill principle-type-system-discipline.

How popular is it?

The skill is listed in the cursor/plugins repository, which has 11.4K GitHub stars.

What are the best principle-type-system-discipline alternatives?

Popular alternatives to principle-type-system-discipline include typescript-magician, typescript-pro and typescript-advanced-types. See all principle-type-system-discipline alternatives

Developer Stuff

Badges