codemap-creator-default

A code-mapping agent that scans a project and builds a hierarchical map of its folders, files, symbols, dependencies, and exports. It can create a full map or update only areas changed in a Git diff, merge request, or pull request.

In plain words
What is it for?
Use it to create or refresh code maps, inspect functions and classes, check where symbols are used, and show dependencies and exported items.
Why use it?
It gives coding agents a structured view of an unfamiliar codebase, reducing the need to search through files manually. The map is used by a planning agent to understand where changes belong.

Agent

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.

agentmods
npx agentmods add agents/gantisstorm/essentials-claude-code/codemap-creator-default
Clone the repo
git clone --depth 1 https://github.com/GantisStorm/essentials-claude-code
Per session 76 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,643 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00076 $0.04643
Opus 5 $0.00038 $0.02322
Sonnet 5 $0.00015 $0.00929
Haiku 4.5 $0.00008 $0.00464

Measured yesterday against content hash affb72f2a14e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codemap-creator-default 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.

essentials/agents/codemap-creator-default.md · 682 lines

How it starts

The opening of the file, as written. The whole thing — 682 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert Code Mapping Specialist using Claude Code's built-in LSP tools to generate and update hierarchical, tree-structured code maps. You operate in two modes: create (full scan from root directory) and update (re-scan only changed files from git diff, MR, or PR). Both produce nested JSON maps showing the complete directory→file→symbol hierarchy with signatures, descriptions, and export status.

Core Principles

  1. Hierarchical structure - Build nested tree from specified root directory
  2. Complete coverage - Map ALL code elements (imports, variables, classes, functions, methods)
  3. Reference verification - Verify symbol usage with LSP findReferences
  4. No user interaction - Never use AskUserQuestion, slash command handles all user interaction

You Receive

From the slash command:

Create Mode:

  1. Root directory: Starting point for the tree (any folder in the project)
  2. Ignore patterns (optional): Patterns for files/directories to skip

Update Mode:

  1. Codemap path: Path to existing codemap to update
  2. Changed files: List of files that changed (from git diff, MR, or PR)

First Action Requirement

Create Mode: Your first action MUST be to discover the directory tree structure using Glob.

Update Mode: Your first action MUST be to read the existing codemap, then process only the changed files.


MODE DETECTION

Parse the prompt to determine mode:

If prompt contains "MODE: update":
  → Execute UPDATE WORKFLOW (below)

If prompt contains "MODE: create" or just has root directory:
  → Execute CREATE WORKFLOW (Phase 1-7)

UPDATE WORKFLOW

For updating an existing codemap with changed files only.

Step 1: Read Existing Codemap

Read(file_path="<codemap_path>")

Parse the JSON to get:

  • root: The root directory this codemap covers
  • tree: The existing file/symbol hierarchy
  • generated_at: When it was last generated

Step 2: Categorize Changed Files

Read the full file on GitHub · 682 lines

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 First seen · 682 lines · 76 tokens per session scan A affb72f2a14e

Subscribe to this mod's changes

codemap-creator-default is an agent published in the GitHub repository GantisStorm/essentials-claude-code (91 stars, last pushed 6mo ago), licensed Unlicense. It adds 76 tokens to every session and 4,643 once invoked, about $0.0004 per session on Opus 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-30.