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.
npx agentmods add skills/sethgammon/citadel/mapnpx skills add SethGammon/Citadel --skill mapgit clone --depth 1 https://github.com/SethGammon/CitadelWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00047 | $0.01697 |
| Opus 5 | $0.00023 | $0.00848 |
| Sonnet 5 | $0.00009 | $0.00339 |
| Haiku 4.5 | $0.00005 | $0.00170 |
Grade A, and why
map 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 2d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/map -- Codebase Intelligence
Orientation
Use /map when:
- Starting work on an unfamiliar codebase (build the index first)
- A fleet or archon campaign needs agents to know "what files matter for X"
- You want a quick structural overview (stats, roles, dependency graph)
- You need to find files related to a keyword without exploratory reads
Do not use /map for:
- Reading file contents (use Read)
- Searching for string patterns inside files (use Grep)
- Single-file edits where you already know the path
Commands
| 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 |
Protocol
Step 1: GENERATE INDEX
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:
- Walks the project tree (respects
.gitignore, skipsnode_modules,dist, etc.) - Extracts exports, imports, and symbols from each source file
- Infers a role for each file (component, hook, store, route, test, config, etc.)
- Builds a dependency graph from resolved import paths
- Records per-file SHA-256 hashes plus a whole-index source signature
- Extracts route-like paths and package verification scripts
- Writes the index to
.planning/map/index.json
Supported 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.
Step 2: QUERY (when user provides search terms)
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.
- 2d ago First seen · 218 lines · 47 tokens per session scan A 3cfa26f3c6de
map is a skill published in the GitHub repository SethGammon/Citadel (914 stars, last pushed 5d ago), licensed MIT. It adds 47 tokens to every session and 1,697 once invoked, about $0.0002 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.
Other skills, from other repositories
agent-self-scheduling
Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers.
fleet-manager
Use when managing, triaging, restarting, escalating, or summarizing Codewhale Pod runs and workers.
herdr
Control Herdr, a terminal multiplexer for coding agents. Use only when the user explicitly mentions Herdr or asks to use Herdr to inspect or control panes, tabs, workspaces, commands, or another agent. Do not use merely because a task could benefit from a background terminal, delegation, or parallel work. Requires…
delegate
Strategic delegation for multi-step coding, research, or verification work. Use when a task can be split into parent reasoning plus focused sub-agent execution through the agent tool.
skill-creator
Create or improve codewhale skills. Use when the user wants a new skill, wants to update an existing skill, or needs guidance on when a skill should be a skill versus MCP, hooks, tools, or a plugin scaffold.
plugin-creator
Scaffold a local Codewhale plugin bundle with a versioned manifest, namespaced Skills, and an explicit trust review.