Skip to content

TypeScript Advanced Types

Guides the agent through TypeScript generics, conditional, mapped and template literal types

Repository
wshobson/agents
Stars
42,095
Licence
MIT
Files
2 files

What it does

Once installed, the agent gets a reference guide on TypeScript's advanced type system, so when you ask for complex typing it can write generics, conditional types, mapped types, template literal types and utility types with clearer, more type-safe patterns. It includes worked code examples and best-practice notes, and points to a longer companion file for further patterns. It is guidance only: it shapes the code the agent writes rather than running tools.

Great for

  • TypeScript developers building libraries or reusable typed utilities
  • Teams migrating JavaScript code to TypeScript who want stricter types
  • Developers designing type-safe API clients or configuration objects

Skip it if

  • Beginners who only need basic TypeScript annotations, since the skill assumes familiarity with generics and type syntax
  • Projects not using TypeScript, where the advice does not apply
  • Anyone expecting the agent to verify types automatically: the skill's type-testing section is incomplete in the file and the agent still needs your compiler to check results

Try asking

  • “Create a generic function that merges two objects and keeps both types in the result”
  • “Write a mapped type that makes every property of my Config interface readonly and optional”
  • “Build a type that generates getter method names from the keys of my Person interface”
  • “Explain how to use conditional types to extract the return type of a function”
Step-by-step guide: how to use TypeScript Advanced TypesInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    typescript-advanced-types.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip typescript-advanced-types.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip typescript-advanced-types.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Name the TypeScript version and strict-mode settings in your request so the generated types match your compiler.
  • Ask the agent to show a type test or run tsc on the result, since the skill itself does not execute checks.
  • Start with a concrete example of the data shape you need; the skill works best on specific type problems.

What's inside

  • references/details.md
  • SKILL.md

Redistributed unmodified from wshobson/agents under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.