ts-inspect-cli: Skill for Claude Code

.claude/skills/ts-inspect/SKILL.md

ts-inspect is a skill for Claude Code from Brainy-Builds/ts-inspect-cli. It costs 44 tokens per session (1,535 once invoked), scanned A, original, MIT.

A command-line tool that uses the TypeScript compiler to report exact information about types, function parameters, return values, properties, and definitions.

In plain words
What is it for?
Use it to inspect TypeScript symbols and locations in projects with a tsconfig.json file, including projects that use path aliases.
Why use it?
It avoids guessing types from nearby code or searching through many files when compiler-resolved information is needed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is Brainy-Builds/ts-inspect-cli's own configuration. It tells Claude Code how to work on ts-inspect-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ts-inspect-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Brainy-Builds/ts-inspect-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Brainy-Builds/ts-inspect-cli/main/.claude/skills/ts-inspect/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Brainy-Builds/ts-inspect-cli

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 ts-inspect

README.md
[![agentmods](https://agentmods.dev/badge/skills/brainy-builds/ts-inspect-cli/ts-inspect.svg)](https://agentmods.dev/skills/brainy-builds/ts-inspect-cli/ts-inspect)
Your own site
<a href="https://agentmods.dev/skills/brainy-builds/ts-inspect-cli/ts-inspect"><img src="https://agentmods.dev/badge/skills/brainy-builds/ts-inspect-cli/ts-inspect.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,535 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.00044 $0.01535
Opus 5 $0.00022 $0.00767
Sonnet 5 $0.00009 $0.00307
Haiku 4.5 $0.00004 $0.00153

Measured 6d ago against content hash 8976ffbb6eed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ts-inspect 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 6d 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.

.claude/skills/ts-inspect/SKILL.md · 169 lines

How it starts

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

ts-inspect: Semantic Type Information

When an agent needs compiler-derived TypeScript information, prefer the local read-only ts-inspect CLI over opening many source files, guessing types from call sites, or plain-text grep for semantic questions. It answers compiler-resolved questions through ts-morph and emits compact deterministic JSON to stdout. It never modifies source files.

How to run

npx ts-inspect <command> <symbol|location|file>

The ts-inspect bin also works directly when it is on PATH:

ts-inspect <command> <symbol|location|file>

Prefer npx ts-inspect for portability, since the bin may not be on PATH in every project.

The CLI loads the project from the repository's tsconfig.json (discovered by walking up from the current working directory), so all configured compilerOptions.paths aliases resolve correctly through ts-morph. No manual alias parsing is performed.

Command cheat-sheet

  • Function parameters: npx ts-inspect params handleSubmit
  • Resolved return type: npx ts-inspect return fetchUser
  • Object/interface properties: npx ts-inspect properties UserConfig
  • Type of a symbol: npx ts-inspect type getButtonStyle
  • Type at a location: npx ts-inspect type src/path/to/file.ts:4:17
  • Signatures (overloads preserved): npx ts-inspect signature getButtonStyle
  • Declarations: npx ts-inspect definition generateSlug
  • Precise snapshot at a location: npx ts-inspect at src/hooks/useAuth.ts:10:15
  • Module imports: npx ts-inspect imports src/hooks/useAuth.ts
  • Module exports: npx ts-inspect exports src/utils/format.ts

Location syntax

relative/path/to/file.ts:LINE:COLUMN (also .tsx / .mts / .cts). Line and column are 1-based. Example:

npx ts-inspect at src/hooks/useAuth.ts:10:15

Usage hierarchy

Need exact TypeScript type information?
	-> ts-inspect

Need function object parameters?
	-> ts-inspect params

Need the resolved return type?
	-> ts-inspect return

Need object/interface properties?
	-> ts-inspect properties

Need the type of a symbol or at a location?
	-> ts-inspect type

Need call signatures (overloads preserved)?
	-> ts-inspect signature

Need where a symbol is declared?
	-> ts-inspect definition

Know an exact file location?
	-> ts-inspect at FILE:LINE:COLUMN

Need the imports of a file?
	-> ts-inspect imports FILE

Need the exports of a file?
	-> ts-inspect exports FILE

Need an AST structural pattern?
	-> ast-grep, if installed

Need plain text/string search?
	-> ripgrep

Need compiler validation?
	-> tsc --noEmit

Need lint/style enforcement?
	-> ESLint

Read the full file on GitHub · 169 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. 6d ago First seen · 169 lines · 44 tokens per session scan A 8976ffbb6eed

Subscribe to this mod's changes

ts-inspect is a skill published in the GitHub repository Brainy-Builds/ts-inspect-cli (2 stars, last pushed 17d ago), licensed MIT. It adds 44 tokens to every session and 1,535 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-08-31.

Related

Other skills, from other repositories

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

aws-sst-development

SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework. Use when writing or editing sst.config.ts, building infra/ modules (sst.aws.Function/Bucket/Dynamo/Cron/Service/Router, sst.Secret, sst.Linkable, raw aws. Pulumi resources), wiring resource links,...

sickn33/agentic-awesome-skills · 75 tokens

league-akari-shard-development

Use when creating, extending, refactoring, splitting, or reviewing League Akari main or renderer shards, including shard file organization, controller/loader/executor/handler boundaries, naming conventions, renderer TSX usage, platform guards, and public contract compatibility.

LeagueAkari/LeagueAkari · 58 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

migrate-better-result-3

Migrate a TypeScript codebase from better-result 2.x to 3.0. Use when upgrading better-result across the TaggedError syntax, removed Result serialization helpers, recovery inference, matching, or retry APIs.

dmmulroy/better-result · 52 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens