codemap

Generates hierarchical codemap directories from user-defined file selection rules.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/thistleknot/skills --skill codemap-thistleknot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codemap
Source: https://github.com/thistleknot/skills/tree/main/codemap
Command: npx skills add https://github.com/thistleknot/skills --skill codemap-thistleknot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Codemap turns unfamiliar repositories into a navigable, hierarchical set of directory-level codemaps, so agents and humans can quickly understand where to edit and how modules interact.

Core Features & Use Cases

  • Repository initialization and scaffolding: Selects core code/config files, initializes .slim/codemap.json, and generates empty codemap.md templates per relevant folder.
  • Legacy state migration: Automatically migrates .slim/cartography.json to .slim/codemap.json to keep mapping workflows consistent over time.
  • Incremental change detection: Detects added/removed/modified files and reports which folders are affected, enabling targeted updates instead of full remaps.

Quick Start

Instruct the AI: “Run codemap for /repo, include src/**/*.ts and package.json, exclude tests and node_modules, then generate codemap.md templates for the relevant directories.”

Frequently Asked Questions about codemap

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

FAQPage Schema
How do I map an unfamiliar repository structure for codebase understanding?

Repository mapping generates hierarchical codemaps for unfamiliar directories to support codebase understanding and safe navigation. It selects core code and config files, initializes a persistent state file, and creates empty markdown templates per discovered folder.

How do I detect which folders are affected by recent code changes?

Incremental change detection tracks added, removed, and modified files using hash-based state persistence. It compares current file and folder hashes against the stored state to report exactly which folders need targeted updates instead of full remaps.

Can I use include and exclude patterns to select specific files for repository mapping?

Repository mapping requires deterministic local file selection using include, exclude, and exception patterns. You can specify exact path patterns like source files and config files while excluding directories like tests and node_modules.

What's the best way to scaffold documentation for an inherited codebase?

Documentation scaffolding delegates template creation to fixer agents by generating empty codemap.md files per relevant directory. This provides a structured starting point for documenting module interactions and navigation paths across the codebase.

Where does the codemap tool store its state for incremental updates?

State persistence stores file and folder hashes in a local .slim/codemap.json file. The tool also automatically migrates legacy .slim/cartography.json files to the new format to keep mapping workflows consistent over time.

Does codemap require any external dependencies to map repository directories?

Repository mapping operates entirely through local scripts without requiring external dependencies. It uses local file selection patterns and hash-based state persistence to generate directory-level codemaps and detect incremental changes.