typescript

Enforce TypeScript style and strict type-safety across TS/TSX/MTS projects.

1|Updated May 20, 2026
One-click install
npx skills add https://github.com/mDevsLabs/mAI --skill typescript-mdevslabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/mDevsLabs/mAI/tree/main/.agents/skills/typescript
Command: npx skills add https://github.com/mDevsLabs/mAI --skill typescript-mdevslabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps teams write consistent, safe TypeScript code by clarifying when to use interfaces vs types, how to avoid any, and how to structure imports.

Core Features & Use Cases

  • Type design guidance: prefer interface for object shapes (e.g., React props); use type for unions/intersections.
  • Promote modern TS patterns: prefer as const with satisfies where applicable to maintain type fidelity.
  • Enforce consistent import naming and sorting to improve readability and maintainability.

Quick Start

Start by auditing your TS files for explicit types and replace any any with precise interfaces or types.

Frequently Asked Questions about typescript

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

FAQPage Schema
When should I use interfaces vs types in TypeScript?

Use interfaces for object shapes like React props, and types for unions or intersections. This distinction enforces consistent TypeScript style and improves structural type-safety across your codebase.

What's the best way to avoid any in TypeScript?

Audit your TS files for explicit types and replace any with precise interfaces or types. Utilizing modern patterns like as const with satisfies maintains type fidelity while enforcing strict type-safety.

How do I enforce consistent TypeScript imports?

Configure TypeScript linting rules to enforce consistent import naming and sorting. This standardizes import structures across TS, TSX, and MTS projects, improving code readability and maintainability.

Does this TypeScript style enforcement work with TSX and MTS projects?

Yes, the style and strict type-safety standards apply to TS, TSX, and MTS projects. Configuring your TypeScript tooling and linting rules ensures consistent enforcement across these file formats.

How do I enforce async flow standards in TypeScript?

Configure TypeScript tooling and linting rules to consistently enforce async flow standards. This helps teams write safe, predictable asynchronous code while avoiding type errors and unhandled promises.