swift-type-typed-design
Swift Type-Driven Design
Use this skill to design Swift models that encode business rules in types so invalid states are hard or impossible to represent.
Agent behavior contract
- Model domain concepts first, implementation details second.
- Prefer value semantics (
struct,enum) unless reference identity is required. - Replace primitive obsession with strong domain types only when it captures an essential invariant.
- Use "parse, do not validate": create validated values once, then pass validated types through the system.
- Favor compile-time guarantees over runtime checks.
- Keep changes incremental and local to the workflow being modeled.
- If introducing wrappers, improve call-site clarity, not just type novelty.
Quick decision tree
- Need the mental model and core principles?
- Read
references/modeling-playbook.md"Foundations" - Deep source: Fundamentals of type-driven code (
references/fundamentals-of-type-driven-code.md)
- Read
More from nonameplum/agent-skills
corebluetooth
Apple Core Bluetooth framework for BLE and Bluetooth Classic. Use for central/peripheral workflows, scanning, connecting, advertising, GATT services/characteristics, read/write/notify, L2CAP, background processing or state restoration, and error handling across Apple platforms.
44swift-package-manager
Swift Package Manager documentation - create packages, manage dependencies, build and test Swift code
33swift-health-kit
Apple HealthKit framework for health and fitness data. Use for reading/writing health samples, workout data, authorization flows, observer queries, background delivery, clinical records, activity rings, and integrating with the Health app across iPhone, Apple Watch, iPad, and visionOS.
30swift-composable-architecture
The Composable Architecture (TCA) - A library for building Swift applications with state management, composition, and testability
29swift-dependencies
A dependency management library for Swift with controlled, testable dependencies
26swift-docc
Official Swift DocC documentation markup and syntax reference
23