typescript

Enforce strict TypeScript patterns for robust and maintainable code.

1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/statick88/dotfiles --skill typescript-statick88
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/statick88/dotfiles/tree/main/amp/.agents/skills/typescript
Command: npx skills add https://github.com/statick88/dotfiles --skill typescript-statick88

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces strict TypeScript patterns and best practices, preventing common pitfalls and improving code quality and maintainability.

Core Features & Use Cases

  • Const Types Pattern: Ensures a single source of truth for type definitions.
  • Flat Interfaces: Promotes cleaner, more readable interface definitions.
  • Avoid any: Encourages the use of unknown and generics for type safety.
  • Utility Types: Demonstrates powerful built-in TypeScript utility types.
  • Type Guards: Provides examples for runtime type checking.
  • Import Types: Shows correct ways to import types.
  • Use Case: When writing new TypeScript code or refactoring existing codebases to adhere to modern, safe, and maintainable patterns.

Quick Start

Apply the typescript skill to enforce const types pattern for a status enum.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I enforce strict TypeScript patterns and best practices in my codebase?

You can enforce strict TypeScript patterns by applying rules for const types, flat interfaces, and avoiding `any` to improve code maintainability and prevent common type safety pitfalls.

What is the best way to avoid `any` in TypeScript without losing flexibility?

The best way to avoid `any` in TypeScript is to use `unknown` and generics, which enforce type safety checks while maintaining the flexibility needed for dynamic data structures.

When do I need utility types and type guards in TypeScript?

You need TypeScript utility types and type guards when performing runtime type checking and transforming existing types, ensuring robust type safety for complex data structures.

How do I define a single source of truth for type definitions using const types?

Define a single source of truth for type definitions using the const types pattern, which ensures your status enums and type constants remain robust and maintainable across the project.

What are the correct import conventions for TypeScript types?

Correct TypeScript import conventions involve specifically importing types to separate them from runtime values, ensuring cleaner interface definitions and preventing circular dependency issues.