Writing strong TypeScript code is easier with these best practices. The type system helps catch errors before your code runs. This skill focuses on using types to avoid bugs and write cleaner code.
One key idea is to make impossible states impossible. Use discriminated unions to represent different states like loading, success, or error. Use branded types to keep different IDs separate. An exhaustive switch with a never check ensures you handle every case.
For data from the outside world, use Zod to validate and parse input. Zod lets you define a single source of truth for your data shape and infer the TypeScript type. Use safeParse for user input and parse for trusted data to enforce correctness.
Global
mkdir -p ~/.claude/skills/typescript-best-practicesProject
mkdir -p .claude/skills/typescript-best-practicesSource Repository
Typescript Advanced Typeswshobson/agents
Master advanced TypeScript types for safer and more flexible code
Python Executorqu-skills/skills
Execute Python code safely with 100+ libraries for data, scraping, and media
Golang Error Handlingsamber/cc-skills-golang
Learn to create, wrap, inspect, and log Go errors like a professional engineer
Golang Performancesamber/cc-skills-golang
Speed up your Go code using proven patterns for allocation reduction and CPU efficiency
Golang Design Patternssamber/cc-skills-golang
Idiomatic Go patterns for clean constructors error handling and graceful shutdown
Golang Concurrencysamber/cc-skills-golang
Write safe Go concurrency with goroutines, channels, and sync primitives
Golang Contextsamber/cc-skills-golang
Master Go context for cancellations, timeouts, and request values
Golang Data Structuressamber/cc-skills-golang
Optimize Go data structures for speed and memory efficiency with internals knowledge