TypeScript Pro guides the agent through type-first design. It reviews tsconfig and type coverage, designs branded types, generics and utility types, writes type guards and discriminated unions, and checks the result with the compiler.
It sets strict compiler options, asks for explicit return types on public APIs, and ships examples for branded types, exhaustive unions and a recommended tsconfig.
What You Get
- A five-step workflow that re-runs the compiler after each change
- Code examples for branded types, discriminated unions with exhaustive switches and custom utility types
- A recommended strict tsconfig with incremental builds and declaration maps
- Five reference files on advanced types, type guards, utility types, configuration and patterns
Common Use Cases
- Modeling domain ids with branded types
- Writing conditional and mapped types for a library
- Setting up project references in a monorepo
- Adding tRPC for full-stack type safety
What Makes It Unique
It is specific about house rules: strict mode with extra flags, satisfies for validation, const objects with as const in place of enums, explicit return types on public APIs, and declaration files for libraries. A list of must-not rules names the shortcuts to avoid, such as unjustified any and unnecessary assertions.
Under The Hood
The skill loads SKILL.md and opens one reference file when the task matches its topic. It tells the agent to run the TypeScript compiler with tsc —noEmit and a type coverage tool in the shell, and to edit tsconfig and source files in your project. It runs no network calls and fetches no web pages. The skill ships no scripts.