Skill Error Recovery

v1.0.0

Detect, attempt recovery from, report, and log errors to prevent silent data loss and ensure proper human intervention when needed.

0· 67·0 current·0 all-time
byErwin@aptratcn

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for aptratcn/skill-error-recovery.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Skill Error Recovery" (aptratcn/skill-error-recovery) from ClawHub.
Skill page: https://clawhub.ai/aptratcn/skill-error-recovery
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install skill-error-recovery

ClawHub CLI

Package manager switcher

npx clawhub@latest install skill-error-recovery
Security Scan
Capability signals
Requires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (error recovery) match the SKILL.md and the included error-diagnose.mjs script. No unrelated environment variables, binaries, or network endpoints are requested. The script and docs are consistent with an error-recovery helper.
Instruction Scope
Instructions focus on recognizing errors, trying bounded recovery (max 3 retries, and explicit 'do not auto-retry' rules for auth/permission/destructive cases), producing structured reports, and saving a local error journal (memory/errors/YYYY-MM-DD.md). This is within the stated purpose but does grant the agent permission to read error messages, create local logs, and suggest installs or elevated permissions when needed — which are reasonable for error recovery but worth noting.
Install Mechanism
No install spec; the skill is instruction-only with an included Node.js diagnostic script. No downloads or third-party install steps are embedded. README suggests copying SKILL.md into agent directories and optionally running the local node script.
Credentials
The skill declares no required env vars or credentials. The recovery guidance may cause an agent to inspect local files, suggest elevated permissions, or prompt for re-authentication, and the skill logs full error details to a local memory path — which could include sensitive information. These actions are coherent with error handling but you should be aware logs may contain secrets if errors expose them.
Persistence & Privilege
always is false and there are no instructions to modify other skills or global agent configuration. The skill writes to its own error journal (memory/errors/) and suggests updating agent docs (e.g., AGENTS.md), which is reasonable for learning from failures. Autonomous invocation is allowed (platform default) but is not combined with elevated privileges.
Assessment
This skill appears to do what it says: detect errors, attempt limited automatic recovery, generate structured reports, and save local error logs. Before installing, consider: 1) Logs: the error journal (memory/errors/) may include full error messages that reveal sensitive data (tokens, paths, stack traces) — ensure this folder is acceptable to store such data. 2) Elevated actions: the skill may suggest installing dependencies or using elevated permissions; configure policy or require human confirmation for such actions. 3) Autonomy: although the skill respects 'do not auto-retry' for auth/permission errors, it can be invoked autonomously by the agent by default — if you prefer manual control, only enable user invocation in your agent policy. 4) Testing: try it in a safe environment first to confirm the logging behavior and ensure it doesn't capture secrets you don't want preserved.

Like a lobster shell, security has layers — review code before you run it.

debuggingvk978a12d9pngxny9tdhyvkpbrh85f2rjerror-handlingvk978a12d9pngxny9tdhyvkpbrh85f2rjlatestvk978a12d9pngxny9tdhyvkpbrh85f2rjreliabilityvk978a12d9pngxny9tdhyvkpbrh85f2rj
67downloads
0stars
1versions
Updated 4d ago
v1.0.0
MIT-0

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

□ Could this happen again?
  → Add guard for this case
  → Update skill/workflow

□ Is there a systemic issue?
  → Suggest process improvement
  → Update AGENTS.md if needed

Error log:

memory/errors/YYYY-MM-DD.md

## [Error Type] - [Timestamp]

**Context:** What I was doing
**Error:** Full error message
**Cause:** Root cause (if known)
**Fix:** How I resolved it
**Prevention:** How to avoid in future

Quick Reference

ERROR → STOP → READ ERROR → CAN I FIX?
                                 ↓
        NO → REPORT to human → WAIT for action
        YES → FIX → VERIFY → CONTINUE
                      ↓
                   Still broken? → REPORT

Trigger Phrases

  • "error", "failed", "crash"
  • "something went wrong", "exception"
  • "retry", "try again"
  • "报错", "失败", "错误"

Integration

  • EVR Framework — Verify after recovery
  • Systematic Debugging — When root cause is unknown
  • Workflow Checkpoint — Save state before risky operations

License

MIT

Comments

Loading comments...