ts-code-scan

A guide for scanning a code folder and reporting its structure. It identifies constants, types, functions, React components, hooks, classes, enums, and exports, and can show a file tree.

In plain words
What is it for?
Use it to inventory a folder, count or list code declarations, inspect React components and hooks, find exports, build a tree, and produce a human-readable report.
Why use it?
It replaces manual browsing when you need to understand what code exists and verify that files were parsed without errors.

Skill for Claude CodeCodex

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 skills/nikuscs/scanr/ts-code-scan
Any agent
npx skills add nikuscs/scanr --skill ts-code-scan
Clone the repo
git clone --depth 1 https://github.com/nikuscs/scanr

Made for: Claude Code, Codex.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,033 The whole file, excluding the scripts and references it only reads on demand.
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.00034 $0.01033
Opus 5 $0.00017 $0.00517
Sonnet 5 $0.00007 $0.00207
Haiku 4.5 $0.00003 $0.00103

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

Security

Grade A, and why

ts-code-scan 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 2d 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.

plugin/skills/ts-code-scan/SKILL.md · 82 lines

How it starts

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

If scanr is missing: brew install nikuscs/tap/scanr. Presenting findings to a human → REPORTING.md.

For any folder, run one inventory (not verbose, not compact, not head):

scanr scan --mode inventory --root <path>

Done when stats.parsed == stats.files and stats.errors == 0. List nonzero skipped/errors. Then answer from the JSON keys below. Add --lines only if the user wants line numbers.

Get all constants

Use constants. Each row is {file, name, kind} where kind is primitive or arrow (const Foo = () => {} is arrow).

Counts: constants.length, split by kind. A “quick list” is the names, or UPPER_SNAKE names if they want real constants not hook locals.

Get all types

Use types. Each row is {file, name, kind} where kind is interface or type.

Get all functions / components / hooks / classes / enums / exports

Same inventory JSON:

  • functions — named functions (dotted if nested)
  • components — React components (.tsx + JSX + Uppercase)
  • hooks — declarations named use + uppercase, not useState calls
  • classes
  • enums
  • exports

Get a tree

scanr tree --root <path>

--path <subdir> to focus. --functions for function markers. --function-details when they want nested components/functions explained. --health --only-findings --top 20 for hotspots. Return the command output as printed.

Usages of a name

scanr refs <name> --root <path>

Name-level oxc + import remapping, not tsserver. Usages exclude the declaration line.

Rename a symbol

scanr rename <Name> <NewName> --root <path>
scanr rename src/card.tsx#Name <NewName> --root <path>   # when the bare name is ambiguous

Type-accurate via the TypeScript language service: imports, exports, aliases (public names preserved), barrels, JSX, interface/enum members, dynamic imports. Requires bun or node on PATH and a tsconfig.json (--tsconfig <path> when not at the root). --dry-run prints planned files and writes nothing.

Read the full file on GitHub · 82 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 82 lines · 34 tokens per session scan A d811507d70e9

Subscribe to this mod's changes

ts-code-scan is a skill published in the GitHub repository nikuscs/scanr (10 stars, last pushed 7d ago), licensed MIT. It adds 34 tokens to every session and 1,033 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

vector-collection-management

Create, populate, list, and delete vector-store collections through the vector-mcp MCP server's vectorcollectionmanagement tool. Use when the agent must stand up a new RAG collection, ingest documents (from a directory, file paths/URLs, or raw text) into an existing collection, enumerate collections, or drop one …

Knuckles-Team/vector-mcp · 123 tokens

vector-databases

Vector database operations — embed, store, search, and build RAG pipelines.

furkangonel/cowrangler · 21 tokens

ai-rag-pipeline-architect

Activate when architecting, implementing, or optimizing Retrieval-Augmented Generation (RAG) systems, semantic vector search, document chunking, hybrid search, and reranking pipelines — trigger phrasings include "build a RAG pipeline for my documents", "how do I chunk PDFs for vector search", "setup pgvector in…

ieeecsopen/mcp-cs · 134 tokens

esm

Comprehensive toolkit for protein language models including ESM3 (generative multimodal protein design across sequence, structure, and function) and ESM C (efficient protein embeddings and representations). Use this skill when working with protein sequences, structures, or function prediction; designing novel…

synthetic-sciences/openscience · 86 tokens

parse-document

Convert a PDF, scan, image of a page, or office file to clean markdown through the connected Superlinked MCP edge, so the source document is not read into model context directly. Use when the user asks to read, parse, OCR, extract from, summarize, or answer questions about a document.

superlinked/sie · 64 tokens

uteke-memory

Persistent memory engine for AI agents via the uteke CLI — remember, recall, search, forget with semantic + FTS5 hybrid search, documents, knowledge graph, rooms, tiered memory, and multi-agent namespaces.

codecoradev/uteke · 44 tokens