typescript-expert

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

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/RobinMillford/GopherNotebook --skill typescript-expert-robinmillford
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-expert
Source: https://github.com/RobinMillford/GopherNotebook/tree/main/.claude/skills/typescript-expert
Command: npx skills add https://github.com/RobinMillford/GopherNotebook --skill typescript-expert-robinmillford

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 or ESM/CJS migrations. This Skill provides expert-level guidance and diagnostics to resolve these issues systematically. ## Core Features & Use Cases - Type-Level Programming Guidance: Apply branded types, conditional types, template literal types, and mapped types with concrete code patterns and recursion-depth safeguards. - Project Diagnostics: Run the included diagnostic script to inspect tsconfig settings, detect tooling (Biome, ESLint, Vitest, Turborepo, Nx), count any usages, and measure type-check performance. - Migration & Monorepo Support: Follow step-by-step strategies for JS-to-TS migration, CJS-to-ESM conversion, and monorepo configuration with project references. - Use Case: Your build fails with "Type instantiation is excessively deep". Invoke this Skill to identify the recursive type causing it, apply a depth-limited pattern, and validate with tsc --noEmit. ## Quick Start Ask the assistant to use the typescript-expert skill to diagnose why type checking is slow in this project and fix the 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 "Type instantiation is excessively deep" in TypeScript?

This error comes from circular or deeply recursive types. Limit recursion depth with conditional types, replace type intersections with interfaces, and split large union types. The Skill provides a depth-limited NestedArray pattern as a concrete fix.

How do I speed up slow TypeScript type checking?

Enable skipLibCheck and incremental compilation, configure precise include/exclude patterns, and use project references in monorepos. Run tsc --extendedDiagnostics to measure check time, file count, and node count before and after changes.

Should I use Biome or ESLint for a TypeScript project?

Choose Biome when speed matters and you want one tool for linting and formatting with TypeScript-first defaults. Stay with ESLint when you need type-aware linting, custom rules, or Vue/Angular support, which Biome does not yet cover.

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

Module resolution failures usually come from a moduleResolution setting that mismatches your bundler, misaligned baseUrl and paths, or stale caches. Check tsconfig settings, verify workspace protocol in monorepos, and clear node_modules/.cache and .tsbuildinfo.

Do TypeScript path aliases work at runtime in Node.js?

No, tsconfig paths only apply at compile time. For ts-node use tsconfig-paths/register, for Node ESM use loader alternatives or avoid TS paths, and for production pre-compile with resolved paths.

How do I migrate a JavaScript project to TypeScript incrementally?

Enable allowJs and checkJs in tsconfig, rename files from .js to .ts gradually, add types file by file, then enable strict flags one at a time. Tools like ts-migrate and typesync can automate parts of the process.