/citadel:mapfrom citadel
Generates a structural codebase index of files, exports, imports, and dependency graph. Queryable by keyword for context injection to reduce token usage.
Ships in citadel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use /map when:
Do not use /map for:
| Command | Behavior |
|---|---|
/map | Generate or refresh the index (skips if cache is fresh) |
/map --force | Rebuild the index even if cache is fresh |
/map query <terms> | Search the index for files matching keywords |
/map stats | Print summary statistics (files, lines, languages, roles) |
/map slice <terms> | Output a compact context slice for agent injection |
/map stale | Detect added, changed, or removed indexed source files |
Run the index generator:
node scripts/map-index.js --generate --root .
Add --force if the user requested a fresh rebuild or if the index is stale.
The generator:
.gitignore, skips node_modules, dist, etc.).planning/map/index.jsonSupported languages: TypeScript, JavaScript, Python, Go, Rust.
Cache behavior: The index is cached for 5 minutes. Subsequent runs within
that window exit immediately unless --force is passed.
If .planning/map/ does not exist, the generator creates it automatically.
node scripts/map-index.js --query "<terms>"
The query engine scores files by:
Results are sorted by score and capped at 20 files (configurable with --max-files).
Output is budget-capped at 8000 characters to stay injection-safe.
node scripts/map-index.js --stats
Outputs: file count, line count, export count, dependency edge count, route count, package script count, verification command count, breakdown by language, and breakdown by role.
When another skill or orchestrator needs a map slice for agent injection:
node scripts/map-index.js --slice "<scope terms>" --max-files 15=== MAP SLICE: <terms> ===
Generated: <timestamp>
Verification: npm run test | npm run typecheck
<score> <role> <path> [<top exports>] (<lines>L)
...
=== END MAP SLICE ===
Token budget: A 15-file slice is typically 800-1200 tokens. This replaces 2000-5000 tokens of exploratory Glob/Grep results that agents would otherwise spend finding relevant files.
Before injecting an existing map into a long-running campaign, run:
node scripts/map-index.js --stale
The command exits 0 when the map is current and 2 when indexed source files
were added, changed, or removed. Refresh with:
node scripts/map-index.js --generate --force --root .
Fleet agents receive map slices automatically when /map index exists:
.planning/map/index.json existsContext injection order:
.claude/agent-context/rules-summary.mdDisclosure: "Generating codebase map. Creates .planning/map/index.json."
Reversibility: green — creates .planning/map/index.json only; undo by deleting .planning/map/.
Trust gates:
fileCount: 0). Query returns no results. Not an error..planning/ does not exist: Generator creates .planning/map/ automatically via mkdirSync({ recursive: true }).node scripts/map-index.js --generate first."After generation:
Index written: <path>
<file count> files, <edge count> dependency links
<route count> routes, <verification command count> verification commands
After query:
Results for "<terms>" (<count> matches):
Score Role Path
-----------------------------------------------
<results>
After stats: print the full statistics block.
After slice: output the formatted slice block ready for injection.
After stale check:
Map index is current.
or:
Map index is stale.
Changed: <paths>
Added: <paths>
Removed: <paths>
Reversibility: green — delete .planning/map/ to remove all generated artifacts; no source files modified.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sethgammon/citadel --plugin citadel2 plugins ship this exact skill · first indexed Jun 5, 2026
48 skills in this plugin
/architectGiven a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can execute directly. Multi-candidate evaluation for key decisions./archonAutonomous multi-session campaign agent. Decomposes large work into phases, delegates to sub-agents, reviews output, and maintains campaign state across context windows. Use for work that spans multiple sessions and needs persistent state, quality judgment, and strategic decomposition./ascii-diagramGenerate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.Other plugins' skills for the same job