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 367 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.
July 2026 sweep. Stable baseline: OpenClaw 2026.6.11 (released 2026-06-30). This refresh covers the 2026.6.8–2026.6.11 trains — automatic fast mode, working failover, per-agent cost visibility, prompt-cache retention, cron fallback controls, and channel-delivery self-recovery — and corrects the previous revision, which referenced a "2026.6.4" release and several config keys that were never shipped. See the correction note in Part 33.
By Terp — Terp AI Labs
The June trains (2026.6.8 → 2026.6.11) were about making OpenClaw dependable. If you last read this guide in mid-June, these are the new rules:
openclaw gateway usage-cost --agent <id> (or --all) shows spend per configured agent; cron it daily and treat spend jumps as context regressions. (There is no per-agent budget-cap config key — an earlier revision of this guide claimed one in error.)--fallbacks list (or run strict with --fallbacks ""). None of it helps without at least two configured lanes./fast auto (2026.6.10) runs short conversational turns in the provider's fast lane and returns to normal mode for longer work, with correct status through retries and fallback switches.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":