Install
openclaw skills install error-proof-systemThree-layer error prevention system for AI agents. Prevents recurring mistakes through external skill guards, delivery checkpoints, and self-evolving error memory. Includes 14+ documented failure patterns with root causes and fixes. Built from real production failures, not theory.
openclaw skills install error-proof-system"The same mistake, twice is a bug. Three times is a system failure."
A battle-tested, three-layer defense system that prevents AI agents from repeating mistakes. Built from 14+ real production failures over 30 days of continuous agent operation.
AI agents make the same mistakes repeatedly because:
This system solves all three.
Layer 1: External Skill Guards (prevention)
├── cron-guard — Validates cron job configuration before saving
├── pre-delivery-guard — 5-step checkpoint before any delivery
└── hz-error-guard — Pattern matching for known error signatures
Layer 2: Delivery Checkpoints (verification)
├── Timestamp check — Is this today's work?
├── File integrity — Does the file exist and is complete?
├── Content check — Are all modules present?
├── Delivery method — Using the correct channel?
└── Self-audit — Would I accept this quality?
Layer 3: Self-Evolving Memory (learning)
├── Error notebook — Every failure documented with 5-Why analysis
├──固化规范 (Hardened Rules) — Each fix becomes a permanent rule
└── Pattern library — Error patterns for automatic recognition
Run pre-delivery check on the daily report before sending
Validate this cron job configuration for errors
Add this failure to the error notebook and create a prevention rule
Symptoms: Cron shows "ok" but no output generated
Root Cause: payload.kind = "systemEvent" only inserts text, doesn't trigger execution
Fix: Always use payload.kind = "agentTurn" + deliver: true
Prevention: cron-guard skill validates configuration
Symptoms: Recipient can't open sent files/images
Root Cause: Direct message attachments fail on certain platforms
Fix: Upload to document platform, send link instead
Prevention: pre-delivery-guard blocks direct image sends
Symptoms: Yesterday's content sent as today's work Root Cause: No timestamp verification before sending Fix: Always check task creation timestamp matches today Prevention: Delivery checkpoint verifies timestamps
Symptoms: Infographic appears blurry
Root Cause: Default 1x rendering instead of 3x
Fix: Always use device_scale_factor=3 in Playwright
Prevention: Template enforces 3x, guard verifies
Symptoms: Report has only 3 of 5 required sections
Root Cause: Task pressure causes skipping
Fix: Mandatory checklist before any delivery
Prevention: pre-delivery-guard counts modules
Symptoms: Cron job skipped silently
Root Cause: main session doesn't support agentTurn
Fix: Content generation must use isolated sessions
Prevention: cron-guard rejects main+agentTurn combo
When a new error occurs:
### Problem XXX: [Title]
**Date**: YYYY-MM-DD
**Severity**: 🔴 High / 🟡 Medium / 🟢 Low
**Symptoms**:
- What happened
**Root Cause**:
- Why it happened (5-Why analysis)
**Fix**:
- What was done to resolve
**Prevention**:
- What guard/rule prevents recurrence
**Status**: ✅ Fixed / ⚠️ Pending / ❌ Not fixed
Before ANY delivery, verify:
def pre_delivery_check(content):
checks = {
"timestamp": content.created_today, # Is it today's work?
"file_exists": content.file_size > 0, # File actually exists?
"complete": content.modules >= 5, # All parts present?
"resolution": content.width >= 3600, # High enough quality?
"method": content.delivery != "direct_img", # Not sending raw image?
}
if not all(checks.values()):
abort_delivery(checks)
notify_user(f"Delivery blocked: {failed_checks}")
return True
def validate_cron(config):
rules = [
("payload.kind == 'agentTurn'", "systemEvent won't trigger execution"),
("sessionTarget == 'isolated'", "main can't handle agentTurn"),
("deliver == True", "Without this, output stays in session"),
("wakeMode == 'now'", "next-heartbeat may delay execution"),
]
violations = [msg for rule, msg in rules if not eval(rule)]
if violations:
raise ConfigError(violations)
This system works as a meta-skill installed in your OpenClaw workspace:
workspace/
├── MEMORY.md # Long-term hardened rules
├── memory/
│ └── error-eradication-protocol.md
└── skills/
├── cron-guard/SKILL.md
├── pre-delivery-guard/SKILL.md
└── hz-error-guard/SKILL.md
Most AI agent failures aren't novel — they're the same patterns repeating. This system:
MIT