type-expert

type-expert is an agent for Claude Code from GoogilyBoogily/googilyboogily-claude-power-tools. It costs 47 tokens per session (1,659 once invoked), scanned A, original, MIT.

A specialist for advanced TypeScript type programming, including generics, conditional and mapped types, template literals, recursive types, branded types, and type-checking performance.

In plain words
What is it for?
Resolving deeply nested or recursive type errors, designing constrained generic types, improving type-level performance, and debugging advanced TypeScript definitions.
Why use it?
It helps explain and fix difficult compiler errors caused by complex type definitions, while avoiding cases that are really about runtime behavior or build configuration.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the typescript-agents plugin — 3 agents shipped together

Good fit Resolving deeply nested or recursive type errors, designing constrained generic types, improving type-level performance, and debugging advanced TypeScript definitions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/googilyboogily/googilyboogily-claude-power-tools/type-expert
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.

Clone the repo
git clone --depth 1 https://github.com/GoogilyBoogily/googilyboogily-claude-power-tools

Made for: Claude Code.

Or install typescript-agents, the plugin that ships this one along with the rest of its 3 agents.

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 type-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/googilyboogily/googilyboogily-claude-power-tools/type-expert/github.svg)](https://agentmods.dev/agents/googilyboogily/googilyboogily-claude-power-tools/type-expert)
Your own site
<a href="https://agentmods.dev/agents/googilyboogily/googilyboogily-claude-power-tools/type-expert"><img src="https://agentmods.dev/badge/agents/googilyboogily/googilyboogily-claude-power-tools/type-expert/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 type-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/googilyboogily/googilyboogily-claude-power-tools/type-expert"><img src="https://agentmods.dev/badge/agents/googilyboogily/googilyboogily-claude-power-tools/type-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,659 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.00047 $0.01659
Opus 5 $0.00023 $0.00830
Sonnet 5 $0.00009 $0.00332
Haiku 4.5 $0.00005 $0.00166

Measured 9d ago against content hash dc86de21b453, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

type-expert 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 9d 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.

plugins/typescript-agents/agents/type-expert.md · 201 lines

How it starts

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

TypeScript Type Expert

You are an advanced TypeScript type system specialist. You handle type-level programming, complex generics, conditional types, template literals, recursive types, brand types, and type performance.

Step 0: Route or Stay

Signal Route to
Runtime type validation (zod, io-ts) typescript-expert
Build/compilation config issues build-expert
React component prop types react-expert
Database schema types database-expert
Runtime performance profiling performance-engineer
General TS code patterns typescript-expert
ESLint/formatting rules linting-expert

STOP -- do NOT engage if the problem is purely runtime, config-only, or has no type-system involvement.


Error Pattern Catalog

TS2589: "Type instantiation is excessively deep and possibly infinite"

Recursive type without termination. Fix with depth-limiting tuple counter:

// BAD
type Bad<T> = T extends object ? Bad<T[keyof T]> : T;

// GOOD: depth-limited
type Good<T, D extends readonly number[] = [0,1,2,3,4,5,6,7,8,9]> =
  D['length'] extends 0 ? T
  : T extends object ? Good<T[keyof T], Tail<D>>
  : T;
type Tail<T extends readonly unknown[]> =
  T extends readonly [unknown, ...infer R] ? R : [];

// Fallback: bail to `any` at depth limit
type DeepSafe<T, D extends number = 10> = D extends 0
  ? T extends object ? any : T
  : T extends object
    ? { [K in keyof T]: DeepSafe<T[K], [-1,0,1,2,3,4,5,6,7,8,9][D]> }
    : T;

TS2345/TS2322: "Could be instantiated with a different subtype"

Generic variance issue. Strengthen with intersection:

function process<T extends Base>(value: T & { required: string }): T {
  return value;
}

TS2536: "Type 'keyof T' cannot be used to index type 'U'"

type SafeGet<T, K extends PropertyKey> = K extends keyof T ? T[K] : never;

Conditional type not distributing as expected

type Dist<T> = T extends string ? T : never;       // distributive (per member)
type NoDist<T> = [T] extends [string] ? T : never;  // non-distributive (whole union)

Read the full file on GitHub · 201 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. 9d ago First seen · 201 lines · 47 tokens per session scan A dc86de21b453

Subscribe to this mod's changes

type-expert is an agent published in the GitHub repository GoogilyBoogily/googilyboogily-claude-power-tools (2 stars, last pushed 4mo ago), licensed MIT. It adds 47 tokens to every session and 1,659 once invoked, about $0.0002 per session on Opus 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.

Related

Other agents, from other repositories