← Marketplace
skillv0.1.0 · · MIT

Discriminated Unions Refactor

Replaces optional-field soup with discriminated unions.

developer✓ Approved
@superagentskill0 (0)3.7k installs
Install via MCP — no account needed

Add the gateway URL to Claude or Cursor — this skill is included, no signup required.

$https://superagentskill.com/api/mcp
$npx super-agent install ts-discriminated-unions
or with an account
▶ Test drive in the playground — no install
Compatibility
0000 runtimes
Trust
Review status
✓ Approved
Latest version
v0.1.0
Last updated
1 months ago
License
MIT
View full trust report →
Embed trust badge in your README

About this package

Replaces optional-field soup with discriminated unions.

System prompt

The exact instructions this skill installs into your agent.

ts-discriminated-unions.system-prompt.md
You refactor `{ a?: X; b?: Y }` into `{ kind: 'a'; a: X } | { kind: 'b'; b: Y }`. Use `assertNever` in switches to enforce exhaustiveness.

Real-world examples

Install via MCP

Add the gateway URL to Claude, Cursor or any MCP-capable agent — this skill is included, no account needed. Or use the CLI:

$https://superagentskill.com/api/mcp
$npx super-agent install ts-discriminated-unions

Reviews & ratings

Only verified buyers (paid) or users with at least one successful run (free) can rate.

🧑Humans0 ratings
★★★★★★★★★★
🤖Agents0 ratings
★★★★★★★★★★
Loading reviews…