
Screen Capture
- 108 installs
- 14 repo stars
- Updated January 20, 2026
- lotosbin/claude-skills
Equip coding agents to capture desktop or browser screenshots for UI verification, visual debugging, and attaching evidence to automated development workflows.
About
Provides agent-oriented screen capture patterns so Claude can photograph apps or browsers, enabling visual verification, layout debugging, and evidence collection during automated coding and QA tasks.
- Programmatic screenshot capture
- Agent UI verification
- Visual debugging support
- Workflow automation hooks
- Cross-platform capture patterns
Screen Capture by the numbers
- 108 all-time installs (skills.sh)
- +1 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #4,116 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/lotosbin/claude-skills --skill screen-captureAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 108 |
|---|---|
| repo stars | ★ 14 |
| Last updated | January 20, 2026 |
| Repository | lotosbin/claude-skills ↗ |
What it does
Equip coding agents to capture desktop or browser screenshots for UI verification, visual debugging, and attaching evidence to automated development workflows.
Files
屏幕捕获与分析专家
触发条件
当用户提到以下内容时自动触发:
- "截图"
- "屏幕内容"
- "获取屏幕"
- "分析屏幕"
- "屏幕文本"
- "OCR识别"
核心能力
屏幕捕获 (macOS)
- screencapture 命令: 使用 macOS 原生
screencapture工具 - 全屏截图:
screencapture -S screen.png - 区域截图:
screencapture -i screen.png(交互式选择) - 窗口截图:
screencapture -w window.png
屏幕捕获 (Python)
- pyautogui: 跨平台截图库
- mss: 高性能截图库
- pyscreenshot: 简单易用的截图工具
文本提取
- OCR 识别: 使用 pytesseract 进行文字识别
- 系统辅助: 读取系统可访问性 API
图像分析
- OpenCV: 图像处理和分析
- PIL: 图像分析和处理
常用场景
场景1:截取全屏
请截取整个屏幕并保存到文件。执行步骤: 1. 使用 screencapture -S screen.png 捕获全屏 2. 返回截图文件路径
场景2:截取区域
请让我选择区域进行截图。执行步骤: 1. 使用 screencapture -i -s screen.png 交互式选择区域 2. 返回截图文件路径
场景3:识别屏幕文字
请识别屏幕上的文字内容。执行步骤: 1. 截取屏幕 2. 使用 pytesseract 进行 OCR 识别 3. 返回识别出的文字
场景4:保存屏幕截图
把当前屏幕保存为 screenshot.png。执行步骤:
screencapture -S /Users/liubinbin/screenshot.pngMCP 工具映射
| 功能 | 工具 |
|---|---|
| 屏幕截图 | screencapture 命令 |
| OCR 识别 | pytesseract |
| 图像处理 | PIL / OpenCV |
| Python 执行 | python3 脚本 |
注意事项
1. macOS 权限: 首次使用需要在系统偏好设置中授权屏幕录制权限 2. Tesseract OCR: 需要安装 brew install tesseract 3. Python 依赖: pip3 install pyautogui pytesseract pillow opencv-python
安装依赖
# macOS 屏幕录制权限工具
brew install tesseract
# Python 依赖
pip3 install pyautogui pytesseract pillow opencv-python#!/usr/bin/env python3
"""
屏幕捕获工具
支持 macOS screencapture 和 Python 截图库
"""
import argparse
import subprocess
import sys
from pathlib import Path
def capture_fullscreen(output_path: str = "screenshot.png") -> str:
"""使用 macOS screencapture 捕获全屏"""
output = Path(output_path).expanduser().absolute()
subprocess.run(["screencapture", "-S", str(output)], check=True)
return str(output)
def capture_window(output_path: str = "window.png") -> str:
"""捕获当前窗口"""
output = Path(output_path).expanduser().absolute()
subprocess.run(["screencapture", "-w", str(output)], check=True)
return str(output)
def capture_interactive(output_path: str = "selection.png") -> str:
"""交互式选择区域截图"""
output = Path(output_path).expanduser().absolute()
subprocess.run(["screencapture", "-i", "-s", str(output)], check=True)
return str(output)
def capture_with_python(output_path: str = "screenshot.png") -> str:
"""使用 Python pyautogui 截图"""
try:
import pyautogui
output = Path(output_path).expanduser().absolute()
pyautogui.screenshot(str(output))
return str(output)
except ImportError:
print("请安装 pyautogui: pip3 install pyautogui", file=sys.stderr)
sys.exit(1)
def ocr_recognize(image_path: str) -> str:
"""使用 Tesseract OCR 识别文字"""
try:
from PIL import Image
import pytesseract
image = Image.open(image_path)
text = pytesseract.image_to_string(image, lang="chi_sim+eng")
return text.strip() if text else "未识别到文字"
except ImportError:
print("请安装依赖: pip3 install pytesseract pillow", file=sys.stderr)
sys.exit(1)
def list_screenshots(directory: str = ".") -> list:
"""列出目录中的截图文件"""
dir_path = Path(directory).expanduser()
patterns = ["*.png", "*.jpg", "*.jpeg"]
files = []
for pattern in patterns:
files.extend(dir_path.glob(pattern))
return sorted(files)
def main():
parser = argparse.ArgumentParser(description="屏幕捕获工具")
parser.add_argument("-o", "--output", default="screenshot.png", help="输出文件路径")
parser.add_argument("-w", "--window", action="store_true", help="捕获窗口")
parser.add_argument("-i", "--interactive", action="store_true", help="交互式选择区域")
parser.add_argument("-p", "--python", action="store_true", help="使用 Python pyautogui")
parser.add_argument("--ocr", metavar="IMAGE", help="识别图片文字")
parser.add_argument("--list", metavar="DIR", nargs="?", const=".", help="列出截图文件")
args = parser.parse_args()
if args.ocr:
text = ocr_recognize(args.ocr)
print(f"识别结果:\n{text}")
return
if args.list is not None:
files = list_screenshots(args.list)
print(f"截图文件 ({len(files)}):")
for f in files:
print(f" - {f}")
return
if args.python:
path = capture_with_python(args.output)
elif args.window:
path = capture_window(args.output)
elif args.interactive:
path = capture_interactive(args.output)
else:
path = capture_fullscreen(args.output)
print(f"截图已保存: {path}")
if __name__ == "__main__":
main()