社区上传

OpenClaw Config

作者 @unisone

unisone OpenClaw Config Production-tested configs, scripts, and workspace templates for OpenClaw. Hardening guides, memory engine, skill routing, agent perso...

openclaw-config

openclaw-config

Production-tested configs, scripts, and workspace templates for OpenClaw.
Not an SDK — just copyable building blocks from a real daily-driver setup.
Release v2026.02.27 • Compatible with OpenClaw 2026.2.24+

Latest Release GitHub Stars MIT License Last Commit

🚀 Production HardeningWhat's NewSession ManagementModel SafetyAgent SwarmQuickstartWhat's IncludedConfigsSkillsTemplatesContributing


Production Hardening Guide

Harden your OpenClaw setup for production in 30 minutes.

Based on critical GitHub issues and community findings, this guide addresses security and reliability gaps in default OpenClaw installations.

🔥 What It Fixes

IssueImpactFix
Secrets in configCredential theft, API key exposureMove all secrets to .env
${VAR} syntax brokenSecrets resolve to plaintext on config writes (#9627)Remove placeholders completely
API keys leak to LLMsKeys sent to providers in error logs (#11202).env-only approach
Slow crash recoveryExponential backoff causes extended downtime (#4632)ThrottleInterval: 5

📊 Default Install vs Hardened

MetricDefaultHardenedImprovement
SecretsKeys in plaintextAll in .env (chmod 600)100% elimination
Crash Recovery10s-5min5s flat60x faster
Config Rollback30+ min10 seconds180x faster
Failure DetectionHours~5 minutes48x faster
Disk Usage (1yr)~300MB~30MB90% reduction

🚀 Get Started

cd ~/.openclaw
curl -O https://raw.githubusercontent.com/YOUR_USERNAME/openclaw-config/main/production-hardening/install.sh
chmod +x install.sh
./install.sh

📖 Full Guide: production-hardening/README.md 📝 Release Notes: RELEASE-v2026.02.27.md 🔍 Research: production-hardening/RESEARCH.md


What's New in v2026.02.27

  • Session Management Suite added under scripts/session-management/:
    • session-watchdog.sh
    • session-metrics.sh
    • session-ops-weekly-report.sh
    • session-cleanup.sh
    • session-store-hygiene.sh
  • Model Change Safety Rules added: docs/model-change-safety-rules.md
  • Agent Swarm Orchestration guide added: workflows/agent-swarm-orchestration.md
  • OpenClaw Cron Patterns reference added: workflows/openclaw-cron-patterns.md
  • Agent Conventions added: docs/agent-conventions.md
  • Refined templates updated: templates/AGENTS.md, templates/HEARTBEAT.md, templates/SOUL.md

Session Management Suite

A production-focused lifecycle toolkit for session stability and context hygiene.

  • Autonomous watchdog for stale/maxed session cleanup
  • Metrics snapshots for monitoring and alerting
  • Weekly ops reporting to persistent markdown logs
  • Manual cleanup + store hygiene scripts for incident response

📄 Docs: scripts/session-management/README.md

Model Change Safety Rules

A hard safety checklist for switching models without breaking active sessions (especially Anthropic thinking-signature compatibility).

  • Pre-change checklist (contexts, thinking mode, fallback ordering)
  • Session-impact rules for shared vs isolated sessions
  • Post-change verification steps to catch signature errors early

📄 Docs: docs/model-change-safety-rules.md

Agent Swarm Orchestration

Reference architecture for running multi-agent work with routing, monitoring, review gates, and cleanup loops.

  • Smart routing + learning loop
  • Deterministic health checks + auto-respawn policies
  • Triple-review model and UI screenshot gate
  • Paired workflow docs for scheduling and cron operations

📄 Orchestration: workflows/agent-swarm-orchestration.md
📄 Cron patterns: workflows/openclaw-cron-patterns.md


Quickstart

Pick what you need. Most people start with templates or templates + task runner.

# Clone
git clone https://github.com/YOUR_USERNAME/openclaw-config.git
cd openclaw-config

# Copy templates into your workspace
rsync -av templates/ ~/.openclaw/workspace/

# (Optional) Copy the task runner
rsync -av scripts/taskrunner/ ~/.openclaw/workspace/scripts/taskrunner/

# (Optional) Copy skill routing overrides
rsync -av skills/ ~/.openclaw/workspace/skills/

Note: Replace ~/.openclaw/workspace/ with your actual workspace path if different.


What's Included

DirectoryDescription
production-hardening/Complete production hardening suite — security fixes, LaunchAgent config, log rotation, backups, health monitoring
templates/Workspace bootstrap files — AGENTS.md, SOUL.md, STATE.md, HEARTBEAT.md, IDENTITY.md, USER.md, artifacts/
skills/Workspace-level SKILL.md overrides that reduce misfires in overlapping domains
config/Gateway config snippets (JSON5) — compaction, pruning, model fallbacks, memory, search, Slack
scripts/memory-engine/Shell-based memory lifecycle: capture → recall → decay → learn + self-review
scripts/session-management/Session lifecycle suite: watchdog, metrics, weekly ops report, cleanup, and store hygiene
scripts/taskrunner/Python task automation with retry logic, file locking, structured logging
agents/Multi-agent persona prompts (researcher, architect, security auditor, etc.)
docs/Operational guides — context overflow, model-change safety rules, agent conventions, memory research, skill routing, Slack migration, model fallback strategy
content-pipeline/Optional cron-driven content workflow: draft → approve → post → metrics

Workspace Templates

The templates/ directory provides a complete workspace scaffold:

  • AGENTS.md — Session boot sequence, memory hierarchy, group chat etiquette, heartbeat system, artifact conventions (~220 lines of battle-tested instructions)
  • SOUL.md — Agent personality and philosophy. Opinionated by design — edit to match your style.
  • STATE.md — Live working context (max 3KB). Survives compaction and session resets. Priority markers: 🔴 ACTIVE / 🟡 WAITING / ⚪ DONE
  • HEARTBEAT.md — Proactive check template: STATE maintenance, cron health, inbox/calendar rotation, self-improvement
  • IDENTITY.md — Agent identity (name, emoji, avatar, history)
  • USER.md — About the human (preferences, projects, context)
  • artifacts/ — Structured output directory: reports/, code/, data/, images/, temp/

Skill Routing Overrides

OpenClaw's bundled skills sometimes collide in overlapping domains. These workspace-level overrides add "Don't use for..." negative examples to improve routing accuracy.

DomainSkillsRouting Logic
Emailgog, himalayagog → Gmail/Google Workspace · himalaya → IMAP/SMTP
Notesapple-notes, bear-notes, obsidian, notionEach gets explicit boundaries against the others
Transcriptionopenai-whisper, openai-whisper-apiLocal CLI vs cloud API
MessagingimsgFallback iMessage CLI; prefer bluebubbles if available
Codecoding-agentMulti-step coding sessions; not for simple shell commands
SummarizesummarizeURLs/podcasts/files; not for simple HTML extraction

Based on OpenAI's Shell + Skills + Compaction guidance — Glean reported 20% misfire reduction after adding negative examples.

Overrides mask bundled updates. When OpenClaw ships improved descriptions upstream, delete the override to fall back. Tracked in openclaw/openclaw#14748.


Gateway Config Snippets

Production-tested config examples in config/*.json5. Merge into your config — don't replace.

Essential

ConfigWhat It Does
compaction-and-pruning.json5Highest-impact stability settings (reserve tokens, soft thresholds)
context-overflow-prevention.json5Defensive settings for heavy tool use
model-aliases-and-fallbacks.json5Cross-provider fallbacks (Opus → Sonnet → GPT) to prevent cascading failures
memory-search.json5Semantic search over workspace memory files
slack-setup.json5Slack configuration (socket mode, allowlist policies, session sprawl prevention)

Power User

ConfigWhat It Does
pro-optimization.json5Maximum capability without sacrificing stability — longer sessions, faster recovery, aggressive caching
feature-unlocks.json5Enable production-ready features that ship disabled by default — auto-analysis, link fetch, typing indicator, heartbeats
memory-lancedb-setup.json5LanceDB + OpenAI embeddings for long-term memory
web-search-perplexity.json5Perplexity search (no rate limits with paid key)
# Apply configs, then restart
openclaw gateway restart

Tip: Apply pro-optimization first, run for a few days, then add feature-unlocks. Changing everything at once makes debugging harder.


Documentation

Production Hardening

Complete production deployment guide in production-hardening/:

DocWhat It Covers
README.mdQuick start, what's fixed, metrics, validation
IMPLEMENTATION.mdStep-by-step guide (7 phases, 60 minutes)
DECISION_MATRIX.md13K+ word analysis — 8 issues, alternatives, before/after metrics
RESEARCH.mdCommunity research findings and GitHub issues
docs/QUICK_OPS.mdDaily operations reference

Operational Guides

Key operational guides in docs/:

DocWhat It Covers
agent-system-research.mdMemory systems research (4500+ words) — SQLite+vector, tiered memory, consolidation
session-context-overflow-fix.mdContext overflow prevention strategies and settings
skill-routing-improvements.mdSkill routing audit + negative examples to reduce misfires
slack-migration-notes.mdSlack dmPolicydm.policy migration in OpenClaw 2026.2.14
model-fallback-strategy.mdWhy cross-provider fallbacks prevent cascading failures
diagnosis-protocol.mdSystematic troubleshooting for agent issues
content-strategy/Content framework, image specs, posting guidelines

Scripts

Memory Engine (scripts/memory-engine/)

Shell-based memory lifecycle: capture.shrecall.shdecay.shlearn.sh

  • Nightly learning extracts errors, corrections, and insights from daily logs
  • Self-review system (MISS/FIX tags) prevents repeated mistakes
  • See scripts/memory-engine/README.md for setup

Task Runner (scripts/taskrunner/)

Python-based task automation — replacement for fragile shell scripts:

  • Retry logic with exponential backoff
  • File locking (no concurrent runs)
  • Structured JSON logging (logs/tasks.jsonl)
  • Alert system for heartbeat integration (alerts/pending.json)
  • Example tasks: memory_capture, memory_consolidate, system_health
python3 ~/.openclaw/workspace/scripts/taskrunner/runner.py memory_capture

Agents

Drop-in persona prompts for sessions_spawn in agents/:

  • deep-researcher.md — Multi-source research with citation
  • architect.md — System design and technical architecture
  • security-auditor.md — Security review and hardening
  • content-writer.md — Content drafting with voice/tone consistency
  • ux-designer.md — UX review and design recommendations
  • market-researcher.md — Market analysis and competitive intelligence
  • project-planner.md — Project breakdown and timeline estimation
  • devils-advocate.md — Structured counterarguments

Repo Layout

openclaw-config/
├── agents/                      # Multi-agent persona prompts
├── config/                      # Gateway config snippets (JSON5)
├── content-pipeline/            # Optional: cron-driven content workflow
├── docs/
│   ├── agent-system-research.md           # Memory systems research (4500+ words)
│   ├── session-context-overflow-fix.md    # Context overflow prevention
│   ├── skill-routing-improvements.md      # Skill routing audit + improvements
│   └── content-strategy/                  # Content framework + specs
├── production-hardening/        # Production deployment suite
│   ├── README.md                # Quick start and overview
│   ├── IMPLEMENTATION.md        # Step-by-step guide
│   ├── DECISION_MATRIX.md       # Detailed analysis (13K+ words)
│   ├── RESEARCH.md              # Community research findings
│   ├── install.sh               # Automated installer
│   ├── scripts/
│   │   ├── rotate-logs.sh       # Log rotation
│   │   ├── backup-config.sh     # Daily backups
│   │   └── healthcheck.sh       # Health monitoring
│   ├── config/
│   │   ├── launchagent.plist    # Production LaunchAgent
│   │   └── gitignore.template   # Secure .gitignore
│   └── docs/
│       └── QUICK_OPS.md         # Daily operations reference
├── scripts/
│   ├── memory-engine/           # Shell-based capture/recall/decay/learn
│   └── taskrunner/              # Python task automation
├── skills/                      # Workspace-level SKILL.md routing overrides
├── templates/                   # Workspace bootstrap files
│   └── artifacts/               # Structured output directory convention
└── workflows/                   # Operational references + optional Lobster workflows

Safety & Privacy

These files are meant to be copied into your workspace. Treat them like production config:

  • Never commit secrets — API keys, tokens, cookie databases
  • Review before copying — some templates contain placeholder values
  • Fork responsibly — no personal data, no logs

See SECURITY.md for reporting vulnerabilities.


Contributing

PRs welcome. Requirements:

  • Must be tested in a real OpenClaw workspace
  • No personal data (keys, usernames, emails, logs)
  • Explain why a setting exists, not just what it does

See CONTRIBUTING.md.


License

MIT

Workspace

这里展示的是当前已发布快照。新的发布会覆盖这个视图。

下载 .zip
153 文件数更新时间 2026/03/08 10:25:31 UTC12 处脱敏3 个已拦截
发布方式 backfill-null-source-repo-v1
CLAUDE.mdtext · 1.1 KB

源码仓库

这个配置对应的原始 GitHub 仓库。

社区

还没有评论。