ts-code-scan

ts-code-scan is a skill for Claude Code from nikuscs/scanr. It costs 38 tokens per session (1,274 once invoked), scanned A, original, MIT.

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 Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the scanr plugin — 1 skill shipped together

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nikuscs/scanr/ts-code-scan
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.

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.

Or install scanr, the plugin that ships this one along with the rest of its 1 skill.

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-code-scan

README.md
[![agentmods](https://agentmods.dev/badge/skills/nikuscs/scanr/ts-code-scan/github.svg)](https://agentmods.dev/skills/nikuscs/scanr/ts-code-scan)
Your own site
<a href="https://agentmods.dev/skills/nikuscs/scanr/ts-code-scan"><img src="https://agentmods.dev/badge/skills/nikuscs/scanr/ts-code-scan/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 ts-code-scan

Your own site · 80×15
<a href="https://agentmods.dev/skills/nikuscs/scanr/ts-code-scan"><img src="https://agentmods.dev/badge/skills/nikuscs/scanr/ts-code-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,274 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00038 $0.01274
Opus 5.5 $0.00015 $0.00510
Sonnet 5.5 $0.00008 $0.00255
Haiku 4.5 $0.00004 $0.00127

Measured yesterday against content hash 7c9d1f403ac8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 yesterday.

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 · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 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.

Xray a project

When the user wants a quick overview of an unfamiliar repo:

scanr xray --root <path>

One Markdown page: shape, health hotspots, slop counts, and duplicate groups. --top <n> limits rows per section; --json for structured output. Return the output as printed, then drill in with tree --health, slop, or dupes.

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

Read the full file on GitHub · 94 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. yesterday Changed · +12 lines · +4 tokens per session 7c9d1f403ac8
  2. 1mo 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 yesterday), licensed MIT. It adds 38 tokens to every session and 1,274 once invoked, about $0.0002 per session on Opus 5.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

cocosearch-review-pr

Use when reviewing a GitHub PR or GitLab MR by URL. Fetches diff and metadata via API, then uses CocoSearch for blast radius analysis, dependency impact, pattern consistency, and test coverage assessment. Read-only by default; optionally pushes findings back as inline PR/MR comments after your confirmation.

VioletCranberry/coco-search · 68 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

find-simplifications

Use for a periodic repo-wide sweep of qwen-code for accumulated excess surface — dead components and files, orphaned locale keys, exports nothing consumes, added-then-removed scaffolding — filing candidates on a tracking issue and landing only what a maintainer has said yes to. Repo-wide and evidence-first; every…

QwenLM/qwen-code · 103 tokens

swarm-pr-review

Run a graph-guided, tool-augmented PR review using context packing, parallel exploration, mandatory repository-agnostic risk-family coverage with dispatch scaled to diff size and risk, independent reviewer validation, critic challenge, and metrics writeback. Use for deep pull request review with low false-positive…

ZaxbyHub/opencode-swarm · 91 tokens

code-review

You are a senior code reviewer. You receive diffs via stdin.

jrswab/axe · 0 tokens

include-test-files-that-assert-on-behavior-being-changed-in-decl

When delegating a task affected by this skill, include.

ZaxbyHub/opencode-swarm · 29 tokens