Skip to content
appsgit

TypeScript Discriminated Unions

TypeScript Discriminated Unions is an agent skill (a SKILL.md file) from mkosir/typescript-style-guide. Apply, review, and explain discriminated unions in TypeScript. It works with Claude Code and has 783 GitHub stars across a repository of 2 listed skills. Install it by copying the skill folder into your agent's skills directory.

github.com/mkosir/typescript-style-guide/skills/typescript-discriminated-unions (opens in a new tab)

Data as of from the GitHub API and skills.sh; description from the skill's SKILL.md. Report an error

Add this skill

Claude

Claude Code loads skills from ~/.claude/skills/ (all projects) or .claude/skills/ (one project):

git clone --depth 1 https://github.com/mkosir/typescript-style-guide.git
cp -r typescript-style-guide/skills/typescript-discriminated-unions ~/.claude/skills/typescript-discriminated-unions   # personal, or .claude/skills in a project

In the Claude apps, zip the typescript-discriminated-unions folder and upload it under Customize > Skills > + > Upload a skill (code execution must be on).

ChatGPT / Codex

Codex reads skills from .agents/skills/ in a repo or ~/.agents/skills/ for every project:

git clone --depth 1 https://github.com/mkosir/typescript-style-guide.git
cp -r typescript-style-guide/skills/typescript-discriminated-unions .agents/skills/typescript-discriminated-unions   # repo; ~/.agents/skills for all projects

Standalone skills also load in the ChatGPT desktop app.

Cursor

Cursor loads skills from .cursor/skills/ (or ~/.cursor/skills/) and also reads .claude/skills/:

git clone --depth 1 https://github.com/mkosir/typescript-style-guide.git
cp -r typescript-style-guide/skills/typescript-discriminated-unions .cursor/skills/typescript-discriminated-unions   # project; ~/.cursor/skills for all projects

Source (checked Oct 7, 2026): code.claude.com/docs/en/skills (opens in a new tab), support.claude.com/en/articles/12512180-using-skills-in-claude (opens in a new tab), learn.chatgpt.com/docs/build-skills (opens in a new tab), cursor.com/docs/context/skills (opens in a new tab)

What this skill does

Apply, review, and explain discriminated unions in TypeScript. Use automatically for tasks involving mutually exclusive variants, invalid state prevention, exhaustiveness checking, variant-specific object properties, application state, function arguments, or React props. Apply the TypeScript Style Guide's discriminated-union conventions in the context of the current task.

When it triggers

  • Use automatically for tasks involving mutually exclusive variants, invalid state prevention, exhaustiveness checking, variant-specific object properties, application state, function arguments, or React props.

More skills in mkosir/typescript-style-guide

2 skills are listed from this repository.

Similar skills

More coding skills

All Coding

FAQ

TypeScript Discriminated Unions FAQ

Still curious? Email info@appsgit.com.

How do I install the TypeScript Discriminated Unions skill?

Copy the typescript-discriminated-unions folder (the one containing SKILL.md) into ~/.claude/skills/ for Claude Code, .agents/skills/ for Codex or .cursor/skills/ for Cursor. The agent picks it up automatically when a task matches its description.

Is the TypeScript Discriminated Unions skill free?

Yes. The repository is open source under the MIT license.

Is TypeScript Discriminated Unions maintained?

The repository's most recent commit was on Sep 3, 2026. appsgit only lists skills from repositories with a commit in the last six months.