Install
openclaw skills install prose-optimize优化 OpenProse 文件,减少不必要的 LLM API 调用。触发:修改或编写 .prose 文件时。
openclaw skills install prose-optimize修改或编写 .prose 文件时,希望减少 LLM API 调用次数和 token 消耗。
session 和 agent 语句 — 逐个标注是否需要语义理解|,不要中间用 LLM 包装**if** 替代让 LLM 判断分支,但不如纯 Python--topic "" → falsy)**if**)仍然消耗当前 turn 的 token,不如纯 PythonBefore(2 次 LLM):
agent analyzer:
prompt: "Analyze this conversation and output JSON..."
let analysis = session: analyzer
prompt: "Analyze..."
agent extractor:
prompt: "Extract reusable knowledge and output JSON..."
let extraction = session: extractor
prompt: "Extract..."
context: analysis
After(1 次 LLM):
agent analyzer_extractor:
prompt: |
Read the session, analyze AND extract. Output single JSON:
{ "analysis": {...}, "extraction": {...} }
let combined = session: analyzer_extractor
prompt: "Read, analyze, and extract:"
# 审计 prose 文件中的 LLM 调用
grep -c "session\|agent:" my-workflow.prose
# 测试 Python 脚本 pipe
python3 ./src/script1.py --json | python3 ./src/script2.py --from-json
# 检查脚本参数处理(空值安全)
python3 ./src/collect_sessions.py --since 24h --topic "" --limit 5
Extracted by EvoSkill