typescript-expert

Diagnose and resolve TypeScript type errors, build performance, and monorepo configuration issues.

Updated Aug 20, 2026
One-click install
npx skills add https://github.com/hduoc2003/leviathan-guardian --skill typescript-expert-hduoc2003
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typescript-expert
Source: https://github.com/hduoc2003/leviathan-guardian/tree/main/.agents/skills/typescript-expert
Command: npx skills add https://github.com/hduoc2003/leviathan-guardian --skill typescript-expert-hduoc2003

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 migration roadblocks that stall development. This Skill provides expert-level guidance for diagnosing and fixing these issues using current best practices. ## Core Features & Use Cases - Type-Level Programming Guidance: Apply branded types, conditional types, template literal types, and inference techniques like satisfies and const assertions for safer domain modeling. - Performance & Build Diagnostics: Run the included diagnostic script to check tsconfig strictness, detect tooling (Biome, ESLint, Vitest, Turborepo, Nx), count any usage, and measure type-check performance. - Migration & Monorepo Support: Get step-by-step strategies for JavaScript-to-TypeScript migration, CJS-to-ESM conversion, and Nx vs Turborepo decisions with project references configuration. - Use Case: Your monorepo build suddenly fails with "Type instantiation is excessively deep" errors. Invoke this Skill to identify the recursive type causing the issue, apply a depth-limited fix, and validate with tsc --noEmit. ## Quick Start Ask the TypeScript expert to diagnose why my project fails type checking and recommend fixes for my tsconfig.

Frequently Asked Questions about typescript-expert

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

FAQPage Schema
How do I fix slow TypeScript type checking?▼

Enable skipLibCheck and incremental compilation in tsconfig, then run tsc --extendedDiagnostics to identify bottlenecks. For monorepos, configure project references with composite: true, and split large union types or break deep type recursion.

How do I migrate a JavaScript project to TypeScript?▼

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

Should I use Biome or ESLint for TypeScript linting?▼

Choose Biome when speed matters and you want a single linter plus formatter with TypeScript-first support. Stay with ESLint when you need type-aware linting, custom rules, specific plugins, or Vue and Angular support.

Why does TypeScript say type instantiation is excessively deep?▼

This error comes from circular or deeply recursive type definitions. Fix it by limiting recursion depth with conditional types, replacing type intersections with interfaces, or simplifying generic constraints.

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 during development, or pre-compile with resolved paths for production builds.

When should I choose Nx over Turborepo for a monorepo?▼

Choose Turborepo for simple structures with fewer than 20 packages where speed is the priority. Choose Nx when you have complex dependency graphs, need visualization, or require plugins, especially beyond 50 packages.