Type-driven design helps you write safer code by catching mistakes before your program runs. The computer's type checker becomes your first line of defense. You can make invalid states impossible to represent in the first place.
Common patterns include newtype wrappers for primitive values and type state machines that enforce valid transitions. PhantomData marks type parameters without holding data. Marker traits and sealed traits control which types have certain capabilities. The builder pattern guides gradual construction step by step.
These techniques reduce runtime errors and make your code easier to understand. Anyone who writes code can benefit from moving checks from runtime to compile time.
Global
mkdir -p ~/.claude/skills/m05-type-drivenProject
mkdir -p .claude/skills/m05-type-drivenSource 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 Data Structuressamber/cc-skills-golang
Optimize Go data structures for speed and memory efficiency with internals knowledge
Golang Contextsamber/cc-skills-golang
Master Go context for cancellations, timeouts, and request values