PluginBench
Skill
Pass
Audit score 90

typescript

pproenca/dot-skills

TypeScript performance, tsconfig, type errors, and async patterns optimization.

What is typescript?

Specialized skill for optimizing TypeScript compilation speed, configuring tsconfig.json, fixing type errors, and improving async/await patterns. Use this when working on type system performance, compiler configuration, module organization, or encountering TypeScript errors like TS2322 or TS2339.

  • Optimize type system performance with explicit return types, simplified generics, and conditional type extraction
  • Configure tsconfig.json for faster compilation with incremental builds, skipLibCheck, and isolatedModules
  • Fix async patterns by avoiding loop awaits, using Promise.all, and deferring await calls
  • Organize modules efficiently by eliminating barrel imports, circular dependencies, and using type-only imports
  • Improve type safety with strictNullChecks, exhaustive checks, and type guards
  • Manage memory leaks in closures, event listeners, and global state

How to install typescript

npx skills add https://github.com/pproenca/dot-skills --skill typescript
Claude Code
Cursor
Windsurf
Cline

How to use typescript

  1. 1.Identify the performance bottleneck: compilation speed, type errors, async patterns, or module organization
  2. 2.Locate the relevant rule category (type system, compiler config, async, modules, safety, memory, or runtime)
  3. 3.Review the specific rule's guidance and code examples in the referenced documentation
  4. 4.Apply the recommended change to your code or tsconfig.json
  5. 5.Measure the impact using tsc --diagnostics or build timing tools

Use cases

Good for
  • Speeding up tsc compilation in large TypeScript projects by 50-90% with incremental builds and skipLibCheck
  • Fixing type assignment errors (TS2322, TS2339) by adding explicit return types and using type guards
  • Optimizing data-fetching code by replacing sequential awaits in loops with Promise.all for 2-10× improvement
  • Configuring tsconfig.json for a new project with performance-first settings
  • Refactoring deeply nested generic types and large union types that cause quadratic type-checking costs
Who it's for
  • TypeScript developers optimizing build performance
  • Backend engineers managing large codebases with slow compilation
  • Frontend developers reducing bundle size and import costs
  • DevOps/build engineers configuring tsconfig.json for CI/CD pipelines
  • Code reviewers identifying async and type system anti-patterns

typescript FAQ

Does this skill cover TypeScript basics or framework-specific patterns?

No. This skill focuses exclusively on performance optimization, type errors, and async patterns. It does not cover TypeScript fundamentals or framework-specific code (React, Angular, etc.).

What's the biggest performance win I can get?

Enabling incremental compilation and skipLibCheck in tsconfig.json typically yields 50-90% faster rebuilds. Adding explicit return types to exported functions improves declaration emit by 30-50%.

How do I know which rule to apply first?

Rules are prioritized by impact: Type System Performance and Compiler Configuration are CRITICAL and should be addressed first, followed by Async Patterns and Module Organization (HIGH priority).

Can I apply all 45 rules at once?

Start with CRITICAL rules in compiler configuration (incremental, skipLibCheck, isolatedModules) and type system (explicit return types, avoid deep generics). Then progressively apply HIGH and MEDIUM priority rules based on your specific bottlenecks.

Does this cover testing or runtime behavior changes?

No. This skill addresses compilation performance, type safety, and code organization. Testing patterns and framework-specific runtime behavior are out of scope.

Full instructions (SKILL.md)

Source of truth, from pproenca/dot-skills.


name: typescript description: TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to "optimize TypeScript performance", "speed up tsc compilation", "configure tsconfig.json", "fix type errors", "improve async patterns", or encounters TS errors (TS2322, TS2339, "is not assignable to"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.

TypeScript Best Practices

Comprehensive performance optimization guide for TypeScript applications. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Configuring tsconfig.json for a new or existing project
  • Writing complex type definitions or generics
  • Optimizing async/await patterns and data fetching
  • Organizing modules and managing imports
  • Reviewing code for compilation or runtime performance

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Type System PerformanceCRITICALtype-
2Compiler ConfigurationCRITICALtscfg-
3Async PatternsHIGHasync-
4Module OrganizationHIGHmodule-
5Type Safety PatternsMEDIUM-HIGHsafety-
6Memory ManagementMEDIUMmem-
7Runtime OptimizationLOW-MEDIUMruntime-
8Advanced PatternsLOWadvanced-

Table of Contents

  1. Type System Performance — CRITICAL
  2. Compiler Configuration — CRITICAL
  3. Async Patterns — HIGH
  4. Module Organization — HIGH
  5. Type Safety Patterns — MEDIUM-HIGH
  6. Memory Management — MEDIUM
  7. Runtime Optimization — LOW-MEDIUM
  8. Advanced Patterns — LOW

References

  1. https://github.com/microsoft/TypeScript/wiki/Performance
  2. https://www.typescriptlang.org/docs/handbook/
  3. https://v8.dev/blog
  4. https://nodejs.org/en/learn/diagnostics/memory