← ClaudeAtlas

typescript-engineeringlisted

Comprehensive TypeScript engineering guidance for coding agents. Use when writing, reviewing, refactoring, or debugging TypeScript or TSX code; designing public APIs; fixing tsconfig or strict-mode issues; resolving generic, union, narrowing, async, module, or type-inference problems; improving runtime validation, testability, and performance; or reviewing TypeScript pull requests for safety and maintainability. Trigger on TypeScript, ts, tsx, tsconfig, tsc, generics, discriminated unions, type guards, Zod, NodeNext, ESM, and strict mode.
mfmezger/ai_agent_dotfiles · ★ 1 · Code & Development · score 65
Install: claude install-skill mfmezger/ai_agent_dotfiles
# TypeScript Engineering Produce TypeScript that is explicit at boundaries, narrow in surface area, and strict enough that refactors fail fast. Prefer inference inside small scopes, explicit types at module boundaries, runtime validation for external data, and simple control flow over clever type tricks. ## Workflow 1. Identify the boundary. Library: optimize for stable public types, portability, and narrow exports. Application: optimize for operability, runtime validation, and maintainable module boundaries. 2. Model data before behavior. Prefer discriminated unions, branded/domain types, and small interfaces over optional-field soup. 3. Decide where trust begins. Treat network, env, file, CLI, and user input as `unknown` until validated. 4. Keep types and implementation aligned. Prefer deriving types from values and functions over duplicating parallel definitions. 5. Use async intentionally. Model failure and cancellation explicitly; avoid floating promises and hidden concurrency. 6. Verify before finalizing. Run the project’s formatter, linter, type checker, and tests. Treat type errors as design feedback. ## Load References By Need | Need | Reference | |---|---| | Project shape, tsconfig, modules, exports, tooling | `references/workflow.md` | | Boundary validation, error handling, async and promises | `references/runtime-and-errors.md` | | API design, unions, narrowing, generics, utility types | `references/types-and-api-design.md` | | React/TSX