Skip to content

Idadabhai/directory-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

directory-map — map any repo into an LLM-readable taxonomy

MIT License Zero dependencies 100% eval pass rate vs 0% baseline

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.

What it does

Point it at any directory and it produces three things:

  1. 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.
  2. <AgentIngress> XML block — appended to the bottom of DIRECTORY_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.
  3. update-index.py — a zero-dependency Python 3 re-indexer you (or an agent) can re-run any time the structure changes. Outputs index.json.

Why

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.

Install

# 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

Usage

Run it from any project root. Claude will:

  1. Explore the directory tree (up to 5 levels deep)
  2. Classify everything into the 7-domain taxonomy
  3. Write DIRECTORY_MAP.md with the <AgentIngress> block
  4. Write update-index.py, pre-populated with the projects it found
  5. Run the script to generate index.json

To refresh later without invoking Claude, just run:

python update-index.py

Example output

This 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.

Terminal output from running update-index.py, showing 8 dirs, 12 files, 2 projects indexed in 6ms, followed by a DIRECTORY_MAP.md excerpt

The taxonomy

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.

The <AgentIngress> schema

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.

What's in this repo

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

License

MIT — see LICENSE.

About

Maps any directory into an LLM-readable taxonomy — a Claude Code skill with an AgentIngress XML block for agent context injection

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages