Help us improve
Share bugs, ideas, or general feedback.
From metis
This 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.
npx claudepluginhub colliery-io/metisHow this skill is triggered — by the user, by Claude, or both
Slash command
/metis:code-indexThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides the process of generating and maintaining `.metis/code-index.md` — a structured codebase map for AI agent 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.
Sets up and optimizes Cursor codebase indexing for @Codebase semantic search. Configures .cursorignore files, verifies status, and details embedding workflow.
Share bugs, ideas, or general feedback.
This skill guides the process of generating and maintaining .metis/code-index.md — a structured codebase map for AI agent navigation.
The code index file (.metis/code-index.md) is a regular file, NOT a Metis document. You MUST:
.metis/code-index.md.metis/code-index.mdmcp__metis__edit_document or mcp__metis__read_document for this file — those are for Metis documents (visions, initiatives, tasks, ADRs), not the code indexThe code index has two layers:
metis index. Tells you what symbols exist.code-index-summarizer subagent.metis index (or metis index --incremental to skip unchanged files)code-index-summarizer agent via the Task tool to generate semantic summaries:
Task(subagent_type="code-index-summarizer", prompt="Generate semantic summaries for all source modules in .metis/code-index.md. This is a first run — summarize ALL modules.", run_in_background=true, model="sonnet")
metis index --incremental.metis/.index-dirty contents)code-index-summarizer agent to update only changed modules:
Task(subagent_type="code-index-summarizer", prompt="Update semantic summaries in .metis/code-index.md for these changed modules: <list>. Only re-summarize the listed modules; leave others unchanged.", run_in_background=true, model="sonnet")
Source file changes are tracked automatically:
.metis/.index-dirtymetis index --incremental runs automatically if dirty files existThe code index is organized as ## Modules with summaries co-located next to symbols:
## Modules
### module/path
> *Semantic summary to be generated by AI agent.* ← summary slot
#### module/path/file.rs ← file symbols
- pub `StructName` struct L5-20 — `{ field: Type }`
- pub `function_name` function L22-40 — `(args) -> Result`
#### module/path/other.rs
- symbols...
### another/module
(AI-written summary here) ← replaced by summarizer
#### another/module/file.rs
- symbols...
Summaries sit between the ### module heading and the first #### file heading.
The structural index preserves existing summaries across regenerations — when
metis index runs again, it keeps any AI-written summaries and only resets
placeholders for new modules.
The summarizer reads ALL source files in each module and produces understanding that symbol names alone can't convey:
Re-run the full index (Layer 1 + Layer 2) when:
Re-run Layer 1 only (structural) when:
The code-index-summarizer agent uses Sonnet for generating semantic summaries. It reads ALL source files in each module (not just 2-3 representative files) to produce accurate understanding of symbol semantics and relationships. The structural index (Layer 1) is deterministic and doesn't use any model.