From macromanatlas
Generate a complete project index with per-module README files for efficient code navigation. Use when starting work on a new project or after major restructuring. Run once per project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/macromanatlas:index-initThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a complete project index with per-module README files.
Generate a complete project index with per-module README files.
Say: "I'm using the index-init skill to generate a project index."
Glob the root directory for these signals. Use first match wins priority:
| Priority | Signal | Type | Module detection |
|---|---|---|---|
| 1 | CMakeLists.txt containing add_subdirectory() | cpp-cmake | Each add_subdirectory() argument = module |
| 2 | Cargo.toml containing [workspace] | rust-cargo | Each members entry = crate |
| 3 | go.work or multiple go.mod | go | Each use directive or go.mod directory = module |
| 4 | package.json containing "workspaces" | node-workspaces | Each workspace pattern match = package |
| 5 | *.sln file | dotnet | Each .csproj referenced = project |
| 6 | pom.xml containing <modules> | java-maven | Each <module> = subproject |
| 7 | build.gradle or settings.gradle containing include | java-gradle | Each include(':...') = subproject |
| 8 | pyproject.toml or setup.py | python | Packages or top-level dirs with __init__.py |
| 9 | pubspec.yaml | dart-flutter | Top-level or packages/ dirs |
| 10 | Fallback | generic | Top-level dirs containing source files (.cpp, .py, .js, .ts, .rs, .go, .java, .cs, .dart) |
For each detected type, extract:
target_link_libraries), imports, manifest depsgit ls-files (respects .gitignore) to list source + config files per module. Fallback to Glob if not a git repo.Never index: .env, .env.*, .git/, *.key, *.pem, .npmrc, .pypirc, .aws/, .ssh/, *credentials*, *secret*, *token*, binary blobs (images, compiled objects, archives).
<Module>/README.md for each moduleFor each module, create or update <Module>/README.md using this template:
# <Module Name>
<!-- AUTO-GENERATED by /index-init — do not edit above CUSTOM section -->
## Purpose
<1-2 sentences describing what this module does>
## Architecture
<ASCII diagram if inferrable from code structure, otherwise omit this section>
## Public API
- **IClassName** — `method1()`, `method2()`, `method3()`
- **ClassName** — `publicMethod1()`, `publicMethod2()`
## Files
| File | Tags | Description |
|------|------|-------------|
| `relative/path/to/file.ext` | [tag1, tag2] | Short description (<80 chars) |
## Dependencies
- **Internal**: Module1, Module2
- **External**: Library1 v1.2, Library2
## Configs & Scripts
| File | Description |
|------|-------------|
| `CMakeLists.txt` | Build configuration |
| `config.json` | Runtime configuration |
<!-- AUTO-GENERATED END -->
<!-- CUSTOM — your notes below survive re-indexing -->
Rules:
<!-- CUSTOM section, PRESERVE its content entirely.json, .yaml, .toml, Dockerfile, *.sh, *.ps1, CI config files.claude/index.summary.mdThis lightweight file is injected at session start. Hard cap: 4KB.
# Project Index (Summary)
<!-- AUTO-GENERATED by /index-init -->
Generated: <YYYY-MM-DD HH:MM> | Type: <project-type> | Modules: <count> | Files: <total-count>
Read `.claude/index.md` for full index with dependency graph and tag index.
Read `<Module>/README.md` for detailed module documentation.
## Modules
| Module | Purpose | Key Tags |
|--------|---------|----------|
| ModuleName | Short purpose (<60 chars) | tag1, tag2, tag3 |
<!-- AUTO-GENERATED END -->
Rules:
| ... | N more modules. See .claude/index.md | |.claude/index.mdFull index file. Claude reads this on demand for details.
# Project Index
<!-- AUTO-GENERATED by /index-init -->
Generated: <YYYY-MM-DD HH:MM> | Type: <project-type> | Modules: <count> | Files: <total-count>
## How to Use
The summary is injected at session start. Read module READMEs for file-level detail.
See CLAUDE.md "Code Navigation" section for the search strategy.
## Modules
| Module | Purpose | Tags | README |
|--------|---------|------|--------|
| ModuleName | Short purpose | [tag1, tag2] | [README](../ModuleName/README.md) |
## Dependency Graph
ModuleA → (foundation)
├── ModuleB → ModuleA
├── ModuleC → ModuleA, ModuleB
└── MainApp → all modules
## Tag Index
tag-name: Module1, Module2
another-tag: Module3, Module4
<!-- AUTO-GENERATED END -->
<!-- CUSTOM -->
Read the existing CLAUDE.md. If it already has a "Code Index" or "Code Navigation" section, update it. Otherwise, append this section:
## Code Navigation
When you need to search the codebase and don't already know the exact file:
1. Read `.claude/index.md` → Tag Index to find which module(s) own the topic
2. Read `<Module>/README.md` → exact file paths, classes, responsibilities
3. Grep/glob within that module — not the whole repo
Skip this if you already know the file path. This is for discovery, not mandatory ritual.
Index files: `.claude/index.md` (full), `.claude/index.summary.md` (session start), `<Module>/README.md` (per-module). Re-index: `/index-init`
--gitignore flagIf $ARGUMENTS contains --gitignore:
.gitignore (create if not exists)# MacroManAtlas index files
.claude/index.md
.claude/index.summary.md
<Module>/README.md (useful for humans)Summarize what was generated:
/index-status to verifynpx claudepluginhub macroman5/macromanatlas --plugin macromanatlasThis skill should be used when the user asks to "create a code index", "index this codebase", "update the code index", "generate code index", "build code index", "refresh semantic summaries", or needs guidance on generating or updating the .metis/code-index.md file for AI agent codebase navigation.
Indexes project with QMD for semantic search and cartographer for codebase maps, enabling fast file suggestions. Run on new codebases or after changes to save 60-80% tokens on exploration.