Registry / posterus-ltd

posterus-ltd/yarkr-public/ts-narrowing-unions

Model domain states in TypeScript with discriminated unions, exhaustive switches checked by never, type guards, assertion functions and satisfies. Use when a type has optional fields that only make sense together, when handling states/events/results, or when adding a variant must force every handler to update.

Agent skill · version 0.0.0-arks-library.1792108577.gbefeb5a · from posterus-ltd/yarkr-public

Install

npx yarkr-cli add skill:posterus-ltd/yarkr-public/ts-narrowing-unions

Without Node.js, on macOS and Linux (curl or wget):

curl -fsSL https://yarkr.com/install.sh | sh -s -- add skill:posterus-ltd/yarkr-public/ts-narrowing-unions
wget -qO- https://yarkr.com/install.sh | sh -s -- add skill:posterus-ltd/yarkr-public/ts-narrowing-unions

On Windows, in PowerShell:

irm https://yarkr.com/install.ps1 | iex; yarkr add skill:posterus-ltd/yarkr-public/ts-narrowing-unions

Works with Claude Code, Codex, opencode, Cursor, any harness over MCP.