# Typescript Conventions

> Apply TypeScript conventions for composition, small single-purpose functions, tests for new functions, and formatter and import-alias discipline. Use when writing or reviewing TypeScript files.

- Skill: `msolecki/typescript-conventions` (Agent Skill)
- Install (CLI): `npx get-skill add msolecki/typescript-conventions`
- Raw SKILL.md: https://api.skillmd.com/api/skills/msolecki/typescript-conventions/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: msolecki (https://skillmd.com/u/msolecki)
- Updated: 2026-11-14
- Page: https://skillmd.com/skills/msolecki/typescript-conventions

---


# TypeScript rules

- Keep `strict` mode enabled in `tsconfig.json`; never turn it off to make a build pass.
- Prefer composition over inheritance.
- Give every function one purpose and keep it near 30 lines or fewer.
- Add tests for every new exported function or changed contract and its edge cases. See `developer-os:testing-conventions` for how to write them.
- Follow the quote style and formatting the project's formatter enforces.
- Use the project's configured import alias instead of long relative paths.

