{
  "schemaVersion": "1.0",
  "item": {
    "slug": "openclaw-ops",
    "name": "OpenClaw Ops",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/dinstein/openclaw-ops",
    "canonicalUrl": "https://clawhub.ai/dinstein/openclaw-ops",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/openclaw-ops",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-ops",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "README_CN.md",
      "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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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-ops"
    },
    "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-ops",
    "agentPageUrl": "https://openagent3.xyz/skills/openclaw-ops/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-ops/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-ops/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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Design Philosophy",
        "body": "This skill serves two core scenarios and nothing else:\n\nRescue — The main OpenClaw Gateway is down or broken. You (the rescue agent) need to diagnose the root cause, fix it, and bring the gateway back online.\nHealth Check — The main OpenClaw Gateway is running. You need to verify its operational health, clean up resources, or perform maintenance tasks like upgrades.\n\nWhat this skill is NOT for:\n\nDay-to-day business configuration (adding channels, configuring agents, setting up integrations)\nApplication-level issues (agent behavior, prompt tuning, skill management)\nInitial deployment or first-time setup (use openclaw daemon install and openclaw configure)\n\nPrinciple: Diagnose → Judge → Act → Verify. Never skip steps."
      },
      {
        "title": "Platform Detection",
        "body": "Detect the platform first — commands differ between Linux (systemd) and macOS (launchd):\n\nOS=$(uname -s)  # \"Linux\" or \"Darwin\"\necho \"Platform: $OS\""
      },
      {
        "title": "Port Detection",
        "body": "Do NOT assume port 18789. Detect the actual configured port first:\n\nPORT=$(openclaw config get gateway.port 2>/dev/null | grep -oE '[0-9]+')\nPORT=${PORT:-18789}  # fallback to default only if config unavailable\necho \"Gateway port: $PORT\"\n\nUse $PORT in all port-related commands throughout this guide."
      },
      {
        "title": "Scenario A: Rescue (Gateway Down)",
        "body": "Follow these sections in order when the main gateway is not running."
      },
      {
        "title": "A1. Assess the Situation",
        "body": "# Is the service running at all?\n# Linux:\nsystemctl --user status openclaw-gateway\n# macOS:\nlaunchctl list | grep openclaw\n\n# Is the process alive?\npgrep -af openclaw\n\n# Is the port listening?\n# Linux:\nss -tlnp | grep $PORT\n# macOS:\nlsof -iTCP:$PORT -sTCP:LISTEN"
      },
      {
        "title": "A2. Check Logs for Root Cause",
        "body": "Linux:\n\njournalctl --user -u openclaw-gateway --since \"1 hour ago\" --no-pager | grep -iE \"error|crash|fatal|SIGTERM|OOM\"\n\n# Last 50 lines for context\njournalctl --user -u openclaw-gateway -n 50 --no-pager\n\nmacOS:\n\nLOG_DIR=\"$HOME/.openclaw/logs\"\ngrep -iE \"error|crash|fatal\" \"$LOG_DIR/gateway.log\" | tail -20\ntail -50 \"$LOG_DIR/gateway.log\"\n\n# Also check unified log\nlog show --predicate 'process == \"node\"' --last 1h | grep -iE \"error|crash|fatal\""
      },
      {
        "title": "Common crash patterns",
        "body": "Log patternMeaningFixEADDRINUSEPort already in useFind conflicting process: ss -tlnp | grep $PORT (Linux) or lsof -iTCP:$PORT (macOS), kill it or change portENOMEM / JavaScript heapOut of memoryCheck free -h (Linux) / vm_stat (macOS), kill memory hogs or increase Node heapSyntaxError in configBad JSON in openclaw.jsonSee A3 Config RepairMODULE_NOT_FOUNDMissing dependencycd $(npm root -g)/openclaw && npm install --productionInvalid token / 401 / 403Auth failureCheck tokens in env file or systemd drop-inECONNREFUSEDUpstream unreachableCheck network, Tailscale, API endpoints"
      },
      {
        "title": "A3. Config Repair",
        "body": "Always backup first:\n\ncp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak.$(date +%s)\n\nJSON syntax validation:\n\npython3 -c \"import json; json.load(open('$HOME/.openclaw/openclaw.json'))\"\n\nCommon JSON issues: trailing comma, missing quotes, unescaped characters. The error message shows line/position.\n\nConfig schema validation:\n\nopenclaw config get gateway  # check gateway config section\nopenclaw config get channels  # check channels config section\n\nCommon config errors:\n\nSymptomLikely causeFix\"device identity mismatch\"Service env token ≠ config tokenSync tokens between env file and openclaw.jsonAgent not routingbindings misconfiguredBindings go at top-level, not inside agents.list[].routing\n\nAfter fixing, validate:\n\npython3 -c \"import json; json.load(open('$HOME/.openclaw/openclaw.json')); print('JSON OK')\"\nopenclaw status"
      },
      {
        "title": "A4. Check Resources",
        "body": "# Disk space\ndf -h ~\n\n# Memory (Linux)\nfree -h\n# Memory (macOS)\nvm_stat | head -5\n\n# Node.js available?\nnode -v\nwhich openclaw\nopenclaw --version"
      },
      {
        "title": "A5. Restart and Verify",
        "body": "Only restart after identifying and fixing the root cause.\n\nLinux:\n\nsystemctl --user restart openclaw-gateway\nsleep 3\nsystemctl --user status openclaw-gateway\njournalctl --user -u openclaw-gateway -n 20 --no-pager\n\nmacOS:\n\nlaunchctl kickstart -k \"gui/$(id -u)/com.openclaw.gateway\"\nsleep 3\nlaunchctl list | grep openclaw\ntail -20 ~/.openclaw/logs/gateway.log\n\nIf service won't start at all:\n\n# Manual foreground start for better error output\nopenclaw gateway start\n\nFinal verification:\n\nopenclaw status\nopenclaw doctor --non-interactive"
      },
      {
        "title": "Scenario B: Health Check (Gateway Running)",
        "body": "Follow these sections for routine operational checks on a running gateway."
      },
      {
        "title": "B1. Quick Health Check",
        "body": "# Comprehensive check — start here\nopenclaw doctor\n\n# If issues found, auto-fix safe ones\nopenclaw doctor --fix"
      },
      {
        "title": "B2. Update & Upgrade",
        "body": "# Check versions\nCURRENT=$(openclaw --version)\nLATEST=$(npm view openclaw version)\necho \"Current: $CURRENT  Latest: $LATEST\"\n\nPerform update:\n\n# 1. Save doctor baseline\nopenclaw doctor --non-interactive 2>&1 | tee /tmp/doctor-before.txt\n\n# 2. Backup config\ncp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.pre-upgrade.$(date +%s)\n\n# 3. Update\nnpm update -g openclaw\nopenclaw --version\n\n# 4. Restart\n# Linux:\nsystemctl --user restart openclaw-gateway\n# macOS:\nlaunchctl kickstart -k \"gui/$(id -u)/com.openclaw.gateway\"\n\n# 5. Compare doctor output\nsleep 5\nopenclaw doctor --non-interactive 2>&1 | tee /tmp/doctor-after.txt\ndiff /tmp/doctor-before.txt /tmp/doctor-after.txt\n\nRollback:\n\nnpm install -g openclaw@<previous_version>\ncp ~/.openclaw/openclaw.json.pre-upgrade.<timestamp> ~/.openclaw/openclaw.json\n# Restart (platform-appropriate command above)"
      },
      {
        "title": "B3. Session & Disk Cleanup",
        "body": "# Check disk usage per agent\nfor agent_dir in ~/.openclaw/agents/*/; do\n    agent=$(basename \"$agent_dir\")\n    size=$(du -sh \"$agent_dir/sessions/\" 2>/dev/null | cut -f1)\n    count=$(find \"$agent_dir/sessions/\" -name \"*.jsonl\" 2>/dev/null | wc -l)\n    echo \"$agent: $size ($count transcripts)\"\ndone\n\n# Auto-fix orphans\nopenclaw doctor --fix\n\n# Manual cleanup: old transcripts (>30 days)\nfind ~/.openclaw/agents/*/sessions/ -name \"*.jsonl\" -mtime +30 -exec ls -lh {} \\;\n# Review, then delete if safe:\nfind ~/.openclaw/agents/*/sessions/ -name \"*.jsonl\" -mtime +30 -delete"
      },
      {
        "title": "B4. Backup",
        "body": "BACKUP_DIR=~/openclaw-backup-$(date +%Y%m%d-%H%M%S)\nmkdir -p \"$BACKUP_DIR\"\n\n# Core files\ncp ~/.openclaw/openclaw.json \"$BACKUP_DIR/\"\n[ -f ~/.openclaw/env ] && cp ~/.openclaw/env \"$BACKUP_DIR/\" || echo \"No env file (tokens may be in systemd drop-in or plist)\"\ncp -r ~/.openclaw/agents \"$BACKUP_DIR/\"\ncp -r ~/.openclaw/devices \"$BACKUP_DIR/\"\ncp -r ~/.openclaw/workspace \"$BACKUP_DIR/\"\n\n# Service config\nif [ \"$(uname -s)\" = \"Linux\" ]; then\n    cp ~/.config/systemd/user/openclaw-gateway.service \"$BACKUP_DIR/\" 2>/dev/null\n    cp -r ~/.config/systemd/user/openclaw-gateway.service.d \"$BACKUP_DIR/\" 2>/dev/null\nelif [ \"$(uname -s)\" = \"Darwin\" ]; then\n    cp ~/Library/LaunchAgents/com.openclaw.gateway.plist \"$BACKUP_DIR/\" 2>/dev/null\nfi\n\necho \"Backup saved to $BACKUP_DIR\""
      },
      {
        "title": "B5. Tailscale Serve Check",
        "body": "If OpenClaw uses Tailscale Serve as reverse proxy:\n\ntailscale status\ntailscale serve status\ncurl -s -o /dev/null -w \"%{http_code}\" http://localhost:$PORT/healthz || echo \"Gateway not reachable on localhost\"\n\nReconfigure if broken:\n\ntailscale serve reset\ntailscale serve https / http://localhost:$PORT\ntailscale serve status"
      },
      {
        "title": "Troubleshooting Quick Index",
        "body": "SymptomPathGateway won't startA1 → A2 → A3 → A5Gateway crashedA2 (logs) → A4 (resources) → A3 (config) → A5 (restart)Config broken after editA3 → A5Disk filling upB3After upgrade something brokeB2 (rollback)Tailscale not proxyingB5"
      },
      {
        "title": "openclaw doctor Reference",
        "body": "FlagEffect(none)Interactive health check--fixApply safe repairs (orphan cleanup, stale locks)--forceAggressive repairs (may overwrite custom service config)--deepScan system for extra gateway installs--non-interactiveNo prompts, safe migrations only\n\n--fix repairs: orphan transcripts, stale session locks, legacy key migration.\n--fix does NOT: modify openclaw.json, change service files (unless --force), delete workspace files."
      },
      {
        "title": "Key Commands",
        "body": "CommandPurposeopenclaw statusQuick status: running, version, basic infoopenclaw doctorDeep health check: state, channels, plugins, skillsopenclaw doctor --fixHealth check + auto-repair safe issuesopenclaw gateway startStart gateway in foreground (for debugging)openclaw daemon installInstall as persistent service (systemd/launchd)openclaw daemon restartRestart the serviceopenclaw config get <path>Read config valueopenclaw config set <path> <value>Write config value"
      },
      {
        "title": "Safety Rules",
        "body": "Always check logs before changing anything — understand the problem first\nAlways backup before editing config — cp with timestamp suffix\nAlways validate JSON after editing — one bad comma kills the service\nNever print secrets — check env file exists, don't cat it\nNever delete workspace files — use trash if you must remove something\nAlways verify after restart — status + logs, don't assume it worked\nDestructive operations require confirmation — ask the user before wiping data"
      },
      {
        "title": "File Layout",
        "body": "~/.openclaw/\n├── openclaw.json              # Main config\n├── openclaw.json.bak          # Auto-backup\n├── env                        # Environment variables (secrets)\n├── logs/                      # macOS: launchd log output\n├── agents/                    # Per-agent configs\n│   └── <agent>/agent/\n│       ├── auth-profiles.json\n│       └── models.json\n├── devices/\n│   └── paired.json\n├── workspace/                 # Agent workspace\n└── sessions/                  # Session logs\n\n# Linux:\n~/.config/systemd/user/\n├── openclaw-gateway.service\n└── openclaw-gateway.service.d/\n    └── env.conf\n\n# macOS:\n~/Library/LaunchAgents/\n└── com.openclaw.gateway.plist"
      }
    ],
    "body": "OpenClaw Operations\nDesign Philosophy\n\nThis skill serves two core scenarios and nothing else:\n\nRescue — The main OpenClaw Gateway is down or broken. You (the rescue agent) need to diagnose the root cause, fix it, and bring the gateway back online.\nHealth Check — The main OpenClaw Gateway is running. You need to verify its operational health, clean up resources, or perform maintenance tasks like upgrades.\n\nWhat this skill is NOT for:\n\nDay-to-day business configuration (adding channels, configuring agents, setting up integrations)\nApplication-level issues (agent behavior, prompt tuning, skill management)\nInitial deployment or first-time setup (use openclaw daemon install and openclaw configure)\n\nPrinciple: Diagnose → Judge → Act → Verify. Never skip steps.\n\nPlatform Detection\n\nDetect the platform first — commands differ between Linux (systemd) and macOS (launchd):\n\nOS=$(uname -s)  # \"Linux\" or \"Darwin\"\necho \"Platform: $OS\"\n\nPort Detection\n\nDo NOT assume port 18789. Detect the actual configured port first:\n\nPORT=$(openclaw config get gateway.port 2>/dev/null | grep -oE '[0-9]+')\nPORT=${PORT:-18789}  # fallback to default only if config unavailable\necho \"Gateway port: $PORT\"\n\n\nUse $PORT in all port-related commands throughout this guide.\n\nScenario A: Rescue (Gateway Down)\n\nFollow these sections in order when the main gateway is not running.\n\nA1. Assess the Situation\n# Is the service running at all?\n# Linux:\nsystemctl --user status openclaw-gateway\n# macOS:\nlaunchctl list | grep openclaw\n\n# Is the process alive?\npgrep -af openclaw\n\n# Is the port listening?\n# Linux:\nss -tlnp | grep $PORT\n# macOS:\nlsof -iTCP:$PORT -sTCP:LISTEN\n\nA2. Check Logs for Root Cause\n\nLinux:\n\njournalctl --user -u openclaw-gateway --since \"1 hour ago\" --no-pager | grep -iE \"error|crash|fatal|SIGTERM|OOM\"\n\n# Last 50 lines for context\njournalctl --user -u openclaw-gateway -n 50 --no-pager\n\n\nmacOS:\n\nLOG_DIR=\"$HOME/.openclaw/logs\"\ngrep -iE \"error|crash|fatal\" \"$LOG_DIR/gateway.log\" | tail -20\ntail -50 \"$LOG_DIR/gateway.log\"\n\n# Also check unified log\nlog show --predicate 'process == \"node\"' --last 1h | grep -iE \"error|crash|fatal\"\n\nCommon crash patterns\nLog pattern\tMeaning\tFix\nEADDRINUSE\tPort already in use\tFind conflicting process: ss -tlnp | grep $PORT (Linux) or lsof -iTCP:$PORT (macOS), kill it or change port\nENOMEM / JavaScript heap\tOut of memory\tCheck free -h (Linux) / vm_stat (macOS), kill memory hogs or increase Node heap\nSyntaxError in config\tBad JSON in openclaw.json\tSee A3 Config Repair\nMODULE_NOT_FOUND\tMissing dependency\tcd $(npm root -g)/openclaw && npm install --production\nInvalid token / 401 / 403\tAuth failure\tCheck tokens in env file or systemd drop-in\nECONNREFUSED\tUpstream unreachable\tCheck network, Tailscale, API endpoints\nA3. Config Repair\n\nAlways backup first:\n\ncp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak.$(date +%s)\n\n\nJSON syntax validation:\n\npython3 -c \"import json; json.load(open('$HOME/.openclaw/openclaw.json'))\"\n\n\nCommon JSON issues: trailing comma, missing quotes, unescaped characters. The error message shows line/position.\n\nConfig schema validation:\n\nopenclaw config get gateway  # check gateway config section\nopenclaw config get channels  # check channels config section\n\n\nCommon config errors:\n\nSymptom\tLikely cause\tFix\n\"device identity mismatch\"\tService env token ≠ config token\tSync tokens between env file and openclaw.json\nAgent not routing\tbindings misconfigured\tBindings go at top-level, not inside agents.list[].routing\n\nAfter fixing, validate:\n\npython3 -c \"import json; json.load(open('$HOME/.openclaw/openclaw.json')); print('JSON OK')\"\nopenclaw status\n\nA4. Check Resources\n# Disk space\ndf -h ~\n\n# Memory (Linux)\nfree -h\n# Memory (macOS)\nvm_stat | head -5\n\n# Node.js available?\nnode -v\nwhich openclaw\nopenclaw --version\n\nA5. Restart and Verify\n\nOnly restart after identifying and fixing the root cause.\n\nLinux:\n\nsystemctl --user restart openclaw-gateway\nsleep 3\nsystemctl --user status openclaw-gateway\njournalctl --user -u openclaw-gateway -n 20 --no-pager\n\n\nmacOS:\n\nlaunchctl kickstart -k \"gui/$(id -u)/com.openclaw.gateway\"\nsleep 3\nlaunchctl list | grep openclaw\ntail -20 ~/.openclaw/logs/gateway.log\n\n\nIf service won't start at all:\n\n# Manual foreground start for better error output\nopenclaw gateway start\n\n\nFinal verification:\n\nopenclaw status\nopenclaw doctor --non-interactive\n\nScenario B: Health Check (Gateway Running)\n\nFollow these sections for routine operational checks on a running gateway.\n\nB1. Quick Health Check\n# Comprehensive check — start here\nopenclaw doctor\n\n# If issues found, auto-fix safe ones\nopenclaw doctor --fix\n\nB2. Update & Upgrade\n# Check versions\nCURRENT=$(openclaw --version)\nLATEST=$(npm view openclaw version)\necho \"Current: $CURRENT  Latest: $LATEST\"\n\n\nPerform update:\n\n# 1. Save doctor baseline\nopenclaw doctor --non-interactive 2>&1 | tee /tmp/doctor-before.txt\n\n# 2. Backup config\ncp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.pre-upgrade.$(date +%s)\n\n# 3. Update\nnpm update -g openclaw\nopenclaw --version\n\n# 4. Restart\n# Linux:\nsystemctl --user restart openclaw-gateway\n# macOS:\nlaunchctl kickstart -k \"gui/$(id -u)/com.openclaw.gateway\"\n\n# 5. Compare doctor output\nsleep 5\nopenclaw doctor --non-interactive 2>&1 | tee /tmp/doctor-after.txt\ndiff /tmp/doctor-before.txt /tmp/doctor-after.txt\n\n\nRollback:\n\nnpm install -g openclaw@<previous_version>\ncp ~/.openclaw/openclaw.json.pre-upgrade.<timestamp> ~/.openclaw/openclaw.json\n# Restart (platform-appropriate command above)\n\nB3. Session & Disk Cleanup\n# Check disk usage per agent\nfor agent_dir in ~/.openclaw/agents/*/; do\n    agent=$(basename \"$agent_dir\")\n    size=$(du -sh \"$agent_dir/sessions/\" 2>/dev/null | cut -f1)\n    count=$(find \"$agent_dir/sessions/\" -name \"*.jsonl\" 2>/dev/null | wc -l)\n    echo \"$agent: $size ($count transcripts)\"\ndone\n\n# Auto-fix orphans\nopenclaw doctor --fix\n\n# Manual cleanup: old transcripts (>30 days)\nfind ~/.openclaw/agents/*/sessions/ -name \"*.jsonl\" -mtime +30 -exec ls -lh {} \\;\n# Review, then delete if safe:\nfind ~/.openclaw/agents/*/sessions/ -name \"*.jsonl\" -mtime +30 -delete\n\nB4. Backup\nBACKUP_DIR=~/openclaw-backup-$(date +%Y%m%d-%H%M%S)\nmkdir -p \"$BACKUP_DIR\"\n\n# Core files\ncp ~/.openclaw/openclaw.json \"$BACKUP_DIR/\"\n[ -f ~/.openclaw/env ] && cp ~/.openclaw/env \"$BACKUP_DIR/\" || echo \"No env file (tokens may be in systemd drop-in or plist)\"\ncp -r ~/.openclaw/agents \"$BACKUP_DIR/\"\ncp -r ~/.openclaw/devices \"$BACKUP_DIR/\"\ncp -r ~/.openclaw/workspace \"$BACKUP_DIR/\"\n\n# Service config\nif [ \"$(uname -s)\" = \"Linux\" ]; then\n    cp ~/.config/systemd/user/openclaw-gateway.service \"$BACKUP_DIR/\" 2>/dev/null\n    cp -r ~/.config/systemd/user/openclaw-gateway.service.d \"$BACKUP_DIR/\" 2>/dev/null\nelif [ \"$(uname -s)\" = \"Darwin\" ]; then\n    cp ~/Library/LaunchAgents/com.openclaw.gateway.plist \"$BACKUP_DIR/\" 2>/dev/null\nfi\n\necho \"Backup saved to $BACKUP_DIR\"\n\nB5. Tailscale Serve Check\n\nIf OpenClaw uses Tailscale Serve as reverse proxy:\n\ntailscale status\ntailscale serve status\ncurl -s -o /dev/null -w \"%{http_code}\" http://localhost:$PORT/healthz || echo \"Gateway not reachable on localhost\"\n\n\nReconfigure if broken:\n\ntailscale serve reset\ntailscale serve https / http://localhost:$PORT\ntailscale serve status\n\nReference\nTroubleshooting Quick Index\nSymptom\tPath\nGateway won't start\tA1 → A2 → A3 → A5\nGateway crashed\tA2 (logs) → A4 (resources) → A3 (config) → A5 (restart)\nConfig broken after edit\tA3 → A5\nDisk filling up\tB3\nAfter upgrade something broke\tB2 (rollback)\nTailscale not proxying\tB5\nopenclaw doctor Reference\nFlag\tEffect\n(none)\tInteractive health check\n--fix\tApply safe repairs (orphan cleanup, stale locks)\n--force\tAggressive repairs (may overwrite custom service config)\n--deep\tScan system for extra gateway installs\n--non-interactive\tNo prompts, safe migrations only\n\n--fix repairs: orphan transcripts, stale session locks, legacy key migration. --fix does NOT: modify openclaw.json, change service files (unless --force), delete workspace files.\n\nKey Commands\nCommand\tPurpose\nopenclaw status\tQuick status: running, version, basic info\nopenclaw doctor\tDeep health check: state, channels, plugins, skills\nopenclaw doctor --fix\tHealth check + auto-repair safe issues\nopenclaw gateway start\tStart gateway in foreground (for debugging)\nopenclaw daemon install\tInstall as persistent service (systemd/launchd)\nopenclaw daemon restart\tRestart the service\nopenclaw config get <path>\tRead config value\nopenclaw config set <path> <value>\tWrite config value\nSafety Rules\nAlways check logs before changing anything — understand the problem first\nAlways backup before editing config — cp with timestamp suffix\nAlways validate JSON after editing — one bad comma kills the service\nNever print secrets — check env file exists, don't cat it\nNever delete workspace files — use trash if you must remove something\nAlways verify after restart — status + logs, don't assume it worked\nDestructive operations require confirmation — ask the user before wiping data\nFile Layout\n~/.openclaw/\n├── openclaw.json              # Main config\n├── openclaw.json.bak          # Auto-backup\n├── env                        # Environment variables (secrets)\n├── logs/                      # macOS: launchd log output\n├── agents/                    # Per-agent configs\n│   └── <agent>/agent/\n│       ├── auth-profiles.json\n│       └── models.json\n├── devices/\n│   └── paired.json\n├── workspace/                 # Agent workspace\n└── sessions/                  # Session logs\n\n# Linux:\n~/.config/systemd/user/\n├── openclaw-gateway.service\n└── openclaw-gateway.service.d/\n    └── env.conf\n\n# macOS:\n~/Library/LaunchAgents/\n└── com.openclaw.gateway.plist"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/dinstein/openclaw-ops",
    "publisherUrl": "https://clawhub.ai/dinstein/openclaw-ops",
    "owner": "dinstein",
    "version": "1.2.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/openclaw-ops",
    "downloadUrl": "https://openagent3.xyz/downloads/openclaw-ops",
    "agentUrl": "https://openagent3.xyz/skills/openclaw-ops/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-ops/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-ops/agent.md"
  }
}