# Openclaw Agent Token Optimizer

> Optimize an OpenClaw agent setup (model routing, context management, delegation, rules, memory). Use when asked about optimizing agents, improving OpenClaw setup, or agent best practices.

- Skill: `demerzels-lab/openclaw-agent-token-optimizer` (Agent Skill, multi-file: 12 files)
- Install (CLI): `npx skillmds@latest add demerzels-lab/openclaw-agent-token-optimizer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/demerzels-lab/openclaw-agent-token-optimizer/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: Demerzels-lab (https://skillmd.com/u/demerzels-lab)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/demerzels-lab/openclaw-agent-token-optimizer

---


# OpenClaw Agent Optimization

Use this skill to tune an OpenClaw workspace for **cost-aware routing**, **parallel-first delegation**, and **lean context**.

## Workflow (concise)
1. **Audit rules + memory**: ensure rules are modular/short; memory is only restart-critical facts.
2. **Model routing**: confirm tiered routing (lightweight / mid / deep) aligns with live config.
3. **Context discipline**: apply progressive disclosure; move large static data to references/scripts.
4. **Delegation protocol**: parallelize independent tasks; use sub-agents for long/isolated work.
5. **Heartbeat optimization**: treat heartbeat as control-plane; move heavy checks to isolated cron/scripts; offer profiles A/B/C and require user choice if removing checks.
6. **Safeguards**: add anti-loop + budget guardrails; prefer fallbacks over retries.

## References
- `references/optimization-playbook.md`
- `references/model-selection.md`
- `references/context-management.md`
- `references/agent-orchestration.md`
- `references/cron-optimization.md`
- `references/heartbeat-optimization.md`
- `references/memory-patterns.md`
- `references/continuous-learning.md`
- `references/safeguards.md`

