Install
openclaw skills install @arroncn993-sys/openclaw-compile-skillUse when the operator asks to compile the configured inbox knowledge notes into curated transit documents and archive source material with auditable links. Do not use for ordinary note editing, final wiki merging, or tasks that should only summarize content.
openclaw skills install @arroncn993-sys/openclaw-compile-skill你是编译执行器。目标是把配置的收件箱原文编译到配置的中转站,并把原文与图片安全归档到配置的原材料仓库。
业务路径由 OpenClaw / agent 配置注入,换执行 agent 时不改 Skill 本体:
OPENCLAW_VAULT:Vault 根目录COMPILE_INBOX_DIR:收件箱,必须由配置注入;未配置时流程失败,禁止回退到 Inbox/COMPILE_TRANSIT_DIR:中转站COMPILE_RAW_DIR:原材料仓库COMPILE_STATE_DIR:checkpoint 状态目录COMPILE_QMD_ENTRY:QMD 入口COMPILE_ACTOR_NAME:写入 compiled_by 的执行者名称,荔枝生产环境固定为 荔枝COMPILE_FILENAME_LOG_FILE:执行者自己的文件名决策日志,必须由配置注入.openclaw/state/compile/runs/,只作为短期运行缓存query_history.sh)。Knowledge/_INDEX.md 里的现有主题词;查不到时再自己设计。compile_check.sh 审计失败就停下,不允许带病继续。compile_frontmatter_gen.sh 生成。compile_check.sh FAIL 必须停止,并写 blocked checkpoint。compile_step_checkpoint.sh 记录状态。original / compiled_version 必须写带路径 wikilink,且必须回读验证。<invoke ...>、XML、伪 tool 标签或把 shell 命令写成普通文本。Inbox/;真实收件箱由 COMPILE_INBOX_DIR 指定。bash {baseDir}/scripts/compile_precheck.sh --vault "$OPENCLAW_VAULT"
references/workflow.mdcompile_precheck.sh:路径校验 + 收件箱待编译扫描compile_clipper_fix.sh:eb-clipper 脏数据修复compile_duplicate_check.sh:标题归一化 + source 兜底的重复检查compile_filename_check.sh:文件名与主题一致性核对(默认只报建议,传 --apply 才改名)compile_frontmatter_gen.sh:生成标准 frontmattercompile_archive.sh:归档原文、图片和双向链接compile_step_checkpoint.sh:防跳步 + micro-audit 门禁compile_task_logger.sh:记录短期结构化运行日志并自动清理旧 runscompile_check.sh:27 项机械性自审# Step 1.5 文件名核对
bash {baseDir}/scripts/compile_filename_check.sh \
--file "$COMPILE_INBOX_DIR/示例.md" \
--llm-summary "文章实际主题摘要" \
--llm-keywords "关键词1,关键词2,关键词3"
# Step 2 frontmatter 生成
bash {baseDir}/scripts/compile_frontmatter_gen.sh \
--title "示例标题" \
--author "@author" \
--source "https://example.com" \
--compiled-by "$COMPILE_ACTOR_NAME" \
--tags "compile,knowledge-pipeline" \
--keywords "主题关键词1,主题关键词2" \
--related-wiki "[[Harness Engineering]] | rough"
# Step 4 归档
bash {baseDir}/scripts/compile_archive.sh \
--source "$COMPILE_INBOX_DIR/示例.md" \
--compiled "$COMPILE_TRANSIT_DIR/示例.md" \
--title "示例"
references/workflow.mdreferences/title-rules.mdreferences/frontmatter-spec.mdreferences/self-check-checklist.mdreferences/error-playbook.md| 日期 | 变更 |
|---|---|
| 2026-04-29 | Step 0.1.5 查重增强:新增 compile_duplicate_check.sh,标题先做归一化(忽略 : / - 等标点差异),并用 source URL 做二次兜底;当前查重范围只保留 原材料仓库,不再扫描 中转站 与 已入库 |
| 2026-05-02 | 本机安装版收紧配置门禁:COMPILE_INBOX_DIR 与 COMPILE_FILENAME_LOG_FILE 缺失时 fail fast,不再回退或创建通用 Inbox/ / Openclaw/Ops/compile 目录 |
| 2026-04-27 | Step 0.1.5 查重修正:比对目标从 中转站 改为 已入库。源文件全程不改动,文件名是唯一标识,只做文件名比对(原材料仓库 + 已入库)。同内容换标题的特例不处理 |
| 2026-04-27 | 源文件不改动原则确认:源文件在流水线中只做移动(收件箱→原材料仓库→已入库),内容和文件名不变。唯一例外:Step 0.0 clipper_fix 属于编译前预处理,不算改动源文件 |