Tooluck logoTooluck
SKILL.md

map

Agent skill fromSethGammon/Citadel

Structural codebase index generator. Builds a compact JSON map of files, exports, imports, dependency graph, and roles. Queryable by keyword. Injected into fleet agents as context slices to reduce token usage on code navigation.

How to install map

install map
# install the Citadel pack with the skills CLI
npx skills add SethGammon/Citadel

# or add only this skill to Claude Code: copy the folder

skills/map/

# into

~/.claude/skills/map/ (all projects)

.claude/skills/map/ (one project)

skills/map/SKILL.md

MITFull file
1# /map -- Codebase Intelligence
2
3## Orientation
4
5Use `/map` when:
6- Starting work on an unfamiliar codebase (build the index first)
7- A fleet or archon campaign needs agents to know "what files matter for X"
8- You want a quick structural overview (stats, roles, dependency graph)
9- You need to find files related to a keyword without exploratory reads
10
11Do not use `/map` for:
12- Reading file contents (use Read)
13- Searching for string patterns inside files (use Grep)
14- Single-file edits where you already know the path
15
16## Commands
17
18| Command | Behavior |
19|---|---|
20| `/map` | Generate or refresh the index (skips if cache is fresh) |
21| `/map --force` | Rebuild the index even if cache is fresh |
22| `/map query <terms>` | Search the index for files matching keywords |
23| `/map stats` | Print summary statistics (files, lines, languages, roles) |
24| `/map slice <terms>` | Output a compact context slice for agent injection |
25| `/map stale` | Detect added, changed, or removed indexed source files |
26
27## Protocol
28
29### Step 1: GENERATE INDEX
30
31Run the index generator:
32
33```bash
34node scripts/map-index.js --generate --root .
35```
36
37Add `--force` if the user requested a fresh rebuild or if the index is stale.
38
39The generator:
401. Walks the project tree (respects `.gitignore`, skips `node_modules`, `dist`, etc.)
412. Extracts exports, imports, and symbols from each source file
423. Infers a role for each file (component, hook, store, route, test, config, etc.)
43…

Excerpt shown under the repository's MIT license.

More skills in Citadel

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates