typescript-refactoring-patterns

Apply TypeScript refactoring patterns for type safety and maintainability.

10|3|Updated Jan 2, 2026
One-click install
npx skills add https://github.com/autohandai/community-skills --skill typescript-refactoring-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-refactoring-patterns
Source: https://github.com/autohandai/community-skills/tree/main/typescript-refactoring-patterns
Command: npx skills add https://github.com/autohandai/community-skills --skill typescript-refactoring-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It provides practical TypeScript refactoring techniques, including discriminated unions, type guards, branded types, and avoiding over-using casts.

Core Features & Use Cases

  • Discriminated Unions and Type Guards
  • Replace Conditional with Polymorphism
  • Type Guards & Branded Types for validation
  • Quick Wins for TS code quality

Quick Start

Apply these patterns to a TS codebase to improve type safety and maintainability.