Best practices for maintaining multiple AI agents with OpenClaw — lean workspaces, skill-first architecture, memory continuity, trust-but-verify config/docs management, and agent coherence
Best practices in a single CLAUDE.md file to maintain your OpenClaw agents with ease. Works for Codex CLI and Gemini CLI too.
Running multiple OpenClaw agents sounds simple until workspace files bloat, memory drifts, config changes silently break things, and agents forget what they learned last week.
Proper maintenance is the difference between agents that degrade over time and agents that stay sharp.
Common issues after a few weeks of running OpenClaw:
Five principles that directly address these issues:
| Principle | Addresses |
|---|---|
| Lean Workspace | Bloated files, silent truncation, noisy context |
| Skills Over Bloat | Duplicated instructions across agents, workspace sprawl |
| Design for Continuity | Forgotten decisions, repeated mistakes, lessons that never stick |
| Trust but Verify | Silent config drift, stale docs, version mismatches |
| Design for Agent Coherence | Cross-agent inconsistencies, scope overlap, diverged shared instructions |
Every line in a workspace file costs tokens every turn. OpenClaw enforces hard limits (20K chars per file, 150K total) — files that exceed the limit are silently truncated. Keep files focused, separate agent-specific from shared sections, and prune regularly.
When you notice the same instructions duplicated across agents, extract them into a shared skill. Skills use progressive disclosure — only metadata in context, full instructions load on demand. One canonical location, never duplicate.
Agents forget everything between sessions. When they keep forgetting or repeating mistakes, the problem is usually that important context lives in chat instead of files. Diagnose by checking if decisions are persisted, prune bloated memory, and design self-learning triggers so corrections become permanent rules.
OpenClaw ships frequent updates — config fields get renamed, CLI flags change, features behave differently between versions. Trust your setup, but verify after every change. Fetch current docs before assuming. Run diagnostics after config edits.
Before changing one agent, understand the whole system. When maintaining multiple agents, changes to one can create inconsistencies across others. Read scope boundaries, check for duplicate skills, and treat shared instructions as shared content — not copy-pasted sections that diverge over time.
From within Claude Code, add the marketplace and install:
/plugin marketplace add hadikusumawahab/openclaw-maintenance-skill
/plugin install openclaw-maintenance-skill@openclaw-maintenance-skill
New project:
curl -o CLAUDE.md https://raw.githubusercontent.com/hadikusumawahab/openclaw-maintenance-skill/main/CLAUDE.md
Existing project (append):
echo "" >> CLAUDE.md
curl https://raw.githubusercontent.com/hadikusumawahab/openclaw-maintenance-skill/main/CLAUDE.md >> CLAUDE.md
curl -o AGENTS.md https://raw.githubusercontent.com/hadikusumawahab/openclaw-maintenance-skill/main/AGENTS.md
curl -o GEMINI.md https://raw.githubusercontent.com/hadikusumawahab/openclaw-maintenance-skill/main/GEMINI.md
These guidelines are designed to merge with project-specific instructions. Add them to your existing CLAUDE.md / AGENTS.md / GEMINI.md or use them standalone.
For project-specific rules, add sections like:
## Project-Specific
- All agents use Indonesian by default
- Finance agent handles budgeting only — no cross-domain tasks
- Cron jobs route through the orchestrator for cross-channel delivery
These guidelines bias toward durability and consistency over speed. For quick one-off tasks, use judgment — not every change needs the full rigor.
The goal is preventing drift and degradation on systems you run for months, not slowing down simple tasks.
Inspired by andrej-karpathy-skills by forrestchang.
MIT
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub hadikusumawahab/openclaw-maintenance-skill --plugin openclaw-maintenance-skillAutomatically detects and loads AGENTS.md files to provide agent-specific instructions alongside CLAUDE.md. Enables specialized agent behaviors without manual intervention.
OpenClaw tools: advisory, troubleshooting, and skill building for OpenClaw
20 modular skills for idiomatic Go — each under 225 lines, backed by 48 reference files, 8 automation scripts (all with --json, --limit, --force), and 4 asset templates. Covers error handling, naming, testing, concurrency, interfaces, generics, documentation, logging, performance, and more. Activates automatically with progressive disclosure and conditional cross-references.
Complete AI coding workflow system. Self-correcting memory + persistent FTS5-indexed research wikis + auto-research loop + multi-LLM council on a single SQLite store. 33 skills, 8 agents, 22 commands, 37 hook scripts across 24 events. Cross-agent via SkillKit.
Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.
Build and maintain an LLM-curated personal knowledge base in your project — Andrej Karpathy's LLM Wiki pattern, designed to scale to thousands of pages without becoming a context bottleneck. Now with an optional compiled graph layer for typed, provenance-backed relationships.