Typescript Patterns skills for AI agents
8 practitioner-grade typescript patterns skills, each a focused Markdown document your agent loads into context on demand. Search them from Claude Desktop, Cursor or any MCP client, or pull one with the CLI.
All 8 skills
- Branded Types
Create nominally distinct types from structural primitives using phantom brands.
126 lines - Builder Pattern
Implement fluent, type-accumulating builders that enforce required fields at compile time.
144 lines - Conditional Types
Branch at the type level with conditional expressions, infer, and distributive behavior.
119 lines - Discriminated Unions
Model mutually exclusive states with tagged union types and exhaustive narrowing.
124 lines - Generic Constraints
Constrain generic type parameters to enforce structural and behavioral contracts at compile time.
117 lines - Module Augmentation
Extend third-party and global type declarations without modifying source using module augmentation.
149 lines - Template Literal Types
Construct and parse string-level types using template literal syntax for compile-time string validation.
123 lines - Type Guards
Narrow types at runtime with user-defined type predicates and assertion functions.
130 lines