inference-optimizer
GitHub用于审计OpenClaw令牌使用、清理过期会话及优化推理速度。触发词包括/optimize、/audit及清理请求,执行脚本返回结果或按流程优化。
Trigger Scenarios
Install
npx skills add NeverSight/learn-skills.dev --skill inference-optimizer -g -y
SKILL.md
Frontmatter
{
"name": "inference-optimizer",
"license": "MIT",
"metadata": {
"author": "clawdbot",
"version": "0.1.0"
},
"description": "Audit OpenClaw token usage, purge stale sessions, and optimize inference speed. Use when the user sends \/optimize, \/audit, asks to purge sessions, or wants a token\/workspace audit."
}
Inference Optimizer
Optimize OpenClaw for maximum inference speed and minimum token usage. When user sends /optimize or /audit, exec the audit script and return raw output. When user approves purge, exec the purge script.
Triggers
/optimize— run audit/audit— same as /optimize- "purge sessions", "purge stale", "clean up sessions" — after audit, if user approves
Workflow
- Audit: Exec
bash <skill_dir>/scripts/openclaw-audit.sh, return raw output. Do NOT ask what to optimize. Do NOT list options. - Purge: If user approves purge after audit, exec
bash <skill_dir>/scripts/purge-stale-sessions.sh, return raw output. - Full optimization: For Task 1–5 (workspace rewrite, heartbeat, deploy), read
optimization-agent.mdand follow its flow.
Path Resolution
Scripts live at ~/clawd/skills/public/inference-optimizer/scripts/ (or wherever the skill is installed). Use that path when exec-ing.
Allowlist
Purge script needs: find, find *, find **, rm, rm *, rm **, bash, bash *, bash **. Add to exec-approvals.json for the agent if purge is blocked.
Version History
- e0220ca Current 2026-07-05 21:54


