by OnlyTerp
Make your OpenClaw AI agent faster, smarter, and cheaper. Speed optimization, memory architecture, context management, model selection, and one-shot development guide.
# Add to your Claude Code skills
git clone https://github.com/OnlyTerp/openclaw-optimization-guideGuides for using ai agents skills like openclaw-optimization-guide.
Last scanned: 5/29/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-29T07:56:53.888Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}openclaw-optimization-guide is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by OnlyTerp. Make your OpenClaw AI agent faster, smarter, and cheaper. Speed optimization, memory architecture, context management, model selection, and one-shot development guide. It has 353 GitHub stars.
Yes. openclaw-optimization-guide passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/OnlyTerp/openclaw-optimization-guide" and add it to your Claude Code skills directory (see the Installation section above).
openclaw-optimization-guide is primarily written in JavaScript. It is open-source under OnlyTerp on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh openclaw-optimization-guide against similar tools.
No comments yet. Be the first to share your thoughts!
Make your OpenClaw AI agent faster, smarter, cheaper, and actually safe to run in production.
June 2026 sweep. Stable baseline: OpenClaw 2026.6.4. Beta tracked: 2026.6.11-beta.1. This refresh advances the late-May guidance to the current line: per-agent budget caps, scheduled Policy attestations with drift gating, provider health checks with automatic failover, Google Meet live capture for Meeting Notes with retention/redaction, recall/dreaming tuning,
/context map --diff, sandbox egress allowlists, andopenclaw doctorsecret-rotation + MCP-scope lint.
By Terp — Terp AI Labs
The late-May betas are now stable, and early-June added four cost/safety levers worth wiring in. If you last read this guide around 2026.5.22/2026.5.24, these are the new rules:
agents.list[].budget caps first-class with onExceed: warn|degrade|stop. Give the orchestrator a cap and let degrade reroute routine work to cheap lanes automatically.openclaw policy check --export produces diffable attestations; schedule it (and wire it into CI) so channel-policy drift is caught instead of discovered. Opt-in repair stays a human step.models.providers.<id>.health checks so a failing lane demotes itself for a bounded window instead of failing every turn — but only if you configured fallback lanes.meetingNotes.retentionDays and redaction rules before auto-capture so transcripts expire and scrub sensitive fields.memory.recall.maxParallel, scheduled dreaming, memory promote --dry-run, and /context map --diff let you tune recall, consolidation, and context regressions deliberately instead of by feel.Read Part 33 — June 2026 Field Guide first if you want the latest tricks before the deep dives.
Most agent capability comes from the harness, not the weights.
The exact percentage is rhetoric. The operator lesson is concrete: model swaps help, but the big wins come from context budgets, memory discipline, tool permissions, flow control, provider routing, hooks, and verification loops.
flowchart LR
subgraph Model["The Model (weights)"]
M[Claude Opus 4.7<br/>or your choice]
end
subgraph Harness["The Harness (operator-controlled) — this guide"]
direction TB
Inst[Instructions<br/>SOUL/AGENTS/MEMORY/skills]
Ctx[Context engineering<br/>budgets + progressive disclosure]
Tools[Tools + approvals<br/>semantic categories]
Guard[Guardrails<br/>hooks, Task Brain, redaction]
Mem[Memory layer<br/>memory-core + LightRAG + dreaming]
Orch[Orchestration<br/>5 coordination patterns]
end
Model -.-> Harness
Harness -.-> Results[Production results]
You usually cannot change the weights. You can change everything else: context, memory, tools, approvals, verification, cost controls, and orchestration. The rest of this guide is that operator-controlled layer.
| Do this | For this outcome |
|---|---|
| Grade your setup → | 50-item Production Readiness Scorecard, score out of 100, shareable. |
| Copy the reference config → | Working SOUL / AGENTS / MEMORY / TOOLS templates plus a conservative example config. |
| See the numbers → | Reproducible benchmark methodology + harness + run template. |
| Browse the ecosystem → | Curated list of skills, tools, papers, talks, adjacent projects. |
| Hit a wall? → | Gotchas & FAQ, symptom-indexed. Most questions answered in one page. |
OpenClaw's file layout maps 1:1 to Karpathy's three-tier LLM Wiki pattern published April 10, 2026. If you only remember one diagram from this guide, make it this one:
flowchart TB
subgraph Raw["Raw sources — immutable, agent read-only"]
Vault["vault/*"]
Daily["memory/YYYY-MM-DD.md"]
end
subgraph Curated["Curated summaries — injected on every message"]
Soul["SOUL.md<br/>identity"]
Agents["AGENTS.md<br/>operational rules"]
Mem["MEMORY.md<br/>durable facts"]
Dreams["DREAMS.md<br/>reflection diary"]
Skills["skills/*<br/>on-demand playbooks"]
end
subgraph Artifacts["Generated artifacts — one-shot output"]
PRs["PRs / commits"]
Reports["Reports / transcripts"]
end
Raw -. memory_search .-> Agent((Agent))
Curated --> Agent
Agent --> Artifacts
Agent -. Deep-phase promote .-> Mem
Artifacts -. auto-capture .-> Daily
| File | Purpose | Size cap | Written by | Read when |
|---|---|---|---|---|
| SOUL.md | Identity, invariants, non-negotiables | < 1 KB | Human | Every message |
| AGENTS.md | Operational rules, decision trees, tool routing | < 2 KB | Human + agent (auditable) | Every message |
| MEMORY.md | Durable facts promoted from short-term (pointer index) | < 3 KB | Agent via memory promote |
Every message |
| DREAMS.md | Human-readable reflection diary | latest N entries | Built-in Dreaming | Every message |
| skills/ | Named playbooks | per-skill small | Human + SkillClaw | On activation |
| vault/ | Raw source notes, transcripts, links | unbounded | Auto-capture + humans | On memory_search |
| memory/YYYY-MM-DD.md | Daily short-term rollup | rolling | Auto-capture | On memory_search |
Full reasoning and update rules in Part 31 — The LLM Wiki Pattern In OpenClaw.
| Metric | Before | After | Source |
|---|---|---|---|
| Context file size (SOUL + AGENTS + MEMORY) | ~15 KB | ~5 KB | Part 1 |
| Memory search latency | 2–5s (cloud) | <100ms (local) | Part 4, Part 10 |
| Compaction crash rate | loops on 16K models | fixed in 4.15+ | Part 15 |
| Coding-agent token usage | baseline | –60% | Part 19 — Repowise |
| Sessions before audit trail | 0 surfaces | all surfaces | Part 24 — Task Brain |
Full numbers in benchmarks/.
Alongside the 33 parts themselves, this repo now includes the tooling that turns "I read the guide" into "I can audit and reproduce the results":