typescript-pro

Enforce strict TypeScript patterns with branded types and discriminated unions.

3|2|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/grasberg/sofia --skill typescript-pro-grasberg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-pro
Source: https://github.com/grasberg/sofia/tree/main/workspace/skills/typescript-pro
Command: npx skills add https://github.com/grasberg/sofia --skill typescript-pro-grasberg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces advanced TypeScript patterns and strict typing to catch bugs at compile time, reducing runtime errors and undefined behavior.

Core Features & Use Cases

  • Enable strict mode in tsconfig and design branded types, discriminated unions, and safe generics to express invariants.
  • Use type guards, parser/validator integration, and lightweight utilities to validate external inputs and API boundaries.
  • Use case: Build a type-safe API surface and library code that prevents incorrect usage by consumers.

Quick Start

Install TypeScript Pro in your project and enable strict mode and branded types to start benefiting from stronger type safety.

Frequently Asked Questions about typescript-pro

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

FAQPage Schema
How do I use branded types and discriminated unions to catch TypeScript bugs at compile time?

To catch TypeScript bugs at compile time, enable strict mode in your tsconfig and design branded types alongside discriminated unions. This enforces compile-time validation and expresses invariants, reducing runtime errors and undefined behavior across your codebase.

What is the best way to build a type-safe API surface for a large TypeScript library?

The best way to build a type-safe API surface is to implement safe generics, type guards, and parser or validator integration at API boundaries. This prevents incorrect usage by consumers by validating external inputs and enforcing compile-time validation.

How do I configure strict mode and type guards for TypeScript architecture design?

To configure strict mode and type guards for TypeScript architecture design, enable strict mode in tsconfig and integrate lightweight utilities for compile-time validation. This approach validates external inputs and ensures safe generics across large codebases.

Why do I need parser and validator integration at my TypeScript API boundaries?

You need parser and validator integration at TypeScript API boundaries to safely validate external inputs. This integration works with type guards to enforce compile-time validation, ensuring that external data conforms to your strict type definitions before processing.

Can I use advanced TypeScript patterns like branded types across a large codebase?

Yes, you can use advanced TypeScript patterns like branded types across a large codebase. By enabling strict mode and designing discriminated unions with safe generics, you can maintain type safety and enforce invariants throughout complex library architectures.

When should I not use strict mode and compile-time validation in TypeScript?

You should avoid strict mode and compile-time validation in TypeScript when working with highly dynamic or unstructured data that resists static typing. In such cases, aggressive branded types and type guards may create excessive friction without preventing meaningful runtime errors.