type-patterns

Community

Type-safe error patterns for robust TypeScript.

AuthorHigashi-Kota
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill helps developers replace throw-based error handling with a typed Result type and discriminated unions, enabling safer and more predictable control flow in TypeScript.

Core Features & Use Cases

  • Type-Safe Result type and discriminated unions for error modeling.
  • Exhaustive pattern matching with ts-pattern to guarantee all cases are handled.
  • Patterns for immutable data handling and safer domain logic across APIs, validation, and data transformations.

Quick Start

Try implementing a function that returns a Result<number, AppError> instead of throwing, and demonstrate exhaustive handling with ts-pattern in the caller.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: type-patterns
Download link: https://github.com/Higashi-Kota/llm-mermaid-chat/archive/main.zip#type-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.