{
  "schemaVersion": "1.0",
  "item": {
    "slug": "api-monitor",
    "name": "API配额监控与手动切换",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/2233admin/api-monitor",
    "canonicalUrl": "https://clawhub.ai/2233admin/api-monitor",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/api-monitor",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=api-monitor",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "api_monitor.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. 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",
      "slug": "api-monitor",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T07:50:26.163Z",
      "expiresAt": "2026-05-06T07:50:26.163Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=api-monitor",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=api-monitor",
        "contentDisposition": "attachment; filename=\"api-monitor-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "api-monitor"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/api-monitor"
    },
    "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/api-monitor",
    "agentPageUrl": "https://openagent3.xyz/skills/api-monitor/agent",
    "manifestUrl": "https://openagent3.xyz/skills/api-monitor/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/api-monitor/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": "概述",
        "body": "监控 OpenClaw 模型 API 使用量，配额不足时询问用户确认后再切换，确保用户知情。"
      },
      {
        "title": "功能",
        "body": "✅ 实时监控当前模型 API 状态\n✅ 检测配额不足/错误\n✅ 询问用户确认后再切换模型\n✅ 支持多个模型优先级配置\n✅ 手动指定切换到某个模型"
      },
      {
        "title": "准备工作",
        "body": "# 确认Python环境\npython3 --version\n\n# 确认脚本存在（路径根据实际安装位置调整）\nls -la ~/.openclaw/skills/api-monitor/api_monitor.py"
      },
      {
        "title": "查看当前状态",
        "body": "# 替换为实际脚本路径\nSCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --check"
      },
      {
        "title": "询问是否切换（生成询问消息）",
        "body": "SCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --ask"
      },
      {
        "title": "确认切换（用户确认后执行）",
        "body": "SCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --confirm"
      },
      {
        "title": "指定切换到某个模型",
        "body": "# 替换为目标模型\nTARGET_MODEL=\"mydamoxing/MiniMax-M2.5\"\nSCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --model \"$TARGET_MODEL\""
      },
      {
        "title": "列出所有可用模型",
        "body": "SCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --list-models"
      },
      {
        "title": "可用模型列表",
        "body": "mydamoxing/MiniMax-M2.5-highspeed - MiniMax高速版\nmydamoxing/MiniMax-M2.5 - MiniMax普通版\nvolcengine/ark-code-latest - 火山引擎\nhajimi/claude-sonnet-4-20250511 - 免费模型"
      },
      {
        "title": "工作流程",
        "body": "定时检查 → 运行 --check 查看状态\n发现问题 → 运行 --ask 生成询问消息\n用户确认 → 运行 --confirm 执行切换\n或者 → 用户指定 --model xxx 直接切换"
      },
      {
        "title": "示例对话",
        "body": "用户: 检查一下API状态\n助手: (运行 --check)\n当前模型: mydamoxing/MiniMax-M2.5-highspeed\n状态: API配额可能不足，建议切换模型\n错误次数: 3\n\n用户: 那就切换吧\n助手: (运行 --confirm)\n确认切换: mydamoxing/MiniMax-M2.5-highspeed → mydamoxing/MiniMax-M2.5\n切换成功!"
      },
      {
        "title": "定时任务配置（可选）",
        "body": "如需定时自动检查，可配置 cron：\n\n# 编辑 crontab\ncrontab -e\n\n# 添加定时任务（每30分钟检查一次）\n# 替换为实际路径\n*/30 * * * * cd $HOME/.openclaw/skills/api-monitor && python3 api_monitor.py --check >> /var/log/api-monitor.log 2>&1"
      },
      {
        "title": "注意事项",
        "body": "切换模型会中断当前会话\n建议在非高峰期操作\n始终需要用户确认才切换\n定期检查日志 /var/log/api-monitor.log 了解运行状态"
      }
    ],
    "body": "API 使用量监控技能（询问确认模式）\n概述\n\n监控 OpenClaw 模型 API 使用量，配额不足时询问用户确认后再切换，确保用户知情。\n\n功能\n✅ 实时监控当前模型 API 状态\n✅ 检测配额不足/错误\n✅ 询问用户确认后再切换模型\n✅ 支持多个模型优先级配置\n✅ 手动指定切换到某个模型\n使用方法\n准备工作\n# 确认Python环境\npython3 --version\n\n# 确认脚本存在（路径根据实际安装位置调整）\nls -la ~/.openclaw/skills/api-monitor/api_monitor.py\n\n查看当前状态\n# 替换为实际脚本路径\nSCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --check\n\n询问是否切换（生成询问消息）\nSCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --ask\n\n确认切换（用户确认后执行）\nSCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --confirm\n\n指定切换到某个模型\n# 替换为目标模型\nTARGET_MODEL=\"mydamoxing/MiniMax-M2.5\"\nSCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --model \"$TARGET_MODEL\"\n\n列出所有可用模型\nSCRIPT_PATH=\"$HOME/.openclaw/skills/api-monitor/api_monitor.py\"\npython3 \"$SCRIPT_PATH\" --list-models\n\n可用模型列表\nmydamoxing/MiniMax-M2.5-highspeed - MiniMax高速版\nmydamoxing/MiniMax-M2.5 - MiniMax普通版\nvolcengine/ark-code-latest - 火山引擎\nhajimi/claude-sonnet-4-20250511 - 免费模型\n工作流程\n定时检查 → 运行 --check 查看状态\n发现问题 → 运行 --ask 生成询问消息\n用户确认 → 运行 --confirm 执行切换\n或者 → 用户指定 --model xxx 直接切换\n示例对话\n用户: 检查一下API状态\n助手: (运行 --check)\n当前模型: mydamoxing/MiniMax-M2.5-highspeed\n状态: API配额可能不足，建议切换模型\n错误次数: 3\n\n用户: 那就切换吧\n助手: (运行 --confirm)\n确认切换: mydamoxing/MiniMax-M2.5-highspeed → mydamoxing/MiniMax-M2.5\n切换成功!\n\n定时任务配置（可选）\n\n如需定时自动检查，可配置 cron：\n\n# 编辑 crontab\ncrontab -e\n\n# 添加定时任务（每30分钟检查一次）\n# 替换为实际路径\n*/30 * * * * cd $HOME/.openclaw/skills/api-monitor && python3 api_monitor.py --check >> /var/log/api-monitor.log 2>&1\n\n注意事项\n切换模型会中断当前会话\n建议在非高峰期操作\n始终需要用户确认才切换\n定期检查日志 /var/log/api-monitor.log 了解运行状态"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/2233admin/api-monitor",
    "publisherUrl": "https://clawhub.ai/2233admin/api-monitor",
    "owner": "2233admin",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/api-monitor",
    "downloadUrl": "https://openagent3.xyz/downloads/api-monitor",
    "agentUrl": "https://openagent3.xyz/skills/api-monitor/agent",
    "manifestUrl": "https://openagent3.xyz/skills/api-monitor/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/api-monitor/agent.md"
  }
}