typescript
Installation
SKILL.md
Purpose
This skill defines how to write and structure TypeScript so that code is type-safe, readable, and consistent across Alpha's projects.
General Principles
@alphacifer/tsconfigis required. Every project must extend it; do not override or loosen options—fix code instead unless the project documents an exception.@alphacifer/biomeis required when Biome is used. If a project has Biome configured, it must extend Alpha's Biome config instead of maintaining unrelated local lint or format rules.- Prefer types over
any: Use precise types, generics, and inference; useunknownand narrow when the type is dynamic. - Explicit over implicit: Prefer explicit return types on public APIs and exports; rely on inference for locals and private helpers.
- Small, focused modules: Prefer small files and single responsibility; use barrel exports only when they clearly simplify the public API.
Reference Guides
- Types and Interfaces - object shapes, unions, readonly values, branded types, and nullable modeling.
- Modules and Imports - ES modules, relative imports, and path aliases.
- Style and Formatting - naming, enum alternatives, guard clauses, block braces, and object formatting.
- Testing and Tooling - tsconfig, lint/format expectations, and testing conventions.