# Send Screenshot Skill to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- 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.
## Suggested prompts
### New install

```text
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.
```
### Upgrade existing

```text
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.
```
## Machine-readable fields
```json
{
  "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": {
    "downloadUrl": "/downloads/screenshot-skill",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=screenshot-skill",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "reference.md",
      "SKILL.md",
      "scripts/screenshot.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "screenshot-skill",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-08T12:18:55.778Z",
      "expiresAt": "2026-05-15T12:18:55.778Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=screenshot-skill",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=screenshot-skill",
        "contentDisposition": "attachment; filename=\"screenshot-skill-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "screenshot-skill"
      },
      "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/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."
      ]
    }
  },
  "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"
  }
}
```
## Documentation

### Screenshot Capture

基于 mss + Pillow 的高性能屏幕截图工具，适用于 Windows 桌面自动化、AI 视觉分析等场景。

### 依赖

uv add mss pillow
# 或
pip install mss pillow

### 作为 Python 模块使用

from scripts.screenshot import ScreenCapture

with ScreenCapture() as sc:
    # 获取屏幕分辨率
    width, height = sc.screen_size

    # 全屏截图 → PIL Image
    img = sc.capture()

    # 截图保存为文件
    sc.capture_to_file("output.png")

    # 截图转 base64 (用于发送给视觉 API)
    b64 = sc.capture_to_base64(quality=85, fmt="JPEG")

### 作为 CLI 工具使用

# 查看显示器信息
python scripts/screenshot.py info

# 截图保存到文件
python scripts/screenshot.py capture -o my_screenshot.png

# 截图输出 base64
python scripts/screenshot.py base64 --format JPEG --quality 85

### 核心 API

方法说明返回值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

### 发送截图给 OpenAI 视觉 API

from openai import OpenAI
from scripts.screenshot import ScreenCapture

client = OpenAI()
with ScreenCapture() as sc:
    b64 = sc.capture_to_base64(fmt="JPEG", quality=85)

resp = client.chat.completions.create(
    model="gpt-4o",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "描述截图内容"},
            {"type": "image_url", "image_url": {
                "url": f"data:image/jpeg;base64,{b64}",
                "detail": "high",
            }},
        ],
    }],
)

### 截取指定区域

with ScreenCapture() as sc:
    region = {"left": 100, "top": 200, "width": 800, "height": 600}
    img = sc.capture(region=region)
    img.save("region.png")

### 自动保存每步截图

with ScreenCapture(save_dir="screenshots") as sc:
    for i in range(5):
        sc.capture_to_base64(step=i)  # 自动保存为 screenshots/step_000.jpg 等

### 详细参考

完整 API 参数说明见 reference.md。
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: sunrddd-a11y
- Version: 1.0.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-08T12:18:55.778Z
- Expires at: 2026-05-15T12:18:55.778Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/screenshot-skill)
- [Send to Agent page](https://openagent3.xyz/skills/screenshot-skill/agent)
- [JSON manifest](https://openagent3.xyz/skills/screenshot-skill/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/screenshot-skill/agent.md)
- [Download page](https://openagent3.xyz/downloads/screenshot-skill)