{
  "schemaVersion": "1.0",
  "item": {
    "slug": "screenshot-skill",
    "name": "Screenshot Skill",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/sunrddd-a11y/screenshot-skill",
    "canonicalUrl": "https://clawhub.ai/sunrddd-a11y/screenshot-skill",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/screenshot-skill",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=screenshot-skill",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "reference.md",
      "SKILL.md",
      "scripts/screenshot.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",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-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/screenshot-skill"
    },
    "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/screenshot-skill",
    "agentPageUrl": "https://openagent3.xyz/skills/screenshot-skill/agent",
    "manifestUrl": "https://openagent3.xyz/skills/screenshot-skill/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/screenshot-skill/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": "Screenshot Capture",
        "body": "基于 mss + Pillow 的高性能屏幕截图工具，适用于 Windows 桌面自动化、AI 视觉分析等场景。"
      },
      {
        "title": "依赖",
        "body": "uv add mss pillow\n# 或\npip install mss pillow"
      },
      {
        "title": "作为 Python 模块使用",
        "body": "from scripts.screenshot import ScreenCapture\n\nwith ScreenCapture() as sc:\n    # 获取屏幕分辨率\n    width, height = sc.screen_size\n\n    # 全屏截图 → PIL Image\n    img = sc.capture()\n\n    # 截图保存为文件\n    sc.capture_to_file(\"output.png\")\n\n    # 截图转 base64 (用于发送给视觉 API)\n    b64 = sc.capture_to_base64(quality=85, fmt=\"JPEG\")"
      },
      {
        "title": "作为 CLI 工具使用",
        "body": "# 查看显示器信息\npython scripts/screenshot.py info\n\n# 截图保存到文件\npython scripts/screenshot.py capture -o my_screenshot.png\n\n# 截图输出 base64\npython scripts/screenshot.py base64 --format JPEG --quality 85"
      },
      {
        "title": "核心 API",
        "body": "方法说明返回值screen_size主显示器 (宽, 高)tuple[int, int]all_screen_size虚拟全屏 (宽, 高)，多屏合并tuple[int, int]monitors所有显示器详细信息list[dict]capture(monitor, region, delay)截图 → PIL ImageImage.Imagecapture_to_file(filepath, ...)截图 → PNG/JPG 文件Pathcapture_to_base64(quality, fmt, ...)截图 → base64 字符串str"
      },
      {
        "title": "发送截图给 OpenAI 视觉 API",
        "body": "from openai import OpenAI\nfrom scripts.screenshot import ScreenCapture\n\nclient = OpenAI()\nwith ScreenCapture() as sc:\n    b64 = sc.capture_to_base64(fmt=\"JPEG\", quality=85)\n\nresp = client.chat.completions.create(\n    model=\"gpt-4o\",\n    messages=[{\n        \"role\": \"user\",\n        \"content\": [\n            {\"type\": \"text\", \"text\": \"描述截图内容\"},\n            {\"type\": \"image_url\", \"image_url\": {\n                \"url\": f\"data:image/jpeg;base64,{b64}\",\n                \"detail\": \"high\",\n            }},\n        ],\n    }],\n)"
      },
      {
        "title": "截取指定区域",
        "body": "with ScreenCapture() as sc:\n    region = {\"left\": 100, \"top\": 200, \"width\": 800, \"height\": 600}\n    img = sc.capture(region=region)\n    img.save(\"region.png\")"
      },
      {
        "title": "自动保存每步截图",
        "body": "with ScreenCapture(save_dir=\"screenshots\") as sc:\n    for i in range(5):\n        sc.capture_to_base64(step=i)  # 自动保存为 screenshots/step_000.jpg 等"
      },
      {
        "title": "详细参考",
        "body": "完整 API 参数说明见 reference.md。"
      }
    ],
    "body": "Screenshot Capture\n\n基于 mss + Pillow 的高性能屏幕截图工具，适用于 Windows 桌面自动化、AI 视觉分析等场景。\n\n依赖\nuv add mss pillow\n# 或\npip install mss pillow\n\n快速开始\n作为 Python 模块使用\nfrom scripts.screenshot import ScreenCapture\n\nwith ScreenCapture() as sc:\n    # 获取屏幕分辨率\n    width, height = sc.screen_size\n\n    # 全屏截图 → PIL Image\n    img = sc.capture()\n\n    # 截图保存为文件\n    sc.capture_to_file(\"output.png\")\n\n    # 截图转 base64 (用于发送给视觉 API)\n    b64 = sc.capture_to_base64(quality=85, fmt=\"JPEG\")\n\n作为 CLI 工具使用\n# 查看显示器信息\npython scripts/screenshot.py info\n\n# 截图保存到文件\npython scripts/screenshot.py capture -o my_screenshot.png\n\n# 截图输出 base64\npython scripts/screenshot.py base64 --format JPEG --quality 85\n\n核心 API\n方法\t说明\t返回值\nscreen_size\t主显示器 (宽, 高)\ttuple[int, int]\nall_screen_size\t虚拟全屏 (宽, 高)，多屏合并\ttuple[int, int]\nmonitors\t所有显示器详细信息\tlist[dict]\ncapture(monitor, region, delay)\t截图 → PIL Image\tImage.Image\ncapture_to_file(filepath, ...)\t截图 → PNG/JPG 文件\tPath\ncapture_to_base64(quality, fmt, ...)\t截图 → base64 字符串\tstr\n常见场景\n发送截图给 OpenAI 视觉 API\nfrom openai import OpenAI\nfrom scripts.screenshot import ScreenCapture\n\nclient = OpenAI()\nwith ScreenCapture() as sc:\n    b64 = sc.capture_to_base64(fmt=\"JPEG\", quality=85)\n\nresp = client.chat.completions.create(\n    model=\"gpt-4o\",\n    messages=[{\n        \"role\": \"user\",\n        \"content\": [\n            {\"type\": \"text\", \"text\": \"描述截图内容\"},\n            {\"type\": \"image_url\", \"image_url\": {\n                \"url\": f\"data:image/jpeg;base64,{b64}\",\n                \"detail\": \"high\",\n            }},\n        ],\n    }],\n)\n\n截取指定区域\nwith ScreenCapture() as sc:\n    region = {\"left\": 100, \"top\": 200, \"width\": 800, \"height\": 600}\n    img = sc.capture(region=region)\n    img.save(\"region.png\")\n\n自动保存每步截图\nwith ScreenCapture(save_dir=\"screenshots\") as sc:\n    for i in range(5):\n        sc.capture_to_base64(step=i)  # 自动保存为 screenshots/step_000.jpg 等\n\n详细参考\n\n完整 API 参数说明见 reference.md。"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/sunrddd-a11y/screenshot-skill",
    "publisherUrl": "https://clawhub.ai/sunrddd-a11y/screenshot-skill",
    "owner": "sunrddd-a11y",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/screenshot-skill",
    "downloadUrl": "https://openagent3.xyz/downloads/screenshot-skill",
    "agentUrl": "https://openagent3.xyz/skills/screenshot-skill/agent",
    "manifestUrl": "https://openagent3.xyz/skills/screenshot-skill/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/screenshot-skill/agent.md"
  }
}