What problem does it solve? Unstructured business logic often mixes validation with side effects and throws unpredictable exceptions, making services hard to test and maintain. This Skill enforces a rigorous contract-first architecture where inputs are parsed, errors are returned as typed values, and handlers never throw. ## Core Features & Use Cases - Spec and Handler Separation: Define contracts (Zod schemas, error unions, interfaces) in spec.ts and impure implementations in handler.ts. - Result Pattern Error Handling: Replace exceptions with discriminated unions of Success and Failure, including error codes, messages, and recoverability flags. - Split Testing Strategy: Write contract tests for schema validation separately from mocked logic tests for handler behavior. - Use Case: When building a CLI command that reads files, define a spec that rejects path traversal input, then implement a handler that returns a typed FILE_NOT_FOUND result instead of crashing. ## Quick Start Ask the AI to scaffold a new service using the typed service contracts pattern with a Zod input schema, error union, and a non-throwing handler.