typescript-best-practices

Guides TypeScript and React TypeScript code reviews with strict mode and type safety patterns.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/eous/dotclaude --skill typescript-best-practices-eous
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typescript-best-practices
Source: https://github.com/eous/dotclaude/tree/main/skills/typescript-best-practices
Command: npx skills add https://github.com/eous/dotclaude --skill typescript-best-practices-eous

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript development guidance that helps teams and individuals apply reliable, maintainable patterns across codebases.

Core Features & Use Cases

  • Enforces strict mode, inferred types, and safe generics to reduce runtime errors.
  • Provides examples for discriminated unions, utility types, and robust React typings.
  • Helps with code reviews by surfacing common anti-patterns and recommended patterns in type-heavy code.

Quick Start

Provide a concise TypeScript example applying strict mode and inferred types.

Frequently Asked Questions about typescript-best-practices

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

FAQPage Schema
What are the best practices for TypeScript strict mode and type inference?▼

TypeScript best practices for strict mode involve enabling tsconfig flags to enforce type inference and safe generics, reducing runtime errors by ensuring compile-time type checking across your codebase.

How do I use discriminated unions and utility types in TypeScript?▼

Discriminated unions in TypeScript combine literal types with shared properties for safe state handling, while utility types transform existing types to improve code correctness and readability in type-heavy logic.

Does this TypeScript guidance apply to React projects and component typings?▼

Yes, these TypeScript patterns apply to React TypeScript projects by providing robust React typings and module organization examples to improve component type safety and maintainability.

How do I review TypeScript code for anti-patterns and type safety issues?▼

Code review sessions for TypeScript surface common anti-patterns by comparing them against recommended patterns for type safety, generics, and maintainability to ensure robust codebase correctness.

What's the best way to configure tsconfig for safe generics and maintainability?▼

Configuring tsconfig for safe generics and maintainability requires applying strict mode, leveraging inferred types, and organizing module structures to enforce TypeScript correctness and reduce runtime errors.