typescript-expert
Skill36 starsChanged 6 months agoMITView on GitHub
TypeScript infrastructure specialist for monorepo project references, type performance diagnostics (tsc --extendedDiagnostics), ESM/CJS interop, strict mode migration, and .d.ts authoring — use for project-level TypeScript decisions, not implementation patterns.
14 other projects use a version of this, 9 of them edited.
Adopted by
Most recently taken up by
- roedyrustam/vibes-plugtheir own version, first seen Oct 3, 2026
- MortuisVMain/ai-agent-superpowersedited, first seen Sep 15, 2026
- kelvincushman/orphusedited, first seen Jul 30, 2026
- iamdemetris/lude-kittheir own version, first seen Jul 17, 2026
- langgenius/mosoo-skillsedited, first seen Jun 4, 2026
- PUPT-Quantum-Leap/capstone-nlcom-volunteer-management-systemedited, first seen May 25, 2026
Used with
Projects with it also use skill-creator.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillskill-creator
Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.
Also in 4 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 9
- jasonjgardner/blockbench-mcp-plugin★ 48218% same
- weAAAre/a11y-agents-kit★ 3418% same
- xfstudio/skills★ 918% same
- kelvincushman/orphus★ 418% same
- PUPT-Quantum-Leap/capstone-nlcom-volunteer-management-system★ 418% same
- ai4brands-design/claude-skills★ 218% same
- langgenius/mosoo-skills★ 218% same
- fengye404/fengye-skills★ 118% same
- MortuisVMain/ai-agent-superpowers★ 038% same
Wrote their own version · 5
- roedyrustam/vibes-plug★ 73same name
- martinholovsky/claude-skills-generator★ 47same name
- jornalistainclusivo/jinc-skills★ 1same name
- iamdemetris/lude-kit★ 0same name
- Ortus-Solutions/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository157 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a2ui-angularSkill
- accessibility-auditSkill
- adk-deploy-guideSkill
- adk-dev-guideSkill
- adk-eval-guideSkill
- adk-observability-guideSkill
- agentic-ai-coding-standardSkill
- agentic-ai-devSkill
- ai-auditSkill
- ai-chatSkill
- ai-decision-recordSkill
- ai-incident-responseSkill
- ai-launch-checkSkill
- ai-playbookSkill
- angular-best-practicesSkill
- angularSkill
- angular-spaSkill
- angular-ui-patternsSkill
- api-design-principlesSkill
- app-store-optimizationSkill
- architect-reviewSkill
- architecture-decision-recordsSkill
- architecture-designSkill
- asc-cli-usageSkill
- asc-crash-triageSkill
- asc-id-resolverSkill
- asc-release-flowSkill
- asc-signing-setupSkill
- asc-submission-healthSkill
- asc-testflight-orchestrationSkill
- browser-testingSkill
- changelog-generatorSkill
- claude-actions-auditorSkill
- clean-codeSkill
- codebase-onboardingSkill
- code-explainerSkill
- code-reviewerSkill
- code-simplifierSkill
- comment-analyzerSkill
- database-schema-designerSkill
- ddd-architectSkill
- decision-frameworksSkill
- dedup-code-agentSkill
- deployment-ci-cdSkill
- design-systemSkill
- dockerSkill
- documentation-generationSkill
- domain-finderSkill
- error-detectiveSkill
- eval-guideSkill
- feature-forgeSkill
- firebase-basicsSkill
- firebase-hosting-basicsSkill
- fixing-accessibilitySkill
- fixing-motion-performanceSkill
- flutter-animationsSkill
- flutter-genuiSkill
- flutter-mobileSkill
- flutter-security-expertSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. 2 are common, 3 are distinctive, and 7 are very specific to this project.
2
Common
Most of the 13 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Use this skill for project-level TypeScript decisions:
- Very specific: line 41
Do not use for Angular/NestJS framework-specific patterns — load angular-spa or nestjs-api instead
- Very specific: line 42
Do not use for implementation-level type patterns — load typescript-advanced-types instead
- Very specific: line 43
Do not use for runtime debugging — load systematic-debugging instead
- Common: line 64
Prefer existing project scripts over raw tools
- Common: line 85
Safety note: Avoid watch/serve processes in validation.
- Distinctive: line 90
Create nominal types to prevent primitive obsession.
- Very specific: line 127
Use incremental: true with .tsbuildinfo cache
- Very specific: line 134
"Cannot find module": Check moduleResolution, verify baseUrl/paths, clear cache
- Very specific: line 138
Use "moduleResolution": "bundler" for modern tools
- Very specific: line 139
Use dynamic imports for CJS: const pkg = await import('cjs-package')
- Distinctive: line 146
Add types file by file
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TypeScript Expert
Iron Law: Before diagnosing any TypeScript issue, READ the actual tsconfig.json, package.json, and relevant source files first. Do not diagnose from memory — verify with file:line evidence.
Note: This skill focuses on TypeScript infrastructure (monorepo, diagnostics, ESM/CJS, migrations). For implementation patterns, load typescript-advanced-types first. For NestJS patterns, load nestjs-api + nestjs-coding-standard first. For Angular patterns, load angular-spa first.
When to Use
Use this skill for project-level TypeScript decisions:
- Monorepo project references and composite builds
- Type checking performance issues (
tsc --extendedDiagnostics) - ESM/CJS interop and module resolution problems
- Strict mode migration strategies
.d.tsauthoring and declaration file management- Incremental compilation configuration
- Migrating from JavaScript to TypeScript
Do Not Use
- Do not use for Angular/NestJS framework-specific patterns — load
angular-spaornestjs-apiinstead - Do not use for implementation-level type patterns — load
typescript-advanced-typesinstead - Do not use for runtime debugging — load
systematic-debugginginstead
Analysis Workflow
Step 1: Analyze Project Setup
Use internal tools first (Read, Grep, Glob) for better performance. Shell commands are fallbacks.
# Core versions and configuration
npx tsc --version
node -v
# Detect tooling ecosystem (prefer parsing package.json)
node -e "const p=require('./package.json');console.log(Object.keys({...p.devDependencies,...p.dependencies}||{}).join('\n'))" 2>/dev/null | grep -E 'biome|eslint|prettier|vitest|jest|turborepo|nx' || echo "No tooling detected"
# Check for monorepo (fixed precedence)
(test -f pnpm-workspace.yaml || test -f lerna.json || test -f nx.json || test -f turbo.json) && echo "Monorepo detected"After detection, adapt approach:
- Match import style (absolute vs relative)
- Respect existing baseUrl/paths configuration
- Prefer existing project scripts over raw tools
- In monorepos, consider project references before broad tsconfig changes
Step 2: Identify Problem Category
Identify the specific problem category and complexity level before proceeding.
Step 3: Apply Solution Strategy
Apply the appropriate solution strategy from the core capabilities below.
Step 4: Validate
# Fast fail approach (avoid long-lived processes)
npm run -s typecheck || npx tsc --noEmit
npm test -s || npx vitest run --reporter=basic --no-watch
# Only if needed and build affects outputs/config
npm run -s buildSafety note: Avoid watch/serve processes in validation. Use one-shot diagnostics only.
Core Capabilities
Branded Types
Create nominal types to prevent primitive obsession. Use for critical domain primitives, API boundaries, currency/units.
type Brand<K, T> = K & { __brand: T };
type UserId = Brand<string, 'UserId'>;
type OrderId = Brand<string, 'OrderId'>;Advanced Conditional Types
Recursive type manipulation and template literal type magic. Use for library APIs, type-safe event systems, compile-time validation.
type DeepReadonly<T> = T extends (...args: any[]) => any
? T
: T extends object
? { readonly [K in keyof T]: DeepReadonly<T[K]> }
: T;Watch for: Type instantiation depth errors (limit recursion to 10 levels).
Type Inference (satisfies)
// Use 'satisfies' for constraint validation (TS 5.0+)
const config = {
api: "https://api.example.com",
timeout: 5000
} satisfies Record<string, string | number>;Performance Optimization
# Diagnose slow type checking
npx tsc --extendedDiagnostics --incremental false | grep -E "Check time|Files:|Lines:|Nodes:"- Enable
skipLibCheck: truefor library type checking only - Use
incremental: truewith.tsbuildinfocache - Configure
include/excludeprecisely - For monorepos: Use project references with
composite: true
Error Pattern Resolution
- "The inferred type of X cannot be named": Export required type, use
ReturnType<typeof fn>, or break circular deps - "Excessive stack depth comparing types": Limit recursion, use
interfaceextends instead of type intersection - "Cannot find module": Check
moduleResolution, verifybaseUrl/paths, clear cache
ESM/CJS Interop
- Set
"type": "module"in package.json for ESM-first - Use
"moduleResolution": "bundler"for modern tools - Use dynamic imports for CJS:
const pkg = await import('cjs-package') - TypeScript paths only work at compile time — not runtime
Migration Strategies
JavaScript to TypeScript migration — incremental approach:
- Enable
allowJsandcheckJs - Rename files gradually (
.js→.ts) - Add types file by file
- Enable strict mode features one by one
Monorepo Project References
{
"references": [
{ "path": "./packages/core" },
{ "path": "./packages/ui" },
{ "path": "./apps/web" }
],
"compilerOptions": {
"composite": true,
"declaration": true,
"declarationMap": true
}
}- Choose Turborepo for: simple structure, need speed, <20 packages
- Choose Nx for: complex dependencies, need visualization, plugins required
Tech Stack Applicability
| Stack | Applicable |
| Angular 21.x | Yes — but load angular-spa for framework patterns |
| NestJS 11.x | Yes — but load nestjs-api for framework patterns |
| MCP Builder TypeScript | Yes |
| Flutter | No |
| Java | No |
| Python | No |
Reference Files
| File | Purpose |
references/typescript-cheatsheet.md | Quick reference for type basics, utility types, generics, type guards, and best practices |
references/utility-types.ts | Production-ready utility type library (branded types, Result/Option types, deep utilities, JSON types) |
references/tsconfig-strict.json | Strict TypeScript 5.x tsconfig template with ESM, performance, and path alias settings |
scripts/ts_diagnostic.py | Python diagnostic script — analyzes tsconfig, tooling, monorepo setup, any-type usage, and type check performance |
Validation Commands
# Fast fail approach (avoid long-lived processes)
npm run -s typecheck || npx tsc --noEmit
npm test -s || npx vitest run --reporter=basic --no-watch
# Only if build affects outputs/config
npm run -s build
# Performance diagnostics
npx tsc --extendedDiagnostics --incremental false | grep -E "Check time|Files:|Lines:|Nodes:"
# Run project diagnostic script
python3 .claude/skills/typescript-expert/scripts/ts_diagnostic.pyDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

