typescript-expert

Diagnose and resolve TypeScript typing, configuration, and monorepo boundary issues.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/SleyiW/iWana-neXt --skill typescript-expert-sleyiw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-expert
Source: https://github.com/SleyiW/iWana-neXt/tree/main/.agents/skills/typescript-expert
Command: npx skills add https://github.com/SleyiW/iWana-neXt --skill typescript-expert-sleyiw

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? TypeScript codebases in monorepos often accumulate complex type errors, unsafe any usage, broken package boundaries, and misconfigured tsconfig files. This Skill provides expert guidance and diagnostic tooling to produce strict, maintainable TypeScript aligned with NestJS, Next.js App Router, pnpm, and Turborepo setups. ## Core Features & Use Cases - Project Diagnostics: Run the included Python script to audit TypeScript versions, tsconfig strictness flags, tooling, monorepo setup, any usage, type assertions, and type-check performance. - Strict Configuration Reference: Apply a ready-made strict tsconfig template with flags like noUncheckedIndexedAccess, exactOptionalPropertyTypes, and modern ESM module resolution. - Type Design Guidance: Use the cheatsheet and utility types library covering generics, discriminated unions, branded types, type guards, and deep utility types for real domain modeling. - Use Case: When a shared contract between backend and frontend packages causes type errors, activate this Skill to diagnose the root cause, redesign the contract with clear boundaries, and avoid casts that degrade type safety. ## Quick Start Ask the assistant to diagnose the TypeScript configuration and type errors in the current monorepo project.

Frequently Asked Questions about typescript-expert

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

FAQPage Schema
How do I diagnose TypeScript configuration problems in a monorepo?

Run the included ts_diagnostic.py script from the project root. It checks TypeScript and Node versions, tsconfig strictness flags, detected tooling like ESLint and Vitest, monorepo configuration files, and runs a type check to surface errors.

How to enable strict mode in tsconfig for TypeScript 5?

Use the provided tsconfig-strict.json reference, which enables strict, noUncheckedIndexedAccess, noImplicitOverride, exactOptionalPropertyTypes, and noPropertyAccessFromIndexSignature. It also sets module to ESNext with bundler resolution and skipLibCheck for performance.

What is the difference between any and unknown in TypeScript?

The any type disables all type checking and should be avoided, while unknown requires explicit narrowing before use and preserves type safety. The Skill recommends preferring unknown and validating external data at runtime.

Does TypeScript typing replace runtime validation?

No. Types are erased at compile time, so data entering from HTTP requests, queues, environment variables, or external integrations still needs runtime validation with DTOs or schemas aligned to the types.

When should I use branded types in TypeScript?

Use branded types to prevent mixing primitive values like UserId and OrderId that share the same underlying string type. Apply them only when they add real clarity and can be maintained, not as a default pattern.

Why should I avoid 'as unknown as' casts in TypeScript?

Double assertions like 'as unknown as' force compilation by bypassing the type checker, hiding real design problems. The Skill treats them as a signal to fix the underlying type or architecture issue instead of masking it.