ts-codemap

Build a persistent graph of TypeScript/JavaScript files, symbols, and edges.

5|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/kenlck/skills --skill ts-codemap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ts-codemap
Source: https://github.com/kenlck/skills/tree/main/ken-swe/skills/ts-codemap
Command: npx skills add https://github.com/kenlck/skills --skill ts-codemap

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ts-morph, tsx, and includes scripts (resource) components.

What problem does it solve?

Build and maintain a persistent structural index of a TypeScript/JavaScript codebase under .codemap/ (graph.json + MAP.md), so other skills explore the map instead of grep + read loops. It uses ts-morph for high-fidelity TS/JS parsing (tsconfig path aliases, re-export flattening, JSX). Use when the user asks to build, refresh, or update the codemap in a TS/JS repository, when starting work in an unfamiliar TS/JS repo, or before any exploration phase that would otherwise scan source files. For Java/Go/Python/Rust repos, use the language-agnostic codemap skill instead.

Core Features & Use Cases

  • Persistent, file-based map of a TS/JS codebase under .codemap/ with graph.json and MAP.md that other skills can read to navigate the codebase.
  • TS/JS-specific parsing via ts-morph (handles tsconfig path aliases, re-export flattening, and JSX) and symbol graph generation.
  • Incremental builds with per-file SHA256 caching and a deterministic graph format; includes Next.js route detection and re-exports resolution for stable IDs.

Quick Start

Run the codemap build against your repository to generate the mapping under .codemap/.

Frequently Asked Questions about ts-codemap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map a TypeScript codebase without using grep and read loops?

A persistent codebase map generated under .codemap/ provides a structural index of files, symbols, and edges, allowing exploration skills to navigate the graph instead of running repetitive grep and read loops.

Does the codebase mapping tool work with tsconfig path aliases and JSX?

Yes, the codebase map uses ts-morph for high-fidelity TypeScript and JavaScript parsing, which correctly resolves tsconfig path aliases, flattens re-exports, and processes JSX syntax.

Can I build a persistent code map for a JavaScript repository?

Yes, you can build a persistent structural index for JavaScript or TypeScript repositories that outputs graph.json and MAP.md files under the .codemap/ directory for subsequent exploration.

What is the best way to update a code map after a major refactor?

Running the codemap build refreshes the structural index by using per-file SHA256 caching to perform incremental updates, ensuring the graph accurately reflects changes after major refactors.

When should I not use this TypeScript codebase mapper?

You should not use this TypeScript-specific mapper for Java, Go, Python, or Rust repositories; instead, use a language-agnostic codemap skill to parse and index those non-TS/JS codebases.

How does incremental codebase mapping handle unchanged files?

Incremental codebase mapping caches per-file SHA256 results, allowing the build process to skip unchanged source files and deterministically update only the modified parts of the graph.