ts-inspect-cli AGENTS.md

ts-inspect-cli AGENTS.md is an instructions file for Codex, OpenCode from Brainy-Builds/ts-inspect-cli. It costs 1,488 tokens per session, scanned A, original, MIT.

A read-only command-line tool that asks the TypeScript compiler for resolved type information from a project.

In plain words
What is it for?
Use it to inspect function parameters, return types, object properties, symbol types, and other compiler-resolved details.
Why use it?
It avoids opening many files or guessing types when you need semantic answers about TypeScript code.

Instructions file for CodexOpenCode

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.

agentmods
npx agentmods add instructions/brainy-builds/ts-inspect-cli/agents-md
Clone the repo
git clone --depth 1 https://github.com/Brainy-Builds/ts-inspect-cli

Made for: Codex, OpenCode.

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-cli AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/brainy-builds/ts-inspect-cli/agents-md.svg)](https://agentmods.dev/instructions/brainy-builds/ts-inspect-cli/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/brainy-builds/ts-inspect-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/brainy-builds/ts-inspect-cli/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,488 This file is loaded in full into every session.
When invoked 1,488 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01488 $0.01488
Opus 5 $0.00744 $0.00744
Sonnet 5 $0.00298 $0.00298
Haiku 4.5 $0.00149 $0.00149

Measured 3d ago against content hash dfee022c4325, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ts-inspect-cli AGENTS.md 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 3d 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.

AGENTS.md · 164 lines

How it starts

The opening of the file, as written. The whole thing — 164 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 · 164 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. 3d ago First seen · 164 lines · 1,488 tokens per session scan A dfee022c4325

Subscribe to this mod's changes

ts-inspect-cli AGENTS.md is an instructions file published in the GitHub repository Brainy-Builds/ts-inspect-cli (2 stars, last pushed 14d ago), licensed MIT. It adds 1,488 tokens to every session, about $0.0074 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 instructions, from other repositories

vscode tree-widgets.instructions.md

Use when asked to consume workbench tree widgets in VS Code.

microsoft/vscode · 1,456 tokens

vscode accessibility.instructions.md

Use when implementing accessibility features, ARIA labels, screen reader support, accessible help dialogs, or keybinding scoping for accessibility. Covers AccessibleContentProvider, CONTEXTACCESSIBILITYMODEENABLED, verbosity settings, and announcement patterns.

microsoft/vscode · 611 tokens

vscode design-philosophy.instructions.md

VS Code design philosophy — the shared Values→Principles→Moves vocabulary for reasoning about UI in design terms rather than raw pixels. Use when creating, editing, or reviewing any visual surface (CSS, DOM, theming, icons, motion). Name the value/principle before reaching for a token.

microsoft/vscode · 577 tokens

deepagents AGENTS.md

AGENTS.md instructions for langchain-ai/deepagents, covering global development guidelines for the deep agents monorepo, corridor security analysis, development workflow, suppressing ruff rules and pr conventions.

langchain-ai/deepagents · 2,268 tokens

ui-components AGENTS.md

AGENTS.md instructions for starc007/ui-components, covering beui v2 — agent guide, commands, layout, component catalog and components (motion category — primitives).

starc007/ui-components · 6,559 tokens

windmill AGENTS.md

AGENTS.md instructions for windmill-labs/windmill, covering windmill, workflow, documentation, dev environment and per-worktree ports and database.

windmill-labs/windmill · 4,072 tokens