Reindex

作者 oryf60f9ecee417无许可证收录于 2026年10月8日更新于 2026年10月8日

Refresh or rebuild the bundled Lumen index for the current project, preferring MCP-driven refreshes and using the CLI only for an explicit clean rebuild.

仅含说明AI & Agents
AI 生成的概览

通过 MCP 工具刷新或重建当前项目的 Lumen 索引,仅在需要彻底重建时使用 CLI 命令。

功能
该技能指导代理刷新或重建当前项目的 Lumen 索引。它先检查索引状态,再通过一次宽泛的语义搜索调用触发自动刷新,仅在用户明确要求彻底重建时才回退到 shell 命令。最后报告索引详情,如向量精度、唯一向量数、去重比例和数据库大小。
适用场景
当项目的 Lumen 索引过期、缺失或需要在搜索前初始化时使用。也适用于用户明确要求彻底重建,或希望回收未使用索引所占磁盘空间的场景。
运行要求
需要 Lumen MCP 工具(index_status、semantic_search),彻底重建时还需要在 shell 中可用的 Lumen CLI。不附带脚本,仅为操作说明。

Lumen Reindex

Refresh or rebuild the bundled Lumen index for the current project.

Steps

  1. Call the Lumen index_status tool for the current working directory so you can report the current state before making changes.
  2. If the user wants the index refreshed or seeded, call the Lumen semantic_search tool with a broad natural-language query and set path or cwd to the current working directory. The search tool refreshes stale or missing indexes automatically.
  3. If the user explicitly asks for a clean rebuild, explain the options and run one via the shell:
    • lumen index --force . — reprocesses every file for the current project without wiping other worktrees or their shared vectors. Prefer this.
    • lumen clean --days 0 && lumen index . — deletes every cached index not held by an active indexer lock before rebuilding; locked collections are skipped and counted in the summary. Use only when the user asks for a full wipe.
    • lumen clean — removes indexes for projects that no longer exist or have not been used in 30 days. Use to reclaim disk space, not to rebuild the current project.
  4. After the refresh or rebuild, report the new index status, including vector precision, unique vectors, shared references, deduplication ratio, database bytes, and reclaimable bytes when available.

来源与署名

来源:ory/lumen位于skills/reindex提交f60f9ec

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架