Skip to main content

typescript-rust-pattern

Étoiles10
Forks0
Mis à jour18 juin 2026 à 22:19

Apply Rust-inspired safety patterns to TypeScript code. Use this skill whenever writing or reviewing TypeScript — especially when adding types, handling errors, validating external data (APIs, file input, user input), designing state machines, or refactoring legacy code with loose booleans or try/catch. It covers four patterns: discriminated unions (eliminate impossible states), Result types (explicit failures), schema-based parsing at boundaries (parse don't validate), and explicit mutability. If the user is working with TypeScript and mentions any of these concepts, or if their code shows patterns like boolean overloads, untyped throw, or unchecked external data, apply this skill.

Installation

Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.

SKILL.md
readonly