compiler-performance

Optimizes TypeScript compilation speed using project references and tsconfig settings.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/pohlai88/afenda-xforge-v5 --skill compiler-performance-pohlai88
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compiler-performance
Source: https://github.com/pohlai88/afenda-xforge-v5/tree/main/.agents/skills/compiler-performance
Command: npx skills add https://github.com/pohlai88/afenda-xforge-v5 --skill compiler-performance-pohlai88

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow TypeScript compilation in large codebases degrades developer experience through long build times and sluggish IDE responsiveness. This Skill provides concrete techniques to diagnose and reduce compilation overhead. ## Core Features & Use Cases - Project References: Split large TypeScript projects into smaller compilable units to enable incremental builds. - tsconfig Optimization: Configure settings like incremental and tsBuildInfoFile to cache compilation state between builds. - Type Pattern Guidance: Identify and avoid expensive recursive type patterns such as deeply nested conditional types that slow the compiler. - Use Case: A monorepo with dozens of packages takes minutes to type-check. Apply project references and incremental compilation to cut rebuild times to seconds. ## Quick Start Ask the AI to review your tsconfig.json and suggest compiler performance optimizations for your TypeScript project.

Frequently Asked Questions about compiler-performance

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

FAQPage Schema
How do I speed up TypeScript compilation in a large project?

Enable incremental compilation with the incremental flag and tsBuildInfoFile in tsconfig.json, and split the codebase using project references. This lets the compiler reuse previous build state and compile only changed projects.

What are TypeScript project references and when should I use them?

Project references let you split a large TypeScript codebase into smaller interdependent projects that compile independently. Use them in monorepos or large apps where a single compilation unit causes slow builds.

Why is my TypeScript build so slow?

Slow builds often come from expensive recursive conditional types, missing incremental compilation, or compiling one huge project without references. Deeply nested mapped types like recursive DeepPartial force the compiler into costly type evaluation.

Does incremental compilation improve IDE responsiveness?

Yes, incremental compilation stores build info in a tsbuildinfo file so subsequent type-checks reuse prior work. This reduces both command-line build times and the latency of IDE language services.

When should I avoid recursive TypeScript types?

Avoid deeply recursive conditional types when they apply to large object graphs, since each instantiation multiplies compiler work. Prefer iterative or depth-limited alternatives when type-checking performance degrades.