Skip to main content

typescript-rust-pattern

スター10
フォーク0
更新日2026年6月18日 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.

インストール

Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。

SKILL.md
readonly