360 Secure SkillHub
360 安全技能中心

wsl-screenshot

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

分类:自动化
wxuanyuan
wxuanyuan
热度 26.10
最近更新 2026-05-11 17:38:15

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add wxuanyuan/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