Skip to content

Commands and Skills ​

You work with Context through a handful of conversational entries. Everything else, from the lifecycle CLI commands to the Indexers and the workflow's own step Skills, runs behind them, chosen by the workflow for the current step rather than typed by you.

mermaid
flowchart LR
  you["You, in plain language"] --> entry["Entry Skill<br/>/c4a:context and others"]
  entry --> cli["context CLI<br/>current step"]
  cli --> step["Workflow step Skills"]
  cli --> idx["Indexer Skills"]
  step --> cli
  idx --> cli

Entries you invoke ​

EntryUse it toExample
/c4a:contextCreate a Context knowledge workspace, continue one, and run production, review, update and build"Build reviewed knowledge for ../billing-service for on-call engineers."
/c4a:context-planPlan a large project or a broad update in stages before production"Plan knowledge for these three repositories and the design folder."
/c4a:context-inspect-searchAsk questions against knowledge packages or approved knowledge, with sources"How are refunds retried? Cite the code."
/c4a:context-repo-contentLet Context reference docs and authored Skills your project already maintains in the same repository, instead of producing them again"Register docs/ and .agents/skills as repository content."

/c4a:context is the production entry for new and existing knowledge workspaces. The other three entries do not drive production themselves: a plan, an answer that points to a gap, or registered repository content is handed back to /c4a:context when knowledge should be produced. Repository content keeps evolving with the project, and the knowledge links to it; see Linking Existing Docs and Skills. A conversation where Context is already active continues without invoking it again; ordinary coding or design conversations never start it on their own.

To create a new Indexer, ask in plain language: "Create an Indexer Skill for our RPC framework in ./skills". The context-indexer-create Skill picks this up; it is not a menu command.

How each host spells them ​

HostHow entries appear
Claude CodePlugin commands /c4a:context, /c4a:context-plan, /c4a:context-inspect-search, /c4a:context-repo-content
CursorCommands /c4a-context, /c4a-context-plan, /c4a-context-inspect-search, /c4a-context-repo-content
CodexSkills invoked by name: context, context-plan, context-inspect-search, context-repo-content
Local install into one repository (context plugin install --local)The same entries without the c4a plugin namespace

Restart or refresh the host after installing or updating the plugin so it loads the current entries. See Installation.

Requests you will use often ​

You want toSay something likeRead more
Start"Create a Context knowledge workspace in ./kb for …; readers are …"Quick Start
Add material"Add ../docs/refunds to the sources and re-plan the affected part."Choosing How to Add Material
Fix a page"Revise the retry page: the limit is five, not three."Revising a Page
Follow a change"The billing repository moved to a new release; update the affected pages."Updating Knowledge
Let an Agent review one task for youExplicitly authorize fully managed mode for that task; without it, the run asks youFully Managed Mode

More example requests ​

Replace the placeholders in angle brackets. Each request is a starting point: the Agent researches, asks back where needed, and stops at the decisions that are yours.

You want toSay something likeWhat happens
Plan a large project"Plan a knowledge project for <repositories and documents>."The Agent researches and writes a PLAN for you to review; see Planning Large Projects in Stages
Cold-start from many sources of mixed quality"Explore <repositories> first, then screen every document under <wiki range> against the code. Skip documents not updated since <date> except top-level designs; <document> is the baseline. Give me a PLAN with each document's decision and a three-level structure before any production."Read-only exploration, source screening and a PLAN for review; see Cold-Starting a Knowledge Base
Reorganize"Research the approved knowledge again and propose a more intuitive directory and title structure. Revise after I confirm."A structure proposal, then revisions; see Reorganizing at Scale
Update after a source release"The sources have moved to <version>. Find the affected knowledge and review the updates."An impact assessment, targeted revisions and a review report
Evaluate"Evaluate the current knowledge base with <question set>, grade each answer on the four grades and give me P50/P90."An evaluation run with grades and timings; see Evaluating Your Knowledge Base
Migrate"Research what Context can do, then migrate the current knowledge base …"See Migrating an Existing Knowledge Base for the full request
Build and preview"Build the knowledge package and documentation site, and give me a local preview."A build, then a local preview whose address is checked before it is shared; publishing to hosting needs your separate authorization

Terms used above:

  • PLAN: the research report the Agent writes for a large or cold-start project, through /c4a:context-plan, for you to review before production.
  • Baseline document (in a cold start): the current, authoritative document you name for a domain. Within its scope it takes precedence; when other material or the code disagrees with it, the decision and its reason are recorded.
  • Review report: the readable report of written or changed pages that you approve or send back; see Reading Review Reports.
  • Four grades and P50/P90: the grading scale for answers and the median and 90th-percentile answer times; both are defined in Scoring and Timing Standard.

Skills that run on their own ​

Some Skills are never invoked by name. The Indexer Skills (context-code-indexer, context-markdown-indexer, context-note-indexer, context-sessions-indexer) are chosen for the current sources and requirements during planning and writing; installing one makes it available, not enabled for every workspace. context-inspect-search also runs when a host configuration routes knowledge questions to it. The workflow's own step Skills, such as writing a production stage, translating the site, recording a version or recovering a stuck task, each run when the workflow reaches that step.

Indexer Skills are installed without a plugin namespace, so they keep the same names in every host. Every Skill, with its trigger and hand-off, is listed in the Skills reference; the Indexers are described in Built-in Indexers.

What you never need to type ​

The lifecycle commands, such as context source add, context review … and context build, are run by the Agent for the step the workflow returns. You will see them in progress messages, but you describe goals instead. When the Agent starts, it observes the knowledge workspace and works out the next step itself. The full command list is in the CLI Commands reference.

命令与技能 ​

你通过少数几个对话入口使用 Context。其余一切,从生命周期 CLI 命令到 Indexer 以及工作流自身的步骤 Skill,都在这些入口背后运行,由工作流根据当前步骤选择,而不需要你手动输入。

mermaid
flowchart LR
  you["你,使用自然语言"] --> entry["入口 Skill<br/>/c4a:context 等"]
  entry --> cli["context CLI<br/>当前步骤"]
  cli --> step["工作流步骤 Skill"]
  cli --> idx["Indexer Skill"]
  step --> cli
  idx --> cli

你调用的入口 ​

入口用途示例
/c4a:context创建或继续 Context 知识工作区,执行生产、审核、更新和构建“为 ../billing-service 构建经过审核的知识,读者是值班工程师。”
/c4a:context-plan在生产前分阶段规划大型项目或大范围更新“为这三个仓库和设计文档目录规划知识。”
/c4a:context-inspect-search基于知识包或已批准的知识提问,并附带来源“退款是如何重试的?请引用代码。”
/c4a:context-repo-content让 Context 引用你的项目在同一仓库中已维护的文档和自编 Skill,而不是重新生产“把 docs/ 和 .agents/skills 登记为仓库内容。”

/c4a:context 是新建和已有知识工作区的生产入口。其他三个入口自身不推进生产:需要生产知识时,规划结果、指出知识缺口的回答或已登记的仓库内容都会交回 /c4a:context。仓库内容随项目持续演进,知识链接到它;参见 链接已有的文档与 Skill。Context 已经处于活动状态的对话无需再次调用即可继续;普通的编码或设计对话永远不会自行启动它。

要创建新的 Indexer,用自然语言提出即可:“在 ./skills 中为我们的 RPC 框架创建一个 Indexer Skill”。context-indexer-create Skill 会接手这个请求;它不是菜单命令。

各宿主中的写法 ​

宿主入口形式
Claude Code插件命令 /c4a:context、/c4a:context-plan、/c4a:context-inspect-search、/c4a:context-repo-content
Cursor命令 /c4a-context、/c4a-context-plan、/c4a-context-inspect-search、/c4a-context-repo-content
Codex按名称调用的 Skill:context、context-plan、context-inspect-search、context-repo-content
只安装到单个仓库(context plugin install --local)同样的入口,但没有 c4a 插件命名空间

安装或更新插件后,请重启或刷新宿主,让它加载当前的入口。参见 安装。

常用请求 ​

你想要可以这样说延伸阅读
开始“在 ./kb 中为……创建一个 Context 知识工作区;读者是……”快速开始
添加材料“把 ../docs/refunds 加入来源,并重新规划受影响的部分。”选择添加材料的方式
修正页面“修订重试页面:上限是五次,不是三次。”修订页面
跟进变更“billing 仓库发布了新版本;更新受影响的页面。”更新知识
让 Agent 替你审核某个任务为该任务明确授权全托管模式;没有授权时,运行会询问你全托管模式

更多示例请求 ​

把尖括号中的占位符替换成实际内容。每个请求都只是起点:Agent 会调研,在需要时反问,并在属于你的决定处停下。

你想要可以这样说会发生什么
规划大型项目“为 <repositories and documents> 规划一个知识项目。”Agent 调研并写出 PLAN 供你审阅;参见 分阶段规划大型项目
从大量质量参差的来源冷启动“先探索 <repositories>,再对照代码筛查 <wiki range> 下的每篇文档。除顶层设计外,跳过自 <date> 以来未更新的文档;以 <document> 为基准。在任何生产之前,给我一份 PLAN,包含每篇文档的处理决定和三级结构。”只读探索、来源筛查和一份供审阅的 PLAN;参见 知识库冷启动
重组“重新调研已批准的知识,提出更直观的目录和标题结构。我确认后再修订。”先给出结构提案,再进行修订;参见 大规模重组
来源发版后更新“来源已升级到 <version>。找出受影响的知识并审核更新。”一份影响评估、针对性修订和一份审核报告
评测“用 <question set> 评测当前知识库,按四档评分为每个回答打分,并给出 P50/P90。”一次带评分和计时的评测运行;参见 评测知识库效果
迁移“先调研 Context 能做什么,再迁移当前知识库……”完整请求见 迁移已有知识库
构建与预览“构建知识包和文档站,并给我一个本地预览。”先构建,再提供本地预览,地址在分享前会经过检查;发布到托管环境需要你另行授权

上表用到的术语:

  • PLAN:Agent 通过 /c4a:context-plan 为大型或冷启动项目写出的调研报告,在生产前供你审阅。
  • 基准文档(冷启动中):你为某个领域指定的、当前且权威的文档。在其范围内它优先;当其他材料或代码与它不一致时,会记录处理决定及原因。
  • 审核报告:列出已写或已改页面的可读报告,由你批准或退回;参见 阅读审核报告。
  • 四档评分与 P50/P90:回答的评分等级,以及回答耗时的中位数和第 90 百分位数;两者都在 测评评分与计时标准 中定义。

自行运行的 Skill ​

有些 Skill 从不需要按名称调用。Indexer Skill(context-code-indexer、context-markdown-indexer、context-note-indexer、context-sessions-indexer)会在规划和写作期间根据当前来源和需求被选用;安装某个 Indexer 只是让它可用,并不会在每个知识工作区中启用。当宿主配置把知识问题路由给 context-inspect-search 时,它也会运行。工作流自身的步骤 Skill,例如写作某个生产阶段、翻译站点、记录版本或恢复卡住的任务,都会在工作流进行到对应步骤时运行。

Indexer Skill 安装时不带插件命名空间,因此在每个宿主中名称都相同。每个 Skill 的触发条件与交接关系见 技能清单;各 Indexer 的介绍见 内置 Indexer。

你永远不需要输入的内容 ​

生命周期命令,例如 context source add、context review … 和 context build,都由 Agent 针对工作流返回的步骤执行。你会在进度消息中看到它们,但你只需描述目标。Agent 启动时会观察知识工作区,自行判断下一步。完整的命令列表见 CLI 命令参考。