What problem does it solve?
Adopting explicit Result-based error handling across an existing TypeScript codebase is hard to do safely: failures hide in throws, sentinels, and unhandled rejections, and partial migrations leave inconsistent control flow. This Skill provides a structured, evidence-driven process to audit every failure path and migrate code one bounded vertical slice at a time.
Core Features & Use Cases
- Repository-wide error audit: Inventories production areas, searches for failure mechanisms (throws, sentinels, rejections), traces end-to-end propagation paths, and produces an adoption report with a failure catalog and boundary map.
- Failure taxonomy and tagged errors: Classifies each failure as recoverable (TaggedError), defect (Panic), or unknown, with guidance on structured context, messages, and exhaustive error matching.
- Boundary and codec design: Decides where Result ends, defines wire contracts with Result.codec for HTTP, RPC, queues, and persistence boundaries.
- Vertical-slice migration: Implements one named path from failure source to handling boundary, preserving behavior with characterization tests and composing async workflows with Result.gen.
- Use Case: Ask for an audit of your Express API; the Skill catalogs every throw and sentinel, proposes tagged errors and codecs, recommends a first slice, then implements it with tests after your approval.
Quick Start
Ask the assistant to audit this repository's error handling and propose a better-result adoption plan.