| name | typescript-style-guide |
| description | Apply, review, and explain the TypeScript Style Guide conventions for type modelling and type-related code. Use automatically for TypeScript tasks involving inference, readonly data, optional properties, discriminated unions, type-safe constants, template literal types, any and unknown, assertions, type errors, type definitions, arrays, type imports, or generated service types. |
TypeScript Style Guide
Apply only the conventions relevant to the current task. Keep TypeScript, linters, and formatters responsible for rules they can enforce automatically.
Workflow
- Inspect the consuming repository's conventions and configuration.
- Let explicit repository conventions take precedence over this opinionated guide.
- Identify which guide topic applies.
- Read only the relevant reference file.
- Apply, review, or explain the conventions in the context of the current task.
- State important tradeoffs when a convention depends on context or judgment.
Reference routing
- Read references/types.md for type modelling, inference, readonly data, object properties, discriminated unions, constants, template literal types,
any, unknown, assertions, type errors, type definitions, arrays, type imports, and generated service types.
Boundaries
- Do not reimplement deterministic TypeScript, ESLint, or formatting checks.
- Do not introduce unrelated conventions merely because this skill is active.
- Treat guide conventions as defaults when the consuming repository is silent.