typescript-expert

Diagnose and resolve TypeScript type errors, performance issues, and migration challenges.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill typescript-expert-duccuong159
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-expert
Source: https://github.com/DucCuong159/Realtime-chatapp/tree/main/.agent/skills/typescript-expert
Command: npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill typescript-expert-duccuong159

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? TypeScript projects often hit cryptic compiler errors, slow type checking, module resolution failures, and painful JavaScript-to-TypeScript migrations. This Skill provides expert-level guidance and automated diagnostics to identify root causes and apply proven fixes. ## Core Features & Use Cases - Automated Project Diagnostics: Run the included diagnostic script to analyze tsconfig settings, detect tooling (Biome, ESLint, Vitest, Nx, Turborepo), count any usages, and measure type-check performance. - Advanced Type-Level Patterns: Apply branded types, conditional types, template literal types, and discriminated unions using the bundled utility types library and cheatsheet. - Migration & Tooling Decisions: Get structured guidance for JS-to-TS migration, ESLint-to-Biome moves, CJS-to-ESM conversion, and Nx vs Turborepo monorepo choices. - Use Case: Your build fails with "Type instantiation is excessively deep". Invoke this Skill to diagnose the recursive type, apply a depth-limited pattern, and validate with tsc --noEmit. ## Quick Start Ask the assistant to use the typescript-expert skill to diagnose why my project fails type checking and fix the errors.

Frequently Asked Questions about typescript-expert

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

FAQPage Schema
How do I fix "Type instantiation is excessively deep" in TypeScript?

This error comes from deeply recursive or circular generic types. Limit recursion depth with conditional types, replace type intersections with interfaces, split large union types, and use type aliases to break recursion cycles.

How to migrate a JavaScript project to TypeScript incrementally?

Enable allowJs and checkJs in tsconfig, then rename files from .js to .ts gradually while adding types file by file. Enable strict mode flags one at a time, and use tools like ts-migrate or typesync to automate parts of the process.

Biome vs ESLint: which should I use for TypeScript linting?

Choose Biome when speed is critical and you want one tool for linting and formatting in a TypeScript-first project. Stay with ESLint when you need type-aware linting, custom rules, specific plugins, or Vue/Angular support.

Why does TypeScript say "Cannot find module" when the file exists?

Check that moduleResolution matches your bundler, verify baseUrl and paths alignment, and confirm workspace protocol usage in monorepos. Clearing caches like node_modules/.cache and .tsbuildinfo often resolves stale resolution state.

Does TypeScript path mapping work at runtime in Node.js?

No, tsconfig paths only apply at compile time. For runtime resolution use ts-node with tsconfig-paths/register, ESM loaders, or pre-compile with resolved paths for production builds.

How do I speed up slow TypeScript type checking?

Enable skipLibCheck and incremental compilation, configure precise include/exclude patterns, and use project references with composite: true in monorepos. Diagnose bottlenecks with tsc --extendedDiagnostics or --generateTrace.