Skip to content
backnotprop avatar

Typescript Best Practices

Strict type-system rules for TypeScript files, enforced via discriminated unions, branded types, and narrowing.

CCM score
61 of 100
skills.sh installs
13.5K
GitHub stars
5.5K
last updated
Nov 30, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers discriminated unions, branded types, constructive modeling, and schema-derived types, with unknown replacing any for external data
  • Bans as casts outside post-validation use and ranks narrowing: discriminant switch, in, typeof/instanceof, then type guards
  • Enforces exhaustiveness via const _exhaustive: never = x; and requires type guards to verify their claim, named isX or hasX
  • Designed for TypeScript and TSX codebases, loading automatically when .ts or .tsx files are read or edited

Install

$ npx -y skills add backnotprop/pstack --skill typescript-best-practices -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

TypeScript best practices

Apply the type-system-discipline principle skill first.

Details

Repository
github.com/backnotprop/pstack
Category
Code Review & Quality
First seen
Nov 30, 2026

More from backnotprop/pstack

All 44

Similar to Typescript Best Practices

More Code Review & Quality