Skip to content

Built-in Indexers ​

An Indexer is a Skill that tells the Agent how to investigate one kind of source and how to write source-grounded articles from it. There are four kinds of Indexer — code, document, note and session — and each kind can have several Skills. Context ships one Skill per kind, and a creator Skill writes new Indexers when you need one.

This subsection covers Indexers from the reader's side: start here to see what the built-in ones already cover. Go on to Choosing, Replacing and Disabling Indexers, Creating an Indexer or Writing Indexer Guidance only when they do not fit your material.

mermaid
flowchart LR
  repo["Repository modules"] --> code["Code Indexer"]
  docs["Captured documents"] --> md["Document Indexer"]
  notes["Saved notes"] --> note["Note Indexer"]
  sess["Saved conversation summaries"] --> ses["Session Indexer"]
  code --> art["Source-grounded articles"]
  md --> art
  note --> art
  ses --> art
  family["Material that needs<br/>specialist guidance"] --> create["Indexer creator"]
  create --> own["Your own Indexer Skill"]

At a glance ​

KindSkillReads
Codecontext-code-indexerRepository modules
Documentcontext-markdown-indexerCaptured documents and same-repository docs
Notecontext-note-indexerSaved notes, excerpts and observations
Sessioncontext-sessions-indexerSaved conversation summaries
Creatorcontext-indexer-createYour request for a new Indexer

The Indexers work during planning and writing. The creator is an authoring assistant: it writes a new Indexer Skill for code, documents, notes or session summaries when you ask for one.

Code: context-code-indexer ​

  • What you get: articles about an authorized module of a registered repository — its technology, the capability families it exposes, its contracts and integration points — grouped into reader topics that you confirm in the work-start report. Article outlines suit 16 kinds of module, from monorepo containers, web applications, component and SDK libraries and CLI tools to API services, event consumers, storage repositories, adapters, contract sources and generated sources.
  • How it reads: during planning it looks at the module's structure and representative source; while writing it reads the actual implementation and contracts each article needs. Partial counts are named as partial.
  • What it will not do: parse the whole repository, list every symbol or build a relationship graph during planning; write knowledge directly or modify your repository.
  • Add a note or document instead when the knowledge is business intent or rationale that the code does not show. Code establishes implemented behavior; notes and documents explain why.

Documents: context-markdown-indexer ​

  • What you get: articles organized around reader questions rather than source files, keeping the useful guidance, examples and limits of the original, with citations to the passages used. Article outlines suit 13 kinds of document, from domain references, product requirements and technical guides to runbooks, FAQs, decision records, incident reviews, test validation, release and migration guides, and documentation sites.
  • How it reads: planning starts from document titles, opening excerpts and heading outlines, with full reading where the grouping is unclear; writing reads the relevant full source. One heading does not mean one article.
  • What it will not do: produce knowledge from same-repository docs and Skills you only linked, unless you ask — those stay originals and serve as supporting evidence. See Linking Existing Docs and Skills.
  • Add a note instead when the knowledge lives in people's heads or chat rather than in a document; see Notes and Conversation Summaries.

Notes: context-note-indexer ​

  • What you get: a note either strengthens an existing page or, when it answers an independent reader question, becomes its own article. It has nine reader profiles of its own (domain reference, product requirements, technical guide, user and developer guide, runbook, FAQ, decision record, incident review, test validation) and can also write in the style of each code and document profile, for example a note about an API service or a runbook.
  • How it reads: saved notes, excerpts and observations, read directly.
  • What it will not do: scan host history, fetch a URL you have not approved or alter evidence to fit a claim.
  • Add a document or session summary instead when the material is a maintained document (add it as a document source) or a conversation whose decisions you want kept (save a summary).

Session summaries: context-sessions-indexer ​

  • What you get: from a saved conversation summary, the problem, the decisions actually reached, the reasons needed to understand them, the open questions and where they apply — with "proposed", "agreed", "implemented" and "verified" kept distinct. A summary need not concern code. A linked commit or merge request records what was discussed; it does not prove that a change merged, deployed or passed tests.
  • How it reads: a bounded summary prepared by the host or another tool, read directly.
  • What it will not do: scan chat history, load a full transcript or reconstruct a conversation from a diff.
  • Add a note instead when you only want to keep an excerpt or an observation rather than a conversation's decisions.

The creator: context-indexer-create ​

context-indexer-create writes a reusable Indexer Skill in the directory you choose. Ask for it in plain language — it is not a slash command — and say explicitly that you want a new Context Indexer Skill for code, documents, notes or session summaries.

It writes Skills only: it does not set up a knowledge workspace or start production. At the end it reports the files it created, the inputs it supports and its remaining limitations. See Creating an Indexer for the full walkthrough.

How they are installed ​

Installing the Context plugin (see Installation) makes all the built-in Indexers available to Claude Code, Codex and Cursor. The four Indexers are installed without a plugin prefix, so they keep the same names in every host. Restart or refresh the Agent host after installing.

How the Agent chooses them ​

You do not call an Indexer directly; the Agent chooses the ones that fit your material when Context work starts. Ordinary coding and design conversations do not start it, so invoke Context explicitly or continue an active Context conversation. How the choice works, and how to replace or disable an Indexer, is described in Choosing, Replacing and Disabling Indexers.

Several Indexers on one module ​

Several Skills may examine different aspects of the same module, and their findings go into the same article rather than producing copies. Code establishes implemented behavior, while authorized notes or documents can explain business intent and rationale.

A note that only supports an existing page is written into that page. A note that answers an independent reader question can become its own article.

Next:

内置 Indexer ​

Indexer 是一种 Skill,告诉 Agent 如何调研某一类来源,以及如何据此撰写基于来源的文章。Indexer 分为四类:代码、文档、笔记和会话,每一类都可以有多个 Skill。Context 为每一类自带一个 Skill,另有一个创建器 Skill,在你需要时编写新的 Indexer。

本小节从读者角度介绍 Indexer:先从这里了解内置 Indexer 已经覆盖了什么。只有当它们不适合你的材料时,再继续阅读 选择、替换与停用 Indexer、创建 Indexer 或 编写 Indexer 指引。

mermaid
flowchart LR
  repo["仓库模块"] --> code["代码 Indexer"]
  docs["已采集的文档"] --> md["文档 Indexer"]
  notes["已保存的笔记"] --> note["笔记 Indexer"]
  sess["已保存的会话摘要"] --> ses["会话 Indexer"]
  code --> art["基于来源的文章"]
  md --> art
  note --> art
  ses --> art
  family["需要专门指引的<br/>材料"] --> create["Indexer 创建器"]
  create --> own["你自己的 Indexer Skill"]

概览 ​

类别Skill读取
代码context-code-indexer仓库模块
文档context-markdown-indexer已采集的文档和同仓库文档
笔记context-note-indexer已保存的笔记、摘录和观察记录
会话context-sessions-indexer已保存的会话摘要
创建器context-indexer-create你创建新 Indexer 的请求

Indexer 在规划和撰写期间工作。创建器是一个编写助手:当你提出要求时,它会为代码、文档、笔记或会话摘要编写新的 Indexer Skill。

代码:context-code-indexer ​

  • 你会得到:关于已登记仓库中某个已授权模块的文章,涵盖其技术、对外提供的能力类别、契约和集成点,并按你在开工报告中确认的读者主题分组。文章大纲适配 16 种模块,从 monorepo 容器、Web 应用、组件与 SDK 库、CLI 工具,到 API 服务、事件消费者、存储仓库、适配器、契约来源和生成的源码。
  • 如何读取:规划期间查看模块结构和有代表性的源码;撰写时读取每篇文章所需的实际实现和契约。不完整的计数会被明确标为不完整。
  • 不会做:在规划期间解析整个仓库、列出每个符号或构建关系图;直接写入知识或修改你的仓库。
  • 以下情况改为添加笔记或文档:知识是代码无法体现的业务意图或理由。代码确立已实现的行为;笔记和文档解释原因。

文档:context-markdown-indexer ​

  • 你会得到:围绕读者问题而非来源文件组织的文章,保留原文中有用的指引、示例和限制,并引用所使用的段落。文章大纲适配 13 种文档,从领域参考、产品需求、技术指南,到运维手册、FAQ、决策记录、事故复盘、测试验证、发布与迁移指南以及文档站。
  • 如何读取:规划从文档标题、开头摘录和标题大纲开始,在分组不清晰时全文阅读;撰写时读取相关的完整来源。一个标题不等于一篇文章。
  • 不会做:除非你要求,否则不会从你仅做了链接的同仓库文档和 Skill 生产知识;它们保持为原件,作为辅助证据。参见 链接已有的文档与 Skill。
  • 以下情况改为添加笔记:知识存在于人们的头脑或聊天中,而不在文档里;参见 笔记与会话摘要。

笔记:context-note-indexer ​

  • 你会得到:一条笔记要么充实已有页面,要么在回答独立的读者问题时成为单独的文章。它有九种自有读者画像(领域参考、产品需求、技术指南、用户与开发者指南、运维手册、FAQ、决策记录、事故复盘、测试验证),也可以按每种代码和文档画像的风格撰写,例如关于某个 API 服务或某份运维手册的笔记。
  • 如何读取:直接阅读已保存的笔记、摘录和观察记录。
  • 不会做:扫描宿主历史、抓取未经你批准的 URL,或为迎合论断篡改证据。
  • 以下情况改为添加文档或会话摘要:材料是持续维护的文档(作为文档来源添加),或是你希望保留其决定的对话(保存一份摘要)。

会话摘要:context-sessions-indexer ​

  • 你会得到:从已保存的会话摘要中提取问题、实际达成的决定、理解这些决定所需的理由、遗留问题和适用范围,并区分“提议”“已同意”“已实现”和“已验证”。摘要不必与代码相关。关联的提交或合并请求记录讨论涉及的内容;它并不能证明某个变更已合并、已部署或已通过测试。
  • 如何读取:直接阅读由宿主或其他工具准备的、篇幅有限的摘要。
  • 不会做:扫描聊天历史、加载完整对话记录,或根据 diff 拼凑出一段对话。
  • 以下情况改为添加笔记:你只想保留一段摘录或一条观察,而不是一段对话的决定。

创建器:context-indexer-create ​

context-indexer-create 会在你选定的目录中编写一个可复用的 Indexer Skill。请用自然语言提出(它不是斜杠命令),并明确说明你要为代码、文档、笔记或会话摘要创建新的 Context Indexer Skill。

它只编写 Skill:不会初始化知识工作区,也不会启动生产。最后,它会汇报所创建的文件、支持的输入以及尚存的限制。完整步骤参见 创建 Indexer。

如何安装 ​

安装 Context 插件(参见 安装)后,所有内置 Indexer 都可在 Claude Code、Codex 和 Cursor 中使用。四个 Indexer 安装时不带插件前缀,因此在每个宿主中名称都相同。安装后请重启或刷新 Agent 宿主。

Agent 如何选用它们 ​

你不会直接调用 Indexer;Context 工作开始时,Agent 会选出适合你材料的那些。普通的编码和设计对话不会启动它,所以请显式调用 Context,或继续一个进行中的 Context 对话。选择的工作方式,以及如何替换或停用 Indexer,参见 选择、替换与停用 Indexer。

同一模块上的多个 Indexer ​

多个 Skill 可以考察同一模块的不同方面,它们的发现会写进同一篇文章,而不是产生多份副本。代码确立已实现的行为,已授权的笔记或文档则可以解释业务意图和理由。

只是为已有页面提供支撑的笔记,会写进该页面。回答独立读者问题的笔记,可以成为单独的文章。

接下来: