typescript

Enforce strict TypeScript development with runtime schemas and derived types.

21|6|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/mintuz/claude-plugins --skill typescript-mintuz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/mintuz/claude-plugins/tree/main/plugins/typescript/skills
Command: npx skills add https://github.com/mintuz/claude-plugins --skill typescript-mintuz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Type-safe TypeScript codebases can be hard to enforce without a consistent approach to schemas, immutability, and clear type contracts. This Skill provides guidelines to align on schema-first validation, derived types, branded types, and robust utility patterns to reduce runtime errors and improve maintainability.

Core Features & Use Cases

  • Schema-first development: define runtime schemas and derive TypeScript types, ensuring alignment between validation and types.
  • Immutability and type safety: patterns to avoid mutation, use readonly types, and safe data transformations.
  • Branded types and utilities: create domain-safe identifiers and utility types to prevent misuses across APIs.
  • Use cases: API boundary validation, internal data modeling, and test factories for reliable tests.

Quick Start

Create a zod schema for a User, derive the TypeScript User type from the schema, and validate data at a trust boundary.

Frequently Asked Questions about typescript

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

FAQPage Schema
What is schema-first development in TypeScript and how does it improve type safety?

To derive TypeScript types from zod schemas, define your runtime schema first, then use utility types to infer the TypeScript type. This schema-first approach ensures your compile-time types automatically match your validation rules without manual synchronization.

How do I use branded types to prevent domain identifier misuse in TypeScript?

Branded types create domain-safe identifiers by attaching a unique brand property to primitive types at compile time. This prevents accidental misuse of IDs across different API boundaries, ensuring a UserId cannot be passed where a ProductId is expected.

Does schema-first TypeScript development require strict mode in tsconfig?

Schema-first TypeScript development requires a disciplined tsconfig with strict mode enabled. This enforces immutability patterns, readonly contracts, and strict type checking necessary for deriving types from schemas and maintaining type safety across trust boundaries.

What are the best patterns for enforcing immutability and readonly contracts in TypeScript?

Enforcing immutability in TypeScript involves using readonly types, branded types, and safe data transformation patterns. These approaches prevent mutation across API boundaries, ensuring data integrity and improving codebase maintainability without runtime overhead.

How do I validate data at API trust boundaries using schema-first TypeScript?

Validating data at API trust boundaries involves creating zod schemas for incoming data, deriving TypeScript types from those schemas, and validating data before processing. This schema-first approach ensures only correctly shaped data enters your internal system.

When should I avoid schema-first TypeScript patterns?

Schema-first TypeScript patterns require schema libraries like zod and a strict tsconfig setup. You should avoid this approach if your project lacks schema library dependencies or if your codebase cannot enforce the disciplined strict mode configuration required for readonly contracts and branded types.