Spin up a battle-tested OpenClaw agent in minutes, not months.
This repo contains the distilled operational DNA from a production OpenClaw agent (Mr. Bernard) that's been running since February 2026. It encodes hundreds of hours of hard-won lessons into a reusable bootstrap that any new agent can inherit.
A bootstrap kit that takes a fresh OpenClaw install and gives it:
- Workspace structure — organized memory system, heartbeat config, project scaffolding
- Operational playbook — rules for memory discipline, communication, error recovery, security
- Anti-patterns — every mistake already made so your agent doesn't repeat them
- Persona templates — starting points for SOUL.md, IDENTITY.md, AGENTS.md (customize to your taste)
- Skills manifest — which skills to install first and how to configure them
- Not a copy of Mr. Bernard (you'll build your own persona)
- Not a replacement for OpenClaw itself (you need OpenClaw installed first)
- Not magic — your agent still needs to learn and grow, but it starts from a much better foundation
git clone https://github.com/<your-username>/bernard-bootstrap.git
cd bernard-bootstrap
bash setup.shThen customize:
- Edit
SOUL.md— give your agent a personality - Edit
USER.md— tell it about yourself - Edit
IDENTITY.md— name, backstory, operational persona - Read the playbook files in
playbook/for best practices
If you need to spin up a fresh VPS and install everything:
# On your local machine or existing server:
bash provision/provision-vps.sh <VPS_IP> <SSH_KEY_PATH>This will:
- Create the
openclawuser with proper permissions - Install Node.js, OpenClaw, and dependencies
- Run the bootstrap setup
- Configure systemd services
- Set up firewall basics
See provision/README.md for cloud provider-specific instructions (Hetzner, DigitalOcean, etc.).
bernard-bootstrap/
├── README.md ← You are here
├── setup.sh ← One-shot workspace setup
├── provision/
│ ├── README.md ← VPS provisioning guide
│ ├── provision-vps.sh ← Automated VPS setup script
│ └── setup-telegram-bot.md ← Telegram bot creation guide
├── templates/
│ ├── AGENTS.md ← Workspace rules, memory habits, efficiency principles
│ ├── SOUL.md ← Personality and core values
│ ├── IDENTITY.md ← Name, backstory, operational persona
│ ├── USER.md ← Template for describing your human
│ ├── HEARTBEAT.md ← Periodic check configuration
│ └── TOOLS.md ← Service and integration notes
├── playbook/
│ ├── memory-discipline.md ← The #1 thing to get right
│ ├── security.md ← Access control, secrets, API keys, Cloudflare, watchdogs
│ ├── communication.md ← Speaking, routing, voice, social media, email outreach
│ ├── error-recovery.md ← Gateway, SSH, services, credits, webhooks, remote machines
│ ├── anti-patterns.md ← Every mistake already made (30+ entries)
│ ├── subagent-orchestration.md ← Fan-out/synthesis, pipeline state, cost awareness
│ └── web-services.md ← Dashboards, auth, APIs, systemd, nginx, Playwright
└── skills/
└── manifest.md ← 5-phase skill installation guide
These are the most important lessons from production:
- Write-through memory — If you learn something, write it to a file immediately. "Mental notes" don't survive restarts.
- Machine-to-machine first — If a task can be a bash script or cron job, don't route it through an LLM. Reserve tokens for judgment calls.
- Scripts > LLM for plumbing — Health checks, file syncs, API calls, notifications = pure scripts. Zero LLM involvement.
- System crontab for deterministic tasks — OpenClaw cron isolated sessions have a known bug where tools may not be provided to models. Use
crontab -efor anything that doesn't need LLM judgment. - Never auto-harden — Always propose security changes and get approval. Never lock yourself out.
- Fallback within tier — If your primary API key runs out, fall back to another key on the same provider. Never fall back to free/incapable models.
- Checkpoint before iterating — Git commit before making changes. Tag important versions. Cheap insurance.
- Groups see only final output — No progress updates, no system messages, no errors. Deliver the finished product.
- Build a hallucination watchdog — Automate checks for stale file paths, dead URLs, missing env vars. Run daily. Your docs WILL drift from reality.
- Pipelines are autonomous after trigger — Multi-step workflows auto-continue. Never make your human manually kick the next stage.
- NEW:
subagent-orchestration.md— fan-out/synthesis, pipeline state, model selection, cost awareness - NEW:
web-services.md— vanilla JS dashboards, URL-param auth, SSE, systemd, nginx, Playwright - Anti-patterns +8: headless vs Cloudflare, CSS/GSAP conflicts, networkidle hangs, systemd PATH, Bot API webhooks, HEIC speed, C compiler deps, env var typos
- Error recovery +5: port conflicts, credit exhaustion, webhook debugging, remote SSH, subagent timeouts
- Security +3: API key management, Cloudflare tips, hallucination watchdog
- Communication +3: voice messages, social media/Twitter, email outreach
- Skills manifest v2: 5 phases, custom skills section, TTS options, himalaya tips
- Templates updated: AGENTS.md (cost management), TOOLS.md (expanded sections)
- Key principles +2: hallucination watchdog, autonomous pipelines
- Added
provision/directory with automated VPS provisioning script - Added Telegram bot setup guide
- Added SMS/voice channel handling patterns to AGENTS.md template
- Added emergency contact protocol pattern to AGENTS.md template
- Added heartbeat vs cron decision guide
- Updated anti-patterns with subagent code injection, model size failures
- Updated skills manifest with latest recommendations
- Setup script now supports
--provisionflag for full VPS setup
- Added machine-to-machine efficiency principle to AGENTS.md
- Added pipeline auto-continuation rules
- Added routing rule (reply goes to sender, not human)
- Added cron isolated session tools bug to anti-patterns
- Added free model fallback chain anti-pattern
- Added subagent code injection anti-pattern
- Added secrets-in-git anti-pattern
- Added field name mismatch anti-pattern
- Added overwriting-without-checkpoint anti-pattern
- Added system vs OpenClaw cron guidance
- Added API credit/auth recovery to error-recovery
- Added cron job debugging to error-recovery
- Added restart context pattern to memory-discipline
- Added MEMORY.md security rule (main session only)
- Added channel parity rule to security
- Added emergency contact protocol to security
- Added routing rule to communication
- Updated heartbeat template with tips and memory maintenance
- Initial release: templates, playbook, setup script, skills manifest