typescript
Installation
SKILL.md
TypeScript
TypeScript-specific guidelines for type safety and code organization.
Quick Reference
Do
- Use
import typefor type-only imports - Use
{ cause }when re-throwing errors - Let TypeScript infer types when obvious
- Create factory functions with
create*prefix - Prefer factory functions over classes
- Return
nullfrom handlers when request doesn't match - Use a logger instead of
console.log - Validate external data at runtime (fetch, filesystem, env vars, user input) with an existing validation library
Don't
Related skills
More from alexanderguy/skills
philosophy
Engineering philosophy and work culture principles. Load this skill when making architectural decisions or to understand the team's work principles.
17scribe
Maintain product, architecture, and implementation docs — routes input, detects gaps, and interviews for completeness
13code-review
Perform a code review or pull request review on a branch
13pull-request-review
Review a pull request by branch name or URL, using a git worktree
13style
General coding conventions for clean, maintainable code. Always load this skill when writing or reviewing code in any language.
12linear-create
Create well-structured Linear issues, projects, or initiatives
12