learn
無料Extract reusable patterns from non-trivial work in the is-kit repository and store them as project knowledge. Use after meaningful API design, type-system work, debugging, or compatibility discoveries.
日本語の概要は準備中です。原文の説明を表示しています。
Create, compose, migrate, and review TypeScript runtime type guards with is-kit. Use when adding reusable guards; replacing typeof, null checks, or handwritten type predicates; narrowing unknown values; validating JSON or API responses; building collection or object schemas with struct or typedStruct; or reviewing existing is-kit usage. Do not use for one-off environment checks or validation that requires data transformation or rich error reporting.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Build runtime checks that preserve TypeScript control-flow narrowing without inventing project architecture or duplicating guards that already exist.
is-kit version from the package manifest and lockfile.Do not add a wrapper layer merely because this skill mentions one. If the
project already has an is-kit boundary, respect it; otherwise import from
is-kit directly.
Read guard-selection.md when choosing between built-ins, logical combinators, custom predicates, equality guards, and collection combinators.
For object or API response validation, always read
object-validation.md before choosing
struct, typedStruct, optionalKey, or safeParse.
For replacement or cleanup work, read migration-checklist.md before changing manual checks.
Prefer composition over a handwritten type-predicate signature. Keep guards total, deterministic, and side-effect free.
Avoid creating a global guard from a one-off payload projection. Avoid moving domain knowledge into a generic guard module.
unknown.as assertion when the new guard makes it unnecessary.safeParse when the success branch consumes the validated value; call a
guard directly when only a boolean decision is needed.Add focused tests using the project's existing test tools:
Run the narrowest relevant test, typecheck, lint, and formatting commands. Inspect the final diff for unrelated formatting or generated-file changes.
typeof window === 'undefined' merely for stylistic consistency.is-kit unless the task requires an API unavailable in the
installed version or the user requests the upgrade.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Extract reusable patterns from non-trivial work in the is-kit repository and store them as project knowledge. Use after meaningful API design, type-system work, debugging, or compatibility discoveries.
日本語の概要は準備中です。原文の説明を表示しています。
Run Prettier for the is-kit repository. Use when asked to format or check formatting in this project. Always consult AGENTS.md in the repo root before executing commands.
日本語の概要は準備中です。原文の説明を表示しています。