codemap

Index Java, Go, Python, and Rust codebases into graph.json and MAP.md.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tree-sitter-wasms, tsx, web-tree-sitter, and includes scripts (resource) components.

What problem does it solve?

Build and maintain a persistent structural index of a multi-language codebase under .codemap/ (graph.json + MAP.md) so teams can explore symbols, imports, and relationships without grep-and-read loops. It supports Java, Go, Python, and Rust, and is designed to be used after large refactors or at the start of exploration in unfamiliar repos; for TypeScript/JavaScript, the sibling ts-codemap offers higher fidelity.

Core Features & Use Cases

  • Persistent file-based map: walks the repository with tree-sitter, writes graph.json and MAP.md under .codemap/ for downstream skills to query.
  • Polyglot support and incremental updates: indexes Java, Go, Python, and Rust with per-file SHA256 caching for fast rebuilds.
  • Use Case: after a major codebase refactor, codemap surfaces module boundaries, symbol exports, and import/calls edges to guide exploration and planning.

Quick Start

Run codemap build on a repository to generate the graph and MAP.md under .codemap.

Frequently Asked Questions about codemap

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

FAQPage Schema
How do I index a polyglot codebase for fast symbol and import exploration?

You can index a polyglot codebase by running codemap build, which uses tree-sitter to parse Java, Go, Python, and Rust source files. It writes a persistent graph.json and MAP.md under .codemap/ to enable fast exploration.

Can I use tree-sitter to map codebase structure after a major monorepo refactor?

Yes, codemap uses tree-sitter to map codebase structure after major refactors. It surfaces module boundaries, symbol exports, and import/calls edges to guide exploration and planning in Java, Go, Python, and Rust monorepos.

Does codemap support TypeScript and JavaScript codebase navigation?

Codemap does not directly support TypeScript and JavaScript codebase navigation. For TypeScript/JavaScript repositories, the sibling ts-codemap skill offers higher fidelity structural indexing and exploration.

How does incremental codebase indexing handle updates to existing files?

Incremental codebase indexing uses per-file SHA256 caching to handle updates efficiently. This allows codemap to perform fast rebuilds by only re-indexing files that have changed, rather than walking the entire repository every time.

What is the best way to explore unfamiliar code without grep-and-read loops?

The best way to explore unfamiliar code without grep-and-read loops is to generate a persistent structural index. Codemap writes a graph map to .codemap/, allowing you to query symbols, imports, and relationships directly.

Why should I use tree-sitter for codebase mapping instead of manual grep searches?

You should use tree-sitter for codebase mapping because it parses source code structurally rather than lexically. This extracts accurate symbols, imports, and calls edges into a persistent graph, eliminating the manual grep-and-read exploration loop.