- Home
- Skills
- Ratacat
- Claude Skills
- Ts Morph Analyzer
ts-morph-analyzer_skill
- Python
24
GitHub Stars
5
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill ratacat/claude-skills --skill ts-morph-analyzer- package-lock.json12.4 KB
- package.json638 B
- setup.sh805 B
- SKILL.md6.2 KB
- tsconfig.json305 B
Overview
This skill provides lightweight TypeScript/JavaScript codebase analysis built on ts-morph to speed debugging, architecture review, and onboarding. It extracts function and method signatures with JSDoc, traces call hierarchies up and down, detects common code smells, and maps module exports without reading entire files. The goal is maximum architectural insight with minimal context and token use.
How this skill works
The analyzer queries the AST via ts-morph to extract signatures, JSDoc comments, and export lists while avoiding full-file expansions. It traces call chains by following references and call expressions to produce caller/callee trees and limited-depth paths. Additional scripts run focused checks for circular dependencies, large functions, many parameters, and missing documentation.
When to use it
- Debugging a bug by tracing where a value originates or where a return value is consumed
- Quickly understanding an unfamiliar codebase’s public API surface and documentation coverage
- Mapping module exports and dependency relationships before making architectural changes
- Reviewing code quality to find large functions, many-parameter APIs, or circular imports
- Extracting signatures and JSDoc to generate docs or to feed other analysis tools
Best practices
- Limit scope for large repositories with include globs (e.g., --include "src/**/*.ts") to improve speed
- Run extract-signatures on exported APIs first to get a high-level view before diving into internals
- Use depth limits when tracing call chains to avoid overwhelming output on dense graphs
- Ensure the project tsconfig.json is present so type information and references are accurate
- Exclude node_modules and generated folders to reduce noise and memory usage
Example use cases
- Trace callers of a failing function to find the validation gap causing incorrect input
- Produce a JSON API surface for a module to evaluate public interface complexity
- Detect circular dependencies and deep import chains before refactoring or splitting modules
- Locate large functions or many-parameter methods as candidates for refactoring
- Follow a data flow from entry point to sink to reproduce a bug without reading every file
FAQ
Yes. Run npm install in the skill directory or use the provided setup script to install ts-morph and runtime dependencies.
How do I limit analysis to a subset of files?
Use include/exclude globs or the --include flag to restrict the scanner to specific directories or file patterns.