typescript-narrowing-expert - Skill Dossier
typescript-narrowing-expert

typescript-narrowing-expert

Use when designing discriminated unions, debugging control-flow analysis, choosing satisfies vs as, building branded types, writing user-defined type guards, or composing conditional types and template literal types. Triggers: "Type X is not assignable to type Y" after a type guard, exhaustiveness checks via never, satisfies vs explicit annotation, infer in conditional types, mapped types with key remapping, distributive conditional types, type-narrowing inside callbacks losing the narrowed type. NOT for runtime validation only (zod/yup), tsc compiler internals, or design-time-only types not used at runtime.

Frontend & UI
#typescript#type-system#generics#narrowing#discriminated-unions#branded-types

Allowed Tools

ReadGrepGlobEditWriteBash

Share this skill

Skills use the open SKILL.md standard — the same file works across all platforms.

Install all 547 skills as a plugin
claude plugin marketplace add curiositech/windags-skills claude plugin install windags-skills

Claude activates typescript-narrowing-expert automatically when your task matches its description.

View on GitHub