openclaw-self-healing
4-tier autonomous self-healing system for OpenClaw Gateway with persistent learning, reasoning logs, and multi-channel alerts. Features Claude Code as Level 3 emergency doctor for AI-powered diagnosis and repair.
Why use this skill?
Deploy a 4-tier autonomous self-healing system for OpenClaw using Claude Code. Ensure maximum uptime with AI-powered diagnosis, persistent learning logs, and multi-channel alerts.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ramsbaby/openclaw-self-healingWhat This Skill Does
The openclaw-self-healing skill provides a robust, 4-tier autonomous recovery architecture designed specifically for the OpenClaw Gateway. It operates by layering defensive strategies: Level 1 monitors processes via an internal watchdog, Level 2 performs automated HTTP health checks with retry logic, Level 3 employs Claude Code as an autonomous emergency doctor to diagnose and patch configuration or runtime issues, and Level 4 provides human-in-the-loop escalation via Discord and Telegram. This system is not just a restart script; it is a persistent learning engine that documents symptoms, causes, and solutions to build a knowledge base for future incident prevention.
Installation
Installation is streamlined for macOS environments. First, ensure you have the required utilities installed by running brew install tmux and npm install -g @anthropic-ai/claude-code. Next, configure the environment by copying the template: cp .env.example ~/.openclaw/.env, then populate it with your Discord webhook and gateway settings. Install the core scripts by moving them to your script directory and ensuring they are executable (chmod +x). Finally, activate the system using the provided LaunchAgent: cp launchagent/com.openclaw.healthcheck.plist ~/Library/LaunchAgents/ followed by launchctl load. Verify the installation by checking launchctl list | grep openclaw.healthcheck.
Use Cases
This skill is ideal for production environments where OpenClaw Gateway downtime must be minimized. It is particularly useful for headless servers, automated trading bots, or AI-agent clusters where manual intervention is slow or impossible. By leveraging Claude Code, it can resolve complex configuration drifts or dependency errors that standard bash scripts would fail to catch. It serves as an insurance policy for high-uptime AI operations.
Example Prompts
- "Analyze the last recovery log and summarize why the gateway crashed yesterday."
- "Update the self-healing thresholds to wait 500 seconds instead of 300 before triggering a restart."
- "Show me the metrics dashboard for the last 7 days of gateway uptime and recovery success."
Tips & Limitations
Always create a backup of your primary configuration (openclaw.json) before testing the Level 3 recovery flows. While Claude Code is highly capable, remember that granting AI autonomous shell access requires careful monitoring of the reasoning logs. Regularly audit the logs in ~/openclaw/memory/ to ensure the AI's diagnostic patterns align with your infrastructure standards.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ramsbaby-openclaw-self-healing": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-write, file-read, external-api, code-execution
Related Skills
self-evolving-agent
AI 비서가 자기 로그를 분석해서 AGENTS.md 개선안을 제안하는 자동화. v5.0: 시맨틱 임베딩(Ollama nomic-embed-text, FP ~8%), 실시간 스트리밍 모니터(<30초 알림), 플릿 분석(다중 인스턴스). v4.3: 대화형 승인, 멀티포맷 리포트, GitHub Issues. v4.2: Ollama LLM. v4.1: 멀티플랫폼 배달. v4.0: 4단계 파이프라인. 제안만 함, 직접 수정 절대 없음.
memorybox
Zero-dependency memory maintenance CLI for OpenClaw. Keeps MEMORY.md lean with 3-tier hierarchical organization. Works alongside Mem0, Supermemory, QMD — or standalone. Install once, forget about memory management.