360 Secure SkillHub
360 安全技能中心

wsl-screenshot

该 Skill 提供 shell 脚本,在 WSL2 中调用 Windows PowerShell 截取主屏幕,输出带时间戳的 PNG 到 Windows 图片目录,并给出通过消息工具发送最新截图的可选步骤。依赖 WSL、Windows PowerShell 和本地文件路径,未提供区域选择或多显示器说明。

wxuanyuan
wxuanyuan
热度 44.21
最近更新 2026-05-11 17:38:15
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add wsl-screenshot
Metadata
name
wsl-screenshot
description
Capture screenshots from WSL by calling Windows PowerShell. Use when user wants to take a screenshot from WSL environment, or needs screenshot functionality in WSL. Works on WSL2 by invoking Windows PowerShell to capture the primary screen.

WSL Screenshot

Capture screenshots from WSL using Windows PowerShell.

Usage

Take a Screenshot

# Run the screenshot script
~/.openclaw/workspace/skills/wsl-screenshot/scripts/screenshot.sh

# Output: C:\Users\97027\Pictures\wsl_screenshot_YYYYMMDD_HHMMSS.png

Send Screenshot to User

After taking a screenshot, send it via message:

# Get the latest screenshot path
LATEST=$(ls -t /mnt/c/Users/97027/Pictures/wsl_screenshot_*.png | head -1)

# Send via message tool
message action=send media="$LATEST" caption="📸 Screenshot"

Or use direct path:

message action=send media="/mnt/c/Users/97027/Pictures/wsl_screenshot_YYYYMMDD_HHMMSS.png"

Requirements

  • WSL2 with Windows 10/11
  • PowerShell available at /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe

Resources

  • scripts/screenshot.sh - Screenshot script