A Claude Code skill that maps any directory tree into a structured, agent-readable taxonomy — so any LLM session can load your project's context without re-running a filesystem scan every time.
Benchmark: 100% eval pass rate with the skill vs 0% without it, tested across three project types (mixed portfolio, single web app, data science repo) — same assertions (correct domain classification, <AgentIngress> present, update-index.py runs clean) graded with and without the skill loaded.
Point it at any directory and it produces three things:
DIRECTORY_MAP.md— a human-readable map of the codebase, sorted into a 7-domain MECE taxonomy (Live/Published, Active Dev, Concept/Planning, Data Pipelines, Shared Infra, Content Assets, Reference/Archived). Works for any language or stack.<AgentIngress>XML block — appended to the bottom ofDIRECTORY_MAP.md. This is the part that matters: a compact, machine-readable summary (stack, projects, shared memory files, exclude patterns) that lets any LLM — Claude, GPT, whatever — load full project context in one read instead of crawling your filesystem cold every session.update-index.py— a zero-dependency Python 3 re-indexer you (or an agent) can re-run any time the structure changes. Outputsindex.json.
If you work across more than a couple of repos with an AI coding agent, you've hit this: every new session starts with the agent re-discovering what's live, what's a stub, what's abandoned, and what the tech stack even is. directory-map turns that into a one-time (or one-command-refresh) artifact instead of a repeated cold start.
# macOS / Linux
cp -r directory-map ~/.claude/skills/
# Windows (PowerShell)
Copy-Item -Recurse directory-map "$env:USERPROFILE\.claude\skills\"Then in Claude Code:
/directory-map
Run it from any project root. Claude will:
- Explore the directory tree (up to 5 levels deep)
- Classify everything into the 7-domain taxonomy
- Write
DIRECTORY_MAP.mdwith the<AgentIngress>block - Write
update-index.py, pre-populated with the projects it found - Run the script to generate
index.json
To refresh later without invoking Claude, just run:
python update-index.pyThis is real output from running update-index.py against a small demo directory (one live Next.js app, one WIP Express prototype, a data pipeline, some research notes) — not a mockup.
| Domain | What belongs here |
|---|---|
| A — Live / Published | Deployed apps, published packages, live APIs |
| B — Active Development | Code exists, not yet deployed |
| C — Concept / Planning | PRDs, specs, no runnable code |
| D — Data & Research Pipelines | Scripts, notebooks, ETL, data exports |
| E — Shared Infrastructure | Agent memory files, CI/CD, monorepo config |
| F — Content & Creative Assets | Brand, marketing copy, prompt libraries |
| G — Reference & Archived | Third-party repos, legacy/dormant code |
Full detection rules and edge cases in directory-map/references/taxonomy-guide.md.
This is the novel part. Full spec in directory-map/references/agentingress.md. Short version:
<AgentIngress version="1.0" generated="2026-07-20" root="/path/to/repo" refresh="run python update-index.py">
<Stack framework="Next.js 14" lang="TypeScript" db="Postgres" hosting="Vercel" />
<SharedMemory>
<File seq="1" id="claude-root" path="CLAUDE.md" role="mission_rules_router" always="true" />
</SharedMemory>
<Projects>
<Project id="my-saas" domain="A" status="live" url="myapp.com" path="apps/my-saas" />
</Projects>
<ExcludeFromScan>
<Pattern>node_modules</Pattern>
</ExcludeFromScan>
</AgentIngress>Drop this at the bottom of your repo's CLAUDE.md / AGENTS.md / equivalent, and any agent session gets instant structured context instead of a cold filesystem crawl.
directory-map/
├── SKILL.md # skill definition (triggers, phases)
├── scripts/
│ └── update-index.py # the re-indexer, stdlib only
├── references/
│ ├── taxonomy-guide.md # domain detection rules + edge cases
│ └── agentingress.md # full XML schema spec
└── templates/
└── DIRECTORY_MAP.md # {{PLACEHOLDER}} template Claude fills in
MIT — see LICENSE.