typescript-advanced-types

typescript-advanced-types is a skill for Claude Code from HigorAlves/orc. It costs 32 tokens per session (780 once invoked), scanned A, original, MIT.

A guide to TypeScript's advanced type system, which lets code describe reusable data shapes and catch more mistakes before it runs.

In plain words
What is it for?
Use it for generics, conditional and mapped types, template-literal types, type inference, utility types, and type guards.
Why use it?
It helps developers express complex relationships between values and get stronger checks when building reusable code, APIs, forms, or configuration.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Part of the orc plugin — 87 skills, 29 commands, 14 agents, 6 hooks shipped together

Good fit Use it for generics, conditional and mapped types, template-literal types, type inference, utility types, and type guards.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/higoralves/orc/typescript-advanced-types
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HigorAlves/orc --skill typescript-advanced-types
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc

Made for: Claude Code.

Or install orc, the plugin that ships this one along with the rest of its 87 skills, 29 commands, 14 agents, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for typescript-advanced-types

README.md
[![agentmods](https://agentmods.dev/badge/skills/higoralves/orc/typescript-advanced-types/github.svg)](https://agentmods.dev/skills/higoralves/orc/typescript-advanced-types)
Your own site
<a href="https://agentmods.dev/skills/higoralves/orc/typescript-advanced-types"><img src="https://agentmods.dev/badge/skills/higoralves/orc/typescript-advanced-types/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for typescript-advanced-types

Your own site · 80×15
<a href="https://agentmods.dev/skills/higoralves/orc/typescript-advanced-types"><img src="https://agentmods.dev/badge/skills/higoralves/orc/typescript-advanced-types.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 780 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.00780
Opus 5.5 $0.00013 $0.00312
Sonnet 5.5 $0.00006 $0.00156
Haiku 4.5 $0.00003 $0.00078

Measured today against content hash 557efe23b0b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

typescript-advanced-types scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

orc/skills/typescript-advanced-types/SKILL.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TypeScript Advanced Types

Guidance for mastering TypeScript's advanced type system — generics, conditional types, mapped types, template literal types, utility types, inference, and type guards — for building robust, type-safe applications.

When to Use This Skill

  • Building type-safe libraries or frameworks
  • Creating reusable generic components
  • Implementing complex type inference logic
  • Designing type-safe API clients
  • Building form validation systems
  • Creating strongly-typed configuration objects
  • Implementing type-safe state management
  • Migrating JavaScript codebases to TypeScript

How to Use

This file is a thin index. Identify which topic the task needs from the decision tree below, then Read the matching references/<topic>.md file for the detailed patterns and code. Load only the references you need; for a broad task you may read several.

Decision Tree

  • Need a reusable, type-flexible function/class/component (type parameters, constraints, builders, event emitters)? → references/generics.md
  • Need a type that branches on a condition (T extends U ? X : Y, distributive types, API client signatures)? → references/conditional-types.md
  • Need to transform an existing type's properties (readonly/partial, key remapping, filtering, deep transforms, form validation shapes)? → references/mapped-types.md
  • Need string-based types (event handler names, path strings, Uppercase/Capitalize)? → references/template-literal-types.md
  • Need built-in helpers (Partial, Pick, Omit, Record, Exclude), discriminated unions, type testing, best practices, pitfalls, or performance notes? → references/utility-types.md
  • Need to extract/infer a type from another (infer keyword, element/promise/parameter types)? → references/inference.md
  • Need runtime narrowing (type guards, value is T, asserts value is T)? → references/type-guards.md

Topic Reference Map

Topic Read this file Covers
Generics references/generics.md Generic functions, constraints, multiple type params, typed event emitter, type-safe builder
Conditional types references/conditional-types.md Basic/nested/distributive conditionals, infer return types, type-safe API client
Mapped types references/mapped-types.md Readonly/partial/optional, key remapping, property filtering, deep readonly/partial, form validation
Template literal types references/template-literal-types.md Template literals, string manipulation, recursive path building
Utility types references/utility-types.md Built-in utilities, discriminated unions, type testing, best practices, pitfalls, performance
Inference references/inference.md infer keyword — element, promise, and parameter extraction
Type guards references/type-guards.md User-defined type guards and assertion functions

Read the full file on GitHub · 51 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +1 lines · -17 tokens per session 557efe23b0b2
  2. 1mo ago First seen · 50 lines · 49 tokens per session scan A 34096fec91c2

Subscribe to this mod's changes

typescript-advanced-types is a skill published in the GitHub repository HigorAlves/orc (6 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 780 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.