
developing-with-typescript
TypeScript 5.x development with type system, generics, utility types, and strict mode patterns. Use
by FortiumPartners|Open Source
TypeScript Development Skill
TypeScript 5.x development skill for Claude Code agents, providing comprehensive type system patterns, generics, utility types, and strict mode best practices.
Overview
This skill is loaded by backend-developer or frontend-developer agents when working with TypeScript projects. It provides:
- SKILL.md (~450 lines): Quick reference for daily development
- REFERENCE.md (~800 lines): Comprehensive guide for advanced patterns
When This Skill Loads
Automatically detected when:
tsconfig.jsonexists in project rootpackage.jsoncontainstypescriptas a dependency.tsor.tsxfiles are present- NestJS, Angular, or typed React frameworks detected
Contents
SKILL.md (Quick Reference)
Essential patterns for everyday TypeScript development:
- Basic types, interfaces, and type aliases
- Union, intersection, and literal types
- Type narrowing and guards
- Generics with constraints
- Essential utility types (Partial, Pick, Omit, Record, etc.)
- Function types and overloads
- tsconfig.json configuration
- Module patterns and imports
- Common patterns (discriminated unions, branded types)
- Error handling with types
REFERENCE.md (Comprehensive Guide)
Advanced topics for complex scenarios:
- Advanced Generics - Recursive types, variadic tuples, const type parameters
- Conditional Types - Distribution, infer keyword, constraint narrowing
- Mapped Types Deep Dive - Key remapping, property modifiers, deep types
- Template Literal Types - String manipulation, type inference
- Declaration Files - Writing .d.ts, augmenting modules
- Module Augmentation - Extending third-party and global types
- Decorators - Modern TS 5.0+ syntax and legacy patterns
- Advanced tsconfig - Project references, path aliases, strict options
- Type Inference Patterns - Contextual typing, const assertions, satisfies
- Build Tool Integration - esbuild, SWC, Vite configuration
- Migration from JavaScript - Progressive migration strategies
- Performance Optimization - Type-level and build performance
Usage
Agent Integration
Agents can reference this skill for TypeScript-specific guidance:
# In agent context
skill: developing-with-typescript
reference: SKILL.md # Quick patterns
# or
reference: REFERENCE.md # Deep dive
Common Tasks
| Task | Reference |
|---|---|
| Add types to function | SKILL.md > Functions |
| Create type guard | SKILL.md > Type Guards |
| Configure strict mode | SKILL.md > tsconfig.json |
| Write declaration file | REFERENCE.md > Declaration Files |
| Migrate from JavaScript | REFERENCE.md > Migration |
Version Compatibility
- TypeScript: 5.0+
- Node.js: 18+ (for modern ESM support)
- Build Tools: esbuild, SWC, tsc, Vite
Related Skills
nestjs-framework- NestJS-specific TypeScript patternsreact- React with TypeScript (TSX)prisma- Prisma ORM TypeScript integration
Contributing
When updating this skill:
- Keep SKILL.md under 500 lines for quick reference
- Place advanced topics in REFERENCE.md
- Focus on TypeScript 5.x patterns
- Do NOT include React-specific types (use react skill)
- Test code examples for correctness
License
MIT - Part of the Ensemble Plugins ecosystem