What problem does it solve?
TypeScript code often suffers from weak types, inconsistent interfaces, and fragile refactoring. This Skill provides a structured set of patterns and guidelines to enforce strict typing and maintainable contracts across projects.
Core Features & Use Cases
- Const Types Pattern (REQUIRED): Create const objects first, then derive types to ensure runtime values and type safety.
- Flat Interfaces (REQUIRED): Use one-level-deep interfaces with named inner types to keep definitions readable and reusable.
- Never Use any: Prefer unknown and type guards to guarantee safer boundaries.
- Utility Types: Use Pick, Omit, Partial, Required, Readonly, and other utilities to compose robust types.
- Type Guards: Implement runtime checks to narrow types and validate input.
- Import Types: Use import type for clean, dependency-safe type references.
Quick Start
Ask the AI to apply strict TypeScript patterns across the codebase by defining types, interfaces, and const objects where appropriate.