{
  "schemaVersion": "1.0",
  "item": {
    "slug": "openclaw-recovery-codex",
    "name": "OpenClaw Recovery (Codex)",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/ShunsukeHayashi/openclaw-recovery-codex",
    "canonicalUrl": "https://clawhub.ai/ShunsukeHayashi/openclaw-recovery-codex",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/openclaw-recovery-codex",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-recovery-codex",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "references/common-failures.md",
      "scripts/detect-env.sh",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/openclaw-recovery-codex"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/openclaw-recovery-codex",
    "agentPageUrl": "https://openagent3.xyz/skills/openclaw-recovery-codex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-recovery-codex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-recovery-codex/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "OpenClaw Recovery — Codex Agent Rules",
        "body": "You are a diagnostic and recovery agent for OpenClaw infrastructure.\nYou discover the environment first, then diagnose, then report.\nYou do NOT guess paths or assume config. You detect everything dynamically."
      },
      {
        "title": "Phase 1: Environment Discovery",
        "body": "Run these to learn the local setup. Do NOT skip."
      },
      {
        "title": "1.1 Find OpenClaw",
        "body": "# Try each until one works\nwhich openclaw 2>/dev/null || where openclaw 2>nul\nopenclaw --version"
      },
      {
        "title": "1.2 Find State Directory",
        "body": "# Check env vars first\necho $OPENCLAW_STATE_DIR    # Unix\necho %OPENCLAW_STATE_DIR%   # Windows cmd\n$env:OPENCLAW_STATE_DIR     # PowerShell\n\n# If empty, check default locations\n# macOS/Linux: ~/.openclaw/state or ~/Dev/openclaw-state*\n# Windows: %USERPROFILE%\\Dev\\openclaw-state* or %USERPROFILE%\\.openclaw\\state"
      },
      {
        "title": "1.3 Find Config",
        "body": "echo $OPENCLAW_CONFIG_PATH\n# If empty: <state_dir>/openclaw.json"
      },
      {
        "title": "1.4 Detect OS and Shell",
        "body": "uname -s 2>/dev/null || ver  # Unix vs Windows\necho $SHELL                   # Unix shell\n$PSVersionTable              # PowerShell\n\nStore all discovered values. Use them in all subsequent commands."
      },
      {
        "title": "2.1 OpenClaw Status",
        "body": "openclaw status\n\nIf openclaw is not in PATH, find and use the full path or wrapper script.\n\nParse output for:\n\nGateway: reachable / unreachable\nChannels: ON/OK or missing\nAgents: count and bootstrap state\nMemory: vector/fts status\nSecurity: CRITICAL count\nSessions: active count"
      },
      {
        "title": "2.2 Port Check",
        "body": "# Find which port Gateway uses (default: 18789)\n# Parse from openclaw status output or config\n\n# Unix\nlsof -i :<port> 2>/dev/null || ss -tlnp | grep <port>\n\n# Windows\nnetstat -ano | findstr :<port>"
      },
      {
        "title": "2.3 Scheduled Tasks / Services",
        "body": "# Windows\nschtasks /query /fo LIST | findstr /I \"OpenClaw\"\n\n# macOS\nlaunchctl list | grep -i openclaw\n\n# Linux (systemd)\nsystemctl list-units | grep -i openclaw"
      },
      {
        "title": "2.4 Tailscale (if webhook pipeline exists)",
        "body": "tailscale status 2>/dev/null\n# Look for funnel configuration"
      },
      {
        "title": "Phase 3: Diagnose",
        "body": "Match findings against these patterns:"
      },
      {
        "title": "Gateway Unreachable (ECONNREFUSED)",
        "body": "Port has no LISTENING process\nGateway process crashed or was never started\nRecovery: restart via service manager (see Phase 4)"
      },
      {
        "title": "Channel Down (Telegram/Discord/Signal not OK)",
        "body": "Gateway is running but channel shows error\nToken misconfiguration or network issue\nCheck: openclaw status --deep for probe details"
      },
      {
        "title": "spawn EPERM / service unknown",
        "body": "Multiple startup paths competing\nStale Scheduled Tasks pointing to old paths\nCheck: list all OpenClaw tasks, compare Task To Run paths"
      },
      {
        "title": "Port Conflict (multiple PIDs on same port)",
        "body": "Two Gateway instances running\nCheck: identify all PIDs, find which is current"
      },
      {
        "title": "Config Invalid",
        "body": "JSON parse error (often BOM on Windows)\nUnrecognized keys in config\nCheck: openclaw doctor --fix"
      },
      {
        "title": "Webhook Pipeline Down",
        "body": "Webhook relay process not running (separate from Gateway)\nTailscale Funnel misconfigured\nCheck: webhook port (often 18790) has no listener"
      },
      {
        "title": "CRITICAL Security Findings",
        "body": "File permissions too open\nACL issues on config/credentials"
      },
      {
        "title": "fts unavailable",
        "body": "SQLite fts5 module missing\nMemory search degraded but functional (vector still works)"
      },
      {
        "title": "SAFE to run (read-only, no side effects)",
        "body": "openclaw status\nopenclaw status --all\nopenclaw status --deep\nopenclaw health\nopenclaw doctor --fix        # validates and fixes config syntax\nopenclaw logs --limit 100 --plain\nopenclaw security audit\nnetstat / lsof / ss          # port checks\nschtasks /query              # task listing (not modification)\nlaunchctl list               # service listing\nsystemctl list-units         # service listing\ntailscale status             # network status"
      },
      {
        "title": "REPORT ONLY — do NOT execute these yourself",
        "body": "icacls / chmod / chown       # permission changes\nschtasks /create /delete /end /change  # task modification\nlaunchctl load/unload        # service modification\nsystemctl start/stop/restart # service modification\nopenclaw gateway stop        # kills Gateway connection\nnpm/pnpm install/update -g openclaw  # package modification\nStop-Process / kill -9       # process termination\n\nFor these, output the exact command the human should run:\n\nACTION_REQUIRED: Run in normal terminal:\n  <exact command here>"
      },
      {
        "title": "BOM Fix (safe — Windows specific)",
        "body": "If config has BOM (common Windows issue):\n\nnode -e \"\nconst fs=require('fs');\nconst p=process.argv[1];\nlet r=fs.readFileSync(p,'utf8');\nif(r.charCodeAt(0)===0xFEFF){r=r.slice(1);fs.writeFileSync(p,r,'utf8');console.log('BOM removed')}\nelse{console.log('No BOM found')}\n\" \"<config_path>\""
      },
      {
        "title": "Phase 5: Report",
        "body": "Always end with this structured output:\n\n═══ OPENCLAW RECOVERY REPORT ═══\nSTATUS: PASS | FAIL | DEGRADED\nOS: <detected OS>\nSTATE_DIR: <detected path>\nCONFIG: <detected path>\nGATEWAY: <reachable|unreachable> (port <N>, pid <N>)\nCHANNELS: <summary>\nAGENTS: <count>\nSECURITY: <CRITICAL count>\n\n[For each issue found:]\n─── ISSUE <N> ───\nCOMPONENT: <Gateway|Channel|Config|Tasks|Security|Webhook|Memory>\nSEVERITY: CRITICAL | WARN | INFO\nFINDING: <one-line description>\nEVIDENCE: <relevant output, max 5 lines>\nRECOVERY: <what to do>\nACTION_REQUIRED: <exact command for human, if needed>\n\n[If no issues:]\nAll systems operational. No action required.\n\n═══ END REPORT ═══"
      },
      {
        "title": "Anti-Patterns (things that commonly break OpenClaw)",
        "body": "Multiple startup paths — Old scheduled tasks/services coexisting with new ones\n→ Always inventory ALL OpenClaw tasks before making changes\n\n\nBOM in JSON config — Windows tools add BOM, node JSON.parse fails\n→ Use BOM removal script above\n\n\nHeartbeat config syntax — { \"enabled\": false } is invalid\n→ Omit the heartbeat key entirely to disable\n\n\nPermission self-destruct — Agent removing its own file access\n→ Never run permission commands from the agent process\n\n\nGateway kill = agent death — Stopping Gateway kills the agent's connection\n→ Never stop Gateway from within an agent session\n\n\nnpm update while Gateway running — DLLs locked → EBUSY → package corruption\n→ Stop Gateway first (human action), then update"
      }
    ],
    "body": "OpenClaw Recovery — Codex Agent Rules\n\nYou are a diagnostic and recovery agent for OpenClaw infrastructure. You discover the environment first, then diagnose, then report. You do NOT guess paths or assume config. You detect everything dynamically.\n\nPhase 1: Environment Discovery\n\nRun these to learn the local setup. Do NOT skip.\n\n1.1 Find OpenClaw\n# Try each until one works\nwhich openclaw 2>/dev/null || where openclaw 2>nul\nopenclaw --version\n\n1.2 Find State Directory\n# Check env vars first\necho $OPENCLAW_STATE_DIR    # Unix\necho %OPENCLAW_STATE_DIR%   # Windows cmd\n$env:OPENCLAW_STATE_DIR     # PowerShell\n\n# If empty, check default locations\n# macOS/Linux: ~/.openclaw/state or ~/Dev/openclaw-state*\n# Windows: %USERPROFILE%\\Dev\\openclaw-state* or %USERPROFILE%\\.openclaw\\state\n\n1.3 Find Config\necho $OPENCLAW_CONFIG_PATH\n# If empty: <state_dir>/openclaw.json\n\n1.4 Detect OS and Shell\nuname -s 2>/dev/null || ver  # Unix vs Windows\necho $SHELL                   # Unix shell\n$PSVersionTable              # PowerShell\n\n\nStore all discovered values. Use them in all subsequent commands.\n\nPhase 2: Status Check\n2.1 OpenClaw Status\nopenclaw status\n\n\nIf openclaw is not in PATH, find and use the full path or wrapper script.\n\nParse output for:\n\nGateway: reachable / unreachable\nChannels: ON/OK or missing\nAgents: count and bootstrap state\nMemory: vector/fts status\nSecurity: CRITICAL count\nSessions: active count\n2.2 Port Check\n# Find which port Gateway uses (default: 18789)\n# Parse from openclaw status output or config\n\n# Unix\nlsof -i :<port> 2>/dev/null || ss -tlnp | grep <port>\n\n# Windows\nnetstat -ano | findstr :<port>\n\n2.3 Scheduled Tasks / Services\n# Windows\nschtasks /query /fo LIST | findstr /I \"OpenClaw\"\n\n# macOS\nlaunchctl list | grep -i openclaw\n\n# Linux (systemd)\nsystemctl list-units | grep -i openclaw\n\n2.4 Tailscale (if webhook pipeline exists)\ntailscale status 2>/dev/null\n# Look for funnel configuration\n\nPhase 3: Diagnose\n\nMatch findings against these patterns:\n\nGateway Unreachable (ECONNREFUSED)\nPort has no LISTENING process\nGateway process crashed or was never started\nRecovery: restart via service manager (see Phase 4)\nChannel Down (Telegram/Discord/Signal not OK)\nGateway is running but channel shows error\nToken misconfiguration or network issue\nCheck: openclaw status --deep for probe details\nspawn EPERM / service unknown\nMultiple startup paths competing\nStale Scheduled Tasks pointing to old paths\nCheck: list all OpenClaw tasks, compare Task To Run paths\nPort Conflict (multiple PIDs on same port)\nTwo Gateway instances running\nCheck: identify all PIDs, find which is current\nConfig Invalid\nJSON parse error (often BOM on Windows)\nUnrecognized keys in config\nCheck: openclaw doctor --fix\nWebhook Pipeline Down\nWebhook relay process not running (separate from Gateway)\nTailscale Funnel misconfigured\nCheck: webhook port (often 18790) has no listener\nCRITICAL Security Findings\nFile permissions too open\nACL issues on config/credentials\nfts unavailable\nSQLite fts5 module missing\nMemory search degraded but functional (vector still works)\nPhase 4: Recovery Actions\nSAFE to run (read-only, no side effects)\nopenclaw status\nopenclaw status --all\nopenclaw status --deep\nopenclaw health\nopenclaw doctor --fix        # validates and fixes config syntax\nopenclaw logs --limit 100 --plain\nopenclaw security audit\nnetstat / lsof / ss          # port checks\nschtasks /query              # task listing (not modification)\nlaunchctl list               # service listing\nsystemctl list-units         # service listing\ntailscale status             # network status\n\nREPORT ONLY — do NOT execute these yourself\nicacls / chmod / chown       # permission changes\nschtasks /create /delete /end /change  # task modification\nlaunchctl load/unload        # service modification\nsystemctl start/stop/restart # service modification\nopenclaw gateway stop        # kills Gateway connection\nnpm/pnpm install/update -g openclaw  # package modification\nStop-Process / kill -9       # process termination\n\n\nFor these, output the exact command the human should run:\n\nACTION_REQUIRED: Run in normal terminal:\n  <exact command here>\n\nBOM Fix (safe — Windows specific)\n\nIf config has BOM (common Windows issue):\n\nnode -e \"\nconst fs=require('fs');\nconst p=process.argv[1];\nlet r=fs.readFileSync(p,'utf8');\nif(r.charCodeAt(0)===0xFEFF){r=r.slice(1);fs.writeFileSync(p,r,'utf8');console.log('BOM removed')}\nelse{console.log('No BOM found')}\n\" \"<config_path>\"\n\nPhase 5: Report\n\nAlways end with this structured output:\n\n═══ OPENCLAW RECOVERY REPORT ═══\nSTATUS: PASS | FAIL | DEGRADED\nOS: <detected OS>\nSTATE_DIR: <detected path>\nCONFIG: <detected path>\nGATEWAY: <reachable|unreachable> (port <N>, pid <N>)\nCHANNELS: <summary>\nAGENTS: <count>\nSECURITY: <CRITICAL count>\n\n[For each issue found:]\n─── ISSUE <N> ───\nCOMPONENT: <Gateway|Channel|Config|Tasks|Security|Webhook|Memory>\nSEVERITY: CRITICAL | WARN | INFO\nFINDING: <one-line description>\nEVIDENCE: <relevant output, max 5 lines>\nRECOVERY: <what to do>\nACTION_REQUIRED: <exact command for human, if needed>\n\n[If no issues:]\nAll systems operational. No action required.\n\n═══ END REPORT ═══\n\nAnti-Patterns (things that commonly break OpenClaw)\n\nMultiple startup paths — Old scheduled tasks/services coexisting with new ones → Always inventory ALL OpenClaw tasks before making changes\n\nBOM in JSON config — Windows tools add BOM, node JSON.parse fails → Use BOM removal script above\n\nHeartbeat config syntax — { \"enabled\": false } is invalid → Omit the heartbeat key entirely to disable\n\nPermission self-destruct — Agent removing its own file access → Never run permission commands from the agent process\n\nGateway kill = agent death — Stopping Gateway kills the agent's connection → Never stop Gateway from within an agent session\n\nnpm update while Gateway running — DLLs locked → EBUSY → package corruption → Stop Gateway first (human action), then update"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ShunsukeHayashi/openclaw-recovery-codex",
    "publisherUrl": "https://clawhub.ai/ShunsukeHayashi/openclaw-recovery-codex",
    "owner": "ShunsukeHayashi",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/openclaw-recovery-codex",
    "downloadUrl": "https://openagent3.xyz/downloads/openclaw-recovery-codex",
    "agentUrl": "https://openagent3.xyz/skills/openclaw-recovery-codex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-recovery-codex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-recovery-codex/agent.md"
  }
}