Learn-skills.dev inference-optimizer
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.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/aaaaqwq/claude-code-skills/inference-optimizer" ~/.claude/skills/neversight-learn-skills-dev-inference-optimizer && rm -rf "$T"
manifest:
data/skills-md/aaaaqwq/claude-code-skills/inference-optimizer/SKILL.mdsource content
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
— run audit/optimize
— same as /optimize/audit- "purge sessions", "purge stale", "clean up sessions" — after audit, if user approves
Workflow
- Audit: Exec
, return raw output. Do NOT ask what to optimize. Do NOT list options.bash <skill_dir>/scripts/openclaw-audit.sh - Purge: If user approves purge after audit, exec
, return raw output.bash <skill_dir>/scripts/purge-stale-sessions.sh - Full optimization: For Task 1–5 (workspace rewrite, heartbeat, deploy), read
and follow its flow.optimization-agent.md
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.