# Typescript Engineering

> Build strict TypeScript applications with stable runtime validation, modular architecture, and browser/server correctness.

- Skill: `nafeeur/typescript-engineering` (Agent Skill)
- Install (CLI): `npx skillmds@latest add nafeeur/typescript-engineering`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nafeeur/typescript-engineering/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: nafeeur (https://skillmd.com/u/nafeeur)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/nafeeur/typescript-engineering

---


# TypeScript Engineering

- Keep `unknown` at external boundaries and narrow through validation; avoid spreading `any`.
- Separate transport/domain/storage types where their lifecycle differs.
- Handle AbortSignal, streaming, cleanup, and promise rejection paths explicitly.
- Preserve ESM/CJS and runtime target conventions already present.
- Use discriminated unions for state machines and exhaustive checks for protocol events.
- Run typecheck, tests, lint, and production build.

