·branded-types

Use when primitive types need semantic distinction. Use when string or number types have different meanings. Use when you need nominal typing.

2Installs·0Trend·@marius-townhouse

Installation

$npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill branded-types

SKILL.md

TypeScript uses structural typing, but sometimes you need nominal typing - values that are distinct because you SAY they are, not because they have different shapes. Brands let you do this without runtime overhead.

You can't actually create a value that is both a string and has a brand property:

Response: Type aliases don't prevent mixing up different string types.

Use when primitive types need semantic distinction. Use when string or number types have different meanings. Use when you need nominal typing. Source: marius-townhouse/effective-typescript-skills.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill branded-types
Category
</>Dev Tools
Verified
First Seen
2026-02-05
Updated
2026-02-18

Quick answers

What is branded-types?

Use when primitive types need semantic distinction. Use when string or number types have different meanings. Use when you need nominal typing. Source: marius-townhouse/effective-typescript-skills.

How do I install branded-types?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill branded-types Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/marius-townhouse/effective-typescript-skills