Typed Service Contracts

Structures TypeScript commands and services with the spec-and-handler pattern: spec.ts with Zod input, output and exhaustive error-code schemas and a Result type, a handler.ts that never throws, and contract tests split from logic tests. Use when the user mentions spec and handler, parse-don't-validate, Result types instead of exceptions, Zod contracts, or wants a type-safe CLI command or service. Not for extracting duplicated logic (use service-layer-refactor).

The-Utopia-Studio Updated 2 repo stars

File contents

the-utopia-studio/skills commit fbc83eebd4

Frequently asked questions

npx get-skill add the-utopia-studio/typed-service-contracts