typescript-pro

Design advanced TypeScript type systems with generics, conditional types, and branded types.

19|3|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/dirien/yet-another-agent-harness --skill typescript-pro-dirien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-pro
Source: https://github.com/dirien/yet-another-agent-harness/tree/main/.claude/skills/typescript-pro
Command: npx skills add https://github.com/dirien/yet-another-agent-harness --skill typescript-pro-dirien

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Advanced TypeScript features and inconsistent compiler configurations cause subtle runtime bugs, fragile public APIs, and poor developer ergonomics; this skill standardizes type design, validation, and compiler setup to prevent those issues and improve long-term maintainability.

Core Features & Use Cases

  • Type system design: Create branded types, advanced generics, conditional and mapped types, and utility types to express domain invariants.
  • Type safety enforcement: Provide type guards, discriminated unions, assertion functions, exhaustive checks, and patterns that eliminate unsafe any casts.
  • Build & configuration guidance: Recommend and generate strict tsconfig settings, project references, incremental builds, and declaration file strategies for libraries and monorepos.
  • Full-stack and tRPC integration: Ensure end-to-end type safety across client, server, and tRPC APIs with declaration generation and API-first type modeling.
  • Use Case: Convert a mixed JS/TS monorepo into a strongly typed library set with branded IDs, exhaustive state machines, and a shared tsconfig that produces accurate .d.ts bundles.

Quick Start

Run a repository audit for strict compiler flags, generate branded types and type guards for public APIs, and produce a recommended tsconfig and declaration settings.

Frequently Asked Questions about typescript-pro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce strict TypeScript type safety across a full-stack monorepo?

Enforce strict TypeScript type safety by applying advanced generics, branded types, and discriminated unions across your codebase. Standardize compiler configurations with strict tsconfig settings, project references, and incremental builds to prevent subtle runtime bugs and ensure end-to-end type safety.

What are branded types and how do they improve TypeScript API design?

Branded types are advanced TypeScript type system designs that attach semantic meaning to primitive values, creating distinct types for domain invariants like IDs. They improve API design by leveraging conditional types and utility types to prevent invalid data assignments and eliminate unsafe any casts.

How do I set up tsconfig project references for a TypeScript library?

Set up tsconfig project references for a TypeScript library by configuring strict compiler flags, enabling incremental builds, and defining declaration file generation strategies. This configuration ensures accurate .d.ts bundles are produced, improving long-term maintainability and developer ergonomics for public APIs.

Does tRPC work with advanced TypeScript generics for end-to-end type safety?

tRPC works seamlessly with advanced TypeScript generics to provide end-to-end type safety across client, server, and API boundaries. It leverages declaration generation and API-first type modeling to ensure that full-stack TypeScript projects maintain robust type safety without fragile public APIs.

How do I eliminate unsafe any casts using TypeScript type guards?

Eliminate unsafe any casts by implementing TypeScript type guards, assertion functions, and exhaustive checks. These type safety enforcement patterns utilize discriminated unions to verify data shapes at runtime, guiding the compiler to narrow types correctly and preventing subtle type mismatch bugs.

What is the best way to convert a mixed JS/TS monorepo into a strongly typed library set?

The best way to convert a mixed JS/TS monorepo is to run a repository audit for strict compiler flags, generate branded types and type guards for public APIs, and produce a shared tsconfig. This ensures accurate declaration file generation and exhaustive state machine modeling.