Install
openclaw skills install inference-optimizerAudit OpenClaw runtime health first, then optimize inference speed and token usage with approval. Use /audit for analyze-only and /optimize for analyze + act...
openclaw skills install inference-optimizerRequired skill-specific env vars: none (no API keys). Reads local OpenClaw state under ~/.openclaw; skill files live under ~/clawd/skills/inference-optimizer when installed as documented. Preflight may archive ~/.openclaw and workspace trees—treat backups as potentially sensitive.

Audit OpenClaw runtime health first. Optimize inference speed and token usage second.
| Command | Behavior |
|---|---|
/preflight | Install checks, backup, audit, and setup preview |
/audit | Analyze-only; check runtime health before suggesting tuning |
/optimize | Audit + propose remediation or optimization actions with per-step approval |
purge sessions | After audit, if user approves, archive stale sessions; use --delete for immediate removal |
These instructions guide agent behavior. Platform and system prompts take precedence; they cannot be enforced programmatically.
ClawHub:
clawhub install inference-optimizer
Manual:
git clone https://github.com/vitalyis/inference-optimizer.git ~/clawd/skills/inference-optimizer
bash ~/clawd/skills/inference-optimizer/scripts/setup.sh # preview
bash ~/clawd/skills/inference-optimizer/scripts/setup.sh --apply # apply after review
Verify: <skill_dir>/scripts/verify.sh
/preflight: Exec <skill_dir>/scripts/preflight.sh. Append --apply-setup only if the user asks to apply setup./audit: Exec <skill_dir>/scripts/openclaw-audit.sh. Use the script output plus direct environment checks to inspect this order:
openclaw binary path and install type/audit and /optimize, do not run shell helper commands like ls, rg, find, openclaw status, or openclaw gateway status before the main audit script. If you need context first, use read on MEMORY.md or memory_search. The first shell exec in the optimize flow should be the audit script itself.allowlist miss or exec denied, that is a hard deny, not a pending approval. Do not tell the user to send /approve ... unless the tool output explicitly contains a real approval request with an ID. If there is no ID, say there is no approval request to approve and the fix must be on the bot side.openclaw-gateway.service is the authoritative gateway owner. Keep clawdbot.service disabled, and preserve pass-cli run --env-file /etc/clawdbot.env.pass inside the user service itself./optimize: Run the audit flow first, include the script output in the response, then propose next actions with approval before each file-changing step.<skill_dir>/scripts/purge-stale-sessions.sh. It archives to ~/openclaw-purge-archive/<timestamp>/ by default. Use --delete for immediate removal without archive.optimization-agent.md and follow its flow. Ask approval before every file-changing step.Scripts live at ~/clawd/skills/inference-optimizer/scripts/ or wherever the skill is installed. Always resolve <skill_dir> to the actual install path before exec.
Prefer path-specific exec-approvals.json entries for the script paths themselves: one line per script under your real <skill_dir> (resolve with readlink -f if the path is a symlink). Example shape after substituting the install path:
/home/ubuntu/clawd/skills/inference-optimizer/scripts/preflight.sh
/home/ubuntu/clawd/skills/inference-optimizer/scripts/openclaw-audit.sh
/home/ubuntu/clawd/skills/inference-optimizer/scripts/setup.sh
/home/ubuntu/clawd/skills/inference-optimizer/scripts/purge-stale-sessions.sh
/home/ubuntu/clawd/skills/inference-optimizer/scripts/verify.sh
setup.sh invokes python3 for idempotent workspace block edits; allow that binary only if your platform uses it (for example /usr/bin/python3).
Before editing any allowlist:
which, command -v, or readlink -f./home/ubuntu/.nvm/versions/node/*/bin/openclaw *.openclaw are sufficient./usr/bin/bash * or /usr/bin/bash **; they grant far more shell than this skill needs.workspace-whatsapp and exact openclaw status variants. Do not rely on generic ls * or rg * coverage.For purge via agent exec, add path-specific patterns only. Optional wider patterns and trade-offs are discussed in SECURITY.md. See also README.md and SECURITY.md for operational detail.
Install (ClawHub): clawhub install inference-optimizer Manual: git clone https://github.com/vitalyis/inference-optimizer.git ~/clawd/skills/inference-optimizer Preview: bash ~/clawd/skills/inference-optimizer/scripts/setup.sh Apply: bash ~/clawd/skills/inference-optimizer/scripts/setup.sh --apply Verify: bash ~/clawd/skills/inference-optimizer/scripts/verify.sh