/metis:code-indexfrom metis
Guides generating and updating .metis/code-index.md, a two-layer codebase map with structural symbols and AI semantic summaries. Handles permissions for background summarization.
Ships in metis. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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, specifications), not the code indexThe code index has two layers:
metis index. Tells you what symbols exist.code-index-summarizer subagent.The code-index-summarizer agent runs in the background and needs Edit access to write summaries to .metis/code-index.md. By default, background agents cannot prompt for tool approval.
To enable background summarization, the user must add Edit(.metis/code-index.md) to their allowed tools. They can do this by running /permissions and adding the rule.
If this permission isn't configured, tell the user:
"The semantic summarizer needs Edit access to
.metis/code-index.mdto run in the background. Run/permissionsand addEdit(.metis/code-index.md)to your allowed tools. Otherwise I can run it in the foreground, but it'll take a couple of minutes."
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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/decompositionThis skill should be used when the user asks to "break down this initiative", "decompose into tasks", "create tasks from initiative", "how to size tasks", "when to decompose", "vertical slices", "task granularity", or needs guidance on breaking higher-level work into lower-level work items./document-selectionThis skill should be used when the user asks "what document type should I create", "create a bug ticket", "create a feature request", "should this be a task or initiative", "when to use an ADR", "when to use a specification", "track this bug", "log this tech debt", "write a spec", or needs help choosing between vision, initiative, task, backlog item, ADR, or specification document types./grill-decompositionOne bounded interview over an initiative's drafted tasks, taken as a set, that sharpens slice boundaries, ordering, and acceptance criteria and writes the answers into the task documents. Use after tasks are drafted and before the initiative goes active. Pass an initiative short code (e.g. PROJ-I-0001)./grillingThis skill should be used when the user asks to "grill me", "stress-test this plan", "interview me about this design", "poke holes in this", "sharpen this vision", "sharpen this initiative", or wants to be questioned relentlessly about a plan, decision, or idea until a shared understanding is reached. It is the interview engine behind the grill-vision and grill-initiative skills./grill-initiativeA relentless interview to sharpen a Metis initiative, writing settled answers into the initiative document as you go and recording hard-to-reverse trade-offs as ADRs. Use when the user wants to create, challenge, or design an initiative before it is decomposed. Pass an initiative short code (e.g. PROJ-I-0001) or a title for a new initiative./grill-visionA relentless interview to sharpen a Metis vision, writing settled answers into the vision document as you go. Use when the user wants to create, challenge, or finish a vision. Pass a vision short code (e.g. PROJ-V-0001) or a title for a new vision.npx claudepluginhub colliery-io/metis --plugin metisOther plugins' skills for the same job