TypeScript Type Analyzer skill for Claude and Codex
Maps every type in a TypeScript codebase into a machine-readable inventory: members, extends and implements links, and a plain summary, so you can see the…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when you need an inventory of every interface, type alias, enum, and class in TypeScript code and how they extend or reference each other, as JSON. Do not use for generating new types, documenting types for readers, or changing any of the declarations. Related topics: coding, typescript.
What it will ask you for
- TypeScript source (longer free text)
- File paths covered (free text, e.g. "src/models/*.ts")
- Include types from external modules (choose one: Yes, No)
- Detail level (choose one: Summary, Full, Debug)
- Show inheritance tree (choose one: Yes, No)
- Declaration kinds to include (choose any: Interface, Type alias, Enum, Class, Namespace)
How it works
- Record each declaration of the chosen kinds with name, kind, file, export status, generics, and members at the requested detail level.
- Classify each type alias by shape (object, union, intersection, mapped, conditional, primitive) so consumers know how it can be used.
- Capture every extends, implements, reference, and union-membership link between declarations as a relationship entry.
- Build the inheritance tree when requested and flag cycles and unreferenced types as cleanup candidates.
- Write the summary with counts per kind, the most-referenced types, and any duplicate shapes, then validate the JSON parses.
What you get
One JSON object with 2-space indentation and the keys types, relationships, and summary, with nothing before or after it.
What it watches out for
- Expanding types from node_modules when external modules were excluded, which buries the project's own types in noise.
- Treating a type reference inside a member as an extends link, which draws an inheritance tree that does not exist.
- Emitting a trailing comma or a comment inside the JSON, so the tool consuming the report fails to parse it.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.