typescript-advanced-utility-types

typescript-advanced-utility-types is a skill for Claude Code from pantheon-org/tekhne. It costs 112 tokens per session (1,435 once invoked), scanned A, original, MIT.

A guide to TypeScript's built-in utility types, which transform existing type definitions, plus patterns for creating custom transformations. Examples include making fields optional, selecting fields, and deriving return types.

In plain words
What is it for?
Use it to reshape object types, select or exclude properties, make values read-only, derive function-related types, or build recursive and key-renaming transformations.
Why use it?
It helps reuse types instead of maintaining duplicate definitions that can drift apart. It also helps choose a standard utility before writing a custom one.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to reshape object types, select or exclude properties, make values read-only, derive function-related types, or build recursive and key-renaming transformations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pantheon-org/tekhne/utility-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 pantheon-org/tekhne --skill utility-types
Clone the repo
git clone --depth 1 https://github.com/pantheon-org/tekhne

Made for: Claude Code.

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-utility-types

README.md
[![agentmods](https://agentmods.dev/badge/skills/pantheon-org/tekhne/utility-types/github.svg)](https://agentmods.dev/skills/pantheon-org/tekhne/utility-types)
Your own site
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/utility-types"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/utility-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-utility-types

Your own site · 80×15
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/utility-types"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/utility-types.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,435 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.00112 $0.01435
Opus 5.5 $0.00045 $0.00574
Sonnet 5.5 $0.00022 $0.00287
Haiku 4.5 $0.00011 $0.00144

Measured 24d ago against content hash b2545019a957, 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-utility-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 24d ago.

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.

skills/development/typescript-advanced/utility-types/SKILL.md · 131 lines

How it starts

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

TypeScript Utility Types

The standard library of type transformations: which built-in utility type fits a given shape change, and how to build a custom one when none does.

Mindset

Reach for a built-in utility type before writing a custom one — Partial<T>, Pick<T, K>, ReturnType<typeof fn> and their relatives cover the overwhelming majority of shape transformations, and a hand-rolled equivalent is one more thing to keep in sync with the type it derives from. When a built-in genuinely doesn't fit (a transform needs to recurse into nested objects, or apply a key-by-key rename), build the custom version as a mapped type over the real source type rather than a parallel interface maintained by hand. Combine utilities rather than inventing a new named type for every combination: Partial<Pick<T, K>> is more honest about what it does than a bespoke PartialSubset<T, K> that hides the same composition behind a name.

When to Apply

Use this skill when:

  • Making some or all properties of a type optional or required (Partial, Required)
  • Selecting or excluding specific properties (Pick, Omit)
  • Making a type read-only or building a lookup type (Readonly, Record)
  • Filtering members out of or into a union (Extract, Exclude)
  • Stripping null/undefined or unwrapping a Promise (NonNullable, Awaited)
  • Extracting a function's return type, parameters, constructor parameters, or instance type
  • Remapping object keys in a mapped type with an as clause
  • Building a custom mapped type because no built-in utility fits

Use When

  • "Is there a built-in utility type for this, or do I need to write my own?"
  • "How do I extract just the parameter types from this function signature?"
  • "How do I make every property in this type optional except one?"
  • "How do I rename or filter keys while mapping over a type?"

Scope

In Scope

  • Every TypeScript built-in utility type (Partial, Required, Pick, Omit, Readonly, Record, Extract, Exclude, NonNullable, Awaited, ReturnType, Parameters, ConstructorParameters, InstanceType, ThisParameterType, OmitThisParameter).
  • Key remapping in mapped types (as clauses, key filtering).
  • Custom mapped types for transforms no built-in covers.

Read the full file on GitHub · 131 lines

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. 24d ago First seen · 131 lines · 112 tokens per session scan A b2545019a957

Subscribe to this mod's changes

typescript-advanced-utility-types is a skill published in the GitHub repository pantheon-org/tekhne (10 stars, last pushed yesterday), licensed MIT. It adds 112 tokens to every session and 1,435 once invoked, about $0.0004 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-24.

Related

Other skills, from other repositories

developing-genkit-js

Develop AI-powered applications using Genkit in Node.js/TypeScript. Use when the user asks about Genkit, AI agents, flows, or tools in JavaScript/TypeScript, or when encountering Genkit errors, validation issues, type errors, or API problems.

google/skills · 60 tokens

antfu

Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier alternatives, monorepos, library publishing, or when the user mentions Anthony Fu's preferences.

antfu/skills · 52 tokens

setup-ts-deep-modules

A setup for TypeScript packages that hides their implementation behind files at the package root. Dependency-cruiser checks that outside code uses these entry points, prevents dependency cycles, and keeps internal folders private.

devcxl/mattpocock-skills-zh · 49 tokens

aws-lambda-typescript-integration

Provides AWS Lambda integration patterns for TypeScript with cold start optimization. Use when creating or deploying TypeScript Lambda functions, choosing between NestJS framework and raw TypeScript approaches, optimizing cold starts, configuring API Gateway or ALB integration, or implementing serverless TypeScript…

giuseppe-trisciuoglio/developer-kit · 95 tokens

loom-typescript

TypeScript language expertise for type-safe, production-quality code.

cosmix/loom · 16 tokens

senior-frontend

Frontend development for React 19, Next.js 15, TypeScript, and Tailwind CSS v4 / Pengembangan frontend dengan React 19, Next.js 15, TypeScript, dan Tailwind CSS v4.

roedyrustam/vibes-plug · 50 tokens