Production-oriented OpenClaw skill for auditing runtime health, cleaning stale session state, and applying safer inference tuning with approval.
inference-optimizer does not start with token tuning guesses. It checks the runtime first, then recommends cleanup or tuning only after the obvious operational failures are ruled out.
Audit order:
- Gateway ownership and duplicate supervisors
- Restart loops and failed services
- Resolved
openclawbinary path and install type - Updater status and allowlist coverage for the resolved path
- Plugin provenance and unused local extensions
- Context pressure, stale sessions, cache-trace, pruning, and concurrency
Core commands:
/preflight
/audit
/optimize
purge sessions
clawhub install inference-optimizerManual install:
git clone https://github.com/vitalyis/inference-optimizer.git ~/clawd/skills/inference-optimizer
bash ~/clawd/skills/inference-optimizer/scripts/setup.sh
bash ~/clawd/skills/inference-optimizer/scripts/setup.sh --apply/preflight # backup + audit + setup preview
/audit # analyze-only runtime audit
/optimize # audit, then propose approved actions
purge sessions # archive stale sessions after approval
Operational checks:
- Treat warnings as signals, not proof.
- If updater output is partial or truncated, verify installed version, service status, and logs before claiming root cause.
- Resolve the real executable path before changing the allowlist.
- Use
bash scripts/verify.shafter install; it now fails on legacyskills/publicand repo-local workspace wiring.
For script details and safety constraints, see SECURITY.md.
cd ~/clawd/skills/inference-optimizer && git pullIf installed elsewhere, pull from that skill directory instead.
rm -rf ~/clawd/skills/inference-optimizer/auditis analyze-only and should not mutate workspace files.purge-stale-sessions.sharchives by default. Use--deleteonly for intentional immediate removal.setup.shpreviews by default. Use--applyonly after reviewing changes.- For allowlists, prefer exact executable paths or bounded NVM wildcards such as
/home/ubuntu/.nvm/versions/node/*/bin/openclaw *. - Do not rely on basename-only allowlist entries like
openclaw.
Additional background and remediation notes live in SECURITY.md.
Contributions are welcome. See CONTRIBUTING.md for workflow and release-note expectations.
MIT
