expert-typescript-programmer
Installation
SKILL.md
Expert TypeScript Programmer
Overview
Use this skill to write TypeScript that is simple at runtime and precise at compile time. Prefer local repo conventions first, then apply the official TypeScript guidance summarized here.
Workflow
- Read the nearest
tsconfig.json, packagepackage.json, and relevant existing source before choosing types. - Model the runtime contract first: inputs, outputs, failure modes, ownership boundaries, and public API shape.
- Use TypeScript to make invalid states hard to represent, but keep the implementation readable JavaScript.
- Validate unknown external data at the boundary; do not pretend unvalidated data already matches an internal type.
- When adding or changing tests, use the
write-testsskill for runner, fixture, assertion, dependency, and validation conventions. - Run the narrowest meaningful validation command before finishing: package typecheck/test for package changes,
pnpm run typecheck:changedandpnpm run test:changedfor broader changes, andpnpm run lintwhen practical.