writing-ts

Installation
SKILL.md

Writing TypeScript

Built-ins

Prefer language/runtime built-ins over hand-rolled equivalents (e.g. for await over manual stream readers).

Write for the project's configured runtime and lib target. Don't hand-roll workarounds for features the target lacks — say so instead.

Braces

Always use braces {} for if statements, even single-line ones. Never write braceless if.

Object.assign

Avoid Object.assign(). If it truly cannot be avoided, add a comment explaining why it is safe.

JSDoc

Document every function with JSDoc; only trivial one-liners may be skipped. The goal is not to restate types (TypeScript already has them) but to make the function's intent and behavior obvious to someone reading or calling it.

Installs
6
First Seen
Sep 27, 2026