首页龙虾技能列表 › Prose Optimize — 散文优化

🧬 Prose Optimize — 散文优化

v1.0.2

散文优化工具。

0· 168·1 当前·1 累计
by @norci·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/19
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
Instruction-only skill that gives guidance for reducing LLM calls in .prose files; the requested binaries and instructions align with that purpose and nothing requested appears disproportionate.
评估建议
This is an instruction-only helper that sensibly recommends using python3 and grep to replace some LLM steps in .prose workflows. Before using it, review any local scripts (e.g., ./src/*.py or collect_sessions.py) the skill suggests running — the skill assumes those scripts exist and will be executed by the agent. Also confirm your agent/runtime policy for running shell commands: while the skill itself doesn't request credentials or network access, running arbitrary scripts can execute arbitrary...
详细分析 ▾
用途与能力
Name/description (optimize .prose to reduce LLM calls) match the required tools (python3, grep) and the examples: the skill's recommendations are about replacing LLM steps with Python scripts, piping, and grepping prose files, which legitimately require those binaries.
指令范围
SKILL.md is focused on auditing and refactoring .prose workflows. It references running grep and python scripts, merging agent calls, and using Prose VM conditionals. It does not instruct reading unrelated system files, exfiltrating data, or contacting external endpoints.
安装机制
No install spec and no code files — the skill is instruction-only. That minimizes on-disk risk; runtime suggestions rely on already-installed python3/grep.
凭证需求
No environment variables, credentials, or config paths are requested. The lack of secrets is proportional to the described purpose.
持久化与权限
always is false and the skill is user-invocable; it does not request persistent system changes or cross-skill configuration.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.22026/3/19

Fixed: Added missing binaries field in metadata. Changed from 'binaries' to 'requires.bins' to match ClawHub spec.

● 无害

安装命令 点击复制

官方npx clawhub@latest install prose-optimize
镜像加速npx clawhub@latest install prose-optimize --registry https://cn.clawhub-mirror.com

技能文档

当...时 到 使用

修改或编写 .prose 文件时,希望减少 LLM API 调用次数和 token 消耗。

Steps

  • 审计所有 会话agent 语句 — 逐个标注是否需要语义理解
  • Python 替代 — 以下场景不需要 LLM:
- 跑脚本并返回输出 - 条件分支(如果/否则) - JSON 解析和字段提取 - 简单的模板渲染(JSON → 报告)
  • Pipe 连接脚本 — 多个 Python 脚本串联用 |,不要中间用 LLM 包装
  • 合并 LLM 调用 — 只做数据传递的 agent 步骤可以合并:
- analyzer + extractor → 一次调用输出两份 JSON - 模式分析 + SKILL.md 生成 → 一次调用输出两份
  • 用 Prose VM 原生条件如果 替代让 LLM 判断分支,但不如纯 Python
  • Python 统一入口 — 把分支逻辑封装到一个 Python 脚本,prose 里一行调用

Common Pitfalls

  • 变量为空时直接拼命令会导致 argparse 参数错位,需要 Python 脚本处理空值(--topic "" → falsy)
  • 合并 agent 步骤时注意 context 依赖,合并后失去中间变量
  • Prose VM 条件分支(如果)仍然消耗当前 turn 的 令牌,不如纯 Python
  • 不要为了合并而合并 — 如果两个步骤逻辑独立,分开更清晰

Examples

之前(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

之后(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:"

键 Commands

# 审计 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_

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务