{
  "schemaVersion": "1.0",
  "item": {
    "slug": "clawhub-login",
    "name": "ClawHub Login Helper",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/mengwuzhi/clawhub-login",
    "canonicalUrl": "https://clawhub.ai/mengwuzhi/clawhub-login",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/clawhub-login",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawhub-login",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "scripts/clawhub_login.py"
    ],
    "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/clawhub-login"
    },
    "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/clawhub-login",
    "agentPageUrl": "https://openagent3.xyz/skills/clawhub-login/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawhub-login/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawhub-login/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": "clawhub-login",
        "body": "ClawHub OAuth 登录助手 - 无头服务器专用\n\nversion: 1.0.0\nauthor: 大总管\ndescription: 帮助在无头服务器上通过 OAuth 方式登录 ClawHub，解决浏览器认证问题"
      },
      {
        "title": "问题场景",
        "body": "在无头服务器（无浏览器）上使用 clawhub login 时：\n\n默认会尝试打开浏览器 → 失败 (spawn xdg-open ENOENT)\n需要手动获取授权 URL → 在本地浏览器打开 → 完成认证\n\n本 skill 自动化这个流程。"
      },
      {
        "title": "方式 1：交互式（推荐）",
        "body": "python3 ~/.openclaw/workspace/skills/clawhub-login/scripts/clawhub_login.py\n\n按提示操作：\n\n复制输出的授权 URL\n在本地浏览器打开\n授权后复制回调 URL\n粘贴到服务器完成登录"
      },
      {
        "title": "方式 2：命令行",
        "body": "# 获取授权 URL\npython3 ~/.openclaw/workspace/skills/clawhub-login/scripts/clawhub_login.py --get-url\n\n# 验证登录状态\npython3 ~/.openclaw/workspace/skills/clawhub-login/scripts/clawhub_login.py --check\n\n# 退出登录\npython3 ~/.openclaw/workspace/skills/clawhub-login/scripts/clawhub_login.py --logout"
      },
      {
        "title": "步骤 1：运行脚本",
        "body": "$ python3 scripts/clawhub_login.py\n\n🔐 ClawHub OAuth 登录助手\n\n检测到无头环境，使用手动授权模式...\n\n1. 打开以下 URL（复制到本地浏览器）：\n   https://clawhub.ai/cli/auth?redirect_uri=...&state=xxx\n\n2. 授权后，复制浏览器显示的 URL\n\n3. 粘贴回调 URL："
      },
      {
        "title": "步骤 2：在本地浏览器打开 URL",
        "body": "点击授权\n浏览器会跳转到回调页面\n复制完整的回调 URL"
      },
      {
        "title": "步骤 3：粘贴到服务器",
        "body": "粘贴回调 URL：https://clawhub.ai/cli/auth/callback?code=xxx&state=xxx\n\n✅ 登录成功！欢迎 @mengwuzhi"
      },
      {
        "title": "在 OpenClaw 中使用",
        "body": "# 让 agent 帮你登录\nopenclaw agent --message \"帮我登录 ClawHub\"\n\nAgent 会：\n\n运行 clawhub login 获取授权 URL\n输出 URL 让你复制到本地浏览器\n等待你提供回调 URL\n完成登录"
      },
      {
        "title": "技术原理",
        "body": "ClawHub 使用 OAuth 2.0 流程：\n\n1. CLI 生成授权 URL（含 state 参数）\n   ↓\n2. 用户在浏览器打开并授权\n   ↓\n3. ClawHub 重定向到回调 URL（含 code）\n   ↓\n4. CLI 用 code 交换 token\n   ↓\n5. Token 保存到 ~/.clawhub/token"
      },
      {
        "title": "问题：xdg-open ENOENT",
        "body": "原因： 无头服务器没有图形界面\n\n解决： 使用本 skill 的手动授权模式"
      },
      {
        "title": "问题：回调 URL 无效",
        "body": "原因： 授权已过期或 state 不匹配\n\n解决： 重新运行脚本获取新的授权 URL"
      },
      {
        "title": "问题：登录状态丢失",
        "body": "原因： Token 文件被删除或过期\n\n解决： 重新登录"
      },
      {
        "title": "相关文件",
        "body": "文件路径Token 存储~/.clawhub/tokenToken 配置~/.config/clawhub/config.json"
      },
      {
        "title": "安全提示",
        "body": "⚠️ Token 相当于密码，不要分享\n⚠️ 定期更新 Token（重新登录）\n⚠️ 不要在公共电脑上保存 Token"
      },
      {
        "title": "基于实战经验",
        "body": "本 skill 基于 2026-02-28 在无头服务器上登录 ClawHub 发布 create-openclaw-agent skill 的实战经验总结。"
      },
      {
        "title": "许可证",
        "body": "MIT License\n\n作者备注： 这是第一个专门解决 ClawHub 无头登录问题的 skill。"
      }
    ],
    "body": "clawhub-login\n\nClawHub OAuth 登录助手 - 无头服务器专用\n\nversion: 1.0.0\nauthor: 大总管\ndescription: 帮助在无头服务器上通过 OAuth 方式登录 ClawHub，解决浏览器认证问题\n\n问题场景\n\n在无头服务器（无浏览器）上使用 clawhub login 时：\n\n默认会尝试打开浏览器 → 失败 (spawn xdg-open ENOENT)\n需要手动获取授权 URL → 在本地浏览器打开 → 完成认证\n\n本 skill 自动化这个流程。\n\n使用方法\n方式 1：交互式（推荐）\npython3 ~/.openclaw/workspace/skills/clawhub-login/scripts/clawhub_login.py\n\n\n按提示操作：\n\n复制输出的授权 URL\n在本地浏览器打开\n授权后复制回调 URL\n粘贴到服务器完成登录\n方式 2：命令行\n# 获取授权 URL\npython3 ~/.openclaw/workspace/skills/clawhub-login/scripts/clawhub_login.py --get-url\n\n# 验证登录状态\npython3 ~/.openclaw/workspace/skills/clawhub-login/scripts/clawhub_login.py --check\n\n# 退出登录\npython3 ~/.openclaw/workspace/skills/clawhub-login/scripts/clawhub_login.py --logout\n\n完整流程\n步骤 1：运行脚本\n$ python3 scripts/clawhub_login.py\n\n🔐 ClawHub OAuth 登录助手\n\n检测到无头环境，使用手动授权模式...\n\n1. 打开以下 URL（复制到本地浏览器）：\n   https://clawhub.ai/cli/auth?redirect_uri=...&state=xxx\n\n2. 授权后，复制浏览器显示的 URL\n\n3. 粘贴回调 URL：\n\n步骤 2：在本地浏览器打开 URL\n点击授权\n浏览器会跳转到回调页面\n复制完整的回调 URL\n步骤 3：粘贴到服务器\n粘贴回调 URL：https://clawhub.ai/cli/auth/callback?code=xxx&state=xxx\n\n✅ 登录成功！欢迎 @mengwuzhi\n\n在 OpenClaw 中使用\n# 让 agent 帮你登录\nopenclaw agent --message \"帮我登录 ClawHub\"\n\n\nAgent 会：\n\n运行 clawhub login 获取授权 URL\n输出 URL 让你复制到本地浏览器\n等待你提供回调 URL\n完成登录\n技术原理\n\nClawHub 使用 OAuth 2.0 流程：\n\n1. CLI 生成授权 URL（含 state 参数）\n   ↓\n2. 用户在浏览器打开并授权\n   ↓\n3. ClawHub 重定向到回调 URL（含 code）\n   ↓\n4. CLI 用 code 交换 token\n   ↓\n5. Token 保存到 ~/.clawhub/token\n\n故障排查\n问题：xdg-open ENOENT\n\n原因： 无头服务器没有图形界面\n\n解决： 使用本 skill 的手动授权模式\n\n问题：回调 URL 无效\n\n原因： 授权已过期或 state 不匹配\n\n解决： 重新运行脚本获取新的授权 URL\n\n问题：登录状态丢失\n\n原因： Token 文件被删除或过期\n\n解决： 重新登录\n\n相关文件\n文件\t路径\nToken 存储\t~/.clawhub/token\nToken 配置\t~/.config/clawhub/config.json\n安全提示\n⚠️ Token 相当于密码，不要分享\n⚠️ 定期更新 Token（重新登录）\n⚠️ 不要在公共电脑上保存 Token\n基于实战经验\n\n本 skill 基于 2026-02-28 在无头服务器上登录 ClawHub 发布 create-openclaw-agent skill 的实战经验总结。\n\n许可证\n\nMIT License\n\n作者备注： 这是第一个专门解决 ClawHub 无头登录问题的 skill。"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/mengwuzhi/clawhub-login",
    "publisherUrl": "https://clawhub.ai/mengwuzhi/clawhub-login",
    "owner": "mengwuzhi",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/clawhub-login",
    "downloadUrl": "https://openagent3.xyz/downloads/clawhub-login",
    "agentUrl": "https://openagent3.xyz/skills/clawhub-login/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawhub-login/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawhub-login/agent.md"
  }
}