ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

Xiaobai Error Recovery

Skill by aptratcn

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/aptratcn/xiaobai-error-recovery
Or

name: error-recovery version: 2.0.0 description: 4R error recovery framework. Recognize, Rescue, Report, Remember. Never lose work silently. Trigger on: 'error', 'failed', 'crash', 'something went wrong', 'retry'. emoji: 🚨

Error Recovery 🚨

4R framework. Never lose work silently.

The 4 Rs

R1: RECOGNIZE  → Did something go wrong?
R2: RESCUE     → Can I recover automatically?
R3: REPORT     → Does the human need to know?
R4: REMEMBER   → What should I learn from this?

R1: RECOGNIZE (Don't Ignore Errors)

Error signals I must not ignore:

ā–” Command exit code ≠ 0
ā–” Exception thrown
ā–” Timeout exceeded
ā–” Empty/unexpected output
ā–” "error", "failed", "exception" in logs
ā–” Behavior different from expected

Anti-patterns:

  • āŒ Command failed, but I continue anyway
  • āŒ Error logged, but not mentioned in my response
  • āŒ "Probably fine" without verification

What to do:

  1. Stop and acknowledge the error
  2. Read the full error message
  3. Check if it's recoverable or needs human input

R2: RESCUE (Can I Fix It?)

Automatic recovery strategies:

Error TypeRecovery Strategy
Network timeoutRetry with exponential backoff (max 3)
Rate limitWait and retry
Missing dependencyInstall/suggest installation
Permission deniedSuggest elevated permissions or fix
File not foundCreate or point to correct path
Invalid inputSanitize or request correct input
API errorCheck status, retry if transient

Retry protocol:

Attempt 1: Immediate
Attempt 2: Wait 5 seconds
Attempt 3: Wait 15 seconds
If all fail → Report to human

When NOT to auto-retry:

  • Authentication errors (wrong credentials)
  • Permission errors (needs human action)
  • Data validation errors (needs correct input)
  • Destructive operation failures (don't risk double-execution)

R3: REPORT (Does Human Need to Know?)

Always report when:

  • Auto-recovery failed after 3 attempts
  • Error affects the final outcome
  • Human action is required
  • Something unexpected happened

Report format:

āš ļø Error encountered: [brief description]

What happened:
[What I was doing]

Error details:
[Full error message]

What I tried:
[Recovery attempts made]

Current state:
[What's broken / what's still working]

What I need:
[What human action is needed, if any]

Example:

āš ļø Error encountered: GitHub push failed

What happened:
Pushing to aptratcn/cognitive-debt-guard

Error details:
fatal: could not read Username for 'https://github.com'

What I tried:
1. Retried push (failed)
2. Checked git remote config

Current state:
- Commit is saved locally
- Not pushed to remote

What I need:
Git credentials not configured. Will try using token auth.

R4: REMEMBER (Learn From Errors)

After error recovery:

ā–” Did this error happen before?
  → If yes, what's the pattern?
  → Document the fix

Metadata

Author@aptratcn
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-aptratcn-xiaobai-error-recovery": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.