typescript-pro

Implements advanced TypeScript type systems, generics, and strict compiler configurations.

1|Updated Aug 18, 2026
One-click install
npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill typescript-pro-scsm-unrestrict
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-pro
Source: https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent/tree/main/frontend-engineer/skills/typescript-pro
Command: npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill typescript-pro-scsm-unrestrict

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? TypeScript codebases often accumulate unsafe any types, weak configurations, and runtime errors that strict typing would have caught at compile time. This Skill provides a structured workflow for designing type-first APIs, enforcing strict compiler settings, and validating type coverage across projects. ## Core Features & Use Cases - Advanced Type Design: Create branded types, discriminated unions, conditional types, mapped types, and template literal types for domain modeling. - Compiler Configuration: Set up strict tsconfig options, project references, incremental compilation, and path mapping for monorepos. - Type-Safe Patterns: Implement builder, factory, repository, state machine, and Result/Either patterns with full compile-time safety. - Use Case: When refactoring a Node.js API to eliminate runtime type errors, use this Skill to introduce branded ID types, discriminated union state handling, and a strict tsconfig, then verify with tsc --noEmit. ## Quick Start Ask the agent to review your TypeScript project and implement strict type safety with branded types and discriminated unions.

Frequently Asked Questions about typescript-pro

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

FAQPage Schema
How do I create branded types in TypeScript?

Branded types use an intersection with a unique brand property, like `type Brand<T, B> = T & { readonly __brand: B }`. This creates nominal typing so a UserId string cannot be accidentally passed where an OrderId is expected, catching mix-ups at compile time.

How to use discriminated unions for state management in TypeScript?

Define a union where each member shares a literal tag field, such as `status: 'loading' | 'success' | 'error'`. Switch on the tag to narrow types automatically, and use a `never` assertion in the default case to enforce exhaustive handling.

What tsconfig strict options should I enable?

Enable `strict: true` plus `noUncheckedIndexedAccess`, `noImplicitOverride`, and `exactOptionalPropertyTypes` for maximum safety. Use `module: NodeNext` for Node.js projects or `moduleResolution: bundler` for Vite and Next.js setups.

Does TypeScript project references help monorepo build performance?

Yes, project references with `composite: true` enable incremental compilation across packages, so only changed projects rebuild. Define references in a root tsconfig and set `incremental: true` with a tsBuildInfoFile for faster subsequent builds.

When should I avoid using type assertions in TypeScript?

Avoid `as` assertions when a type guard or `satisfies` operator can validate the value instead, since assertions bypass compiler checks. Reserve them for branded type constructors and cases where the compiler cannot infer narrowing.