SKILL.md
只读
名称
index-at-creation
描述
在创建时进行索引
在创建时进行索引 (Index at Creation Time)
在生成工件(Artifacts)时立即对其进行索引,而不是等到批处理边界时再处理。
模式 (Pattern)
如果下游逻辑依赖于可查询的工件,请在写入时立即进行索引。
推荐做法 (DO)
- 在 PostToolUse Write 挂钩(Hook)中索引交接内容(创建后立即执行)
- 使用
--file标志进行快速单文件索引 - 由创建工件的同一个事件来触发索引
拒绝做法 (DON'T)
- 等到 SessionEnd 时再进行批量索引
- 依赖定时任务/计划任务来处理时效性高的数据
- 盲目假设数据“很快就会可用”
来源会话 (Source Sessions)
- a541f08a: "Index at artifact creation time, not at SessionEnd"
- 1c21e6c8: "If downstream logic depends on artifacts, index at the moment they're created"






