About screen-capture
screen-capture is a skill for capturing and analyzing screen content, including extracting text with OCR. It describes macOS capture commands and Python-based image capture and processing options for screen inspection tasks.
Key features
- 01Capture full screen, regions, or windows
- 02Use macOS screencapture commands
- 03Capture images with Python libraries
- 04Extract screen text with pytesseract OCR
- 05Analyze images with PIL or OpenCV
Use cases
- 01Save a full-screen or selected-area capture
- 02Read text displayed on screen
- 03Process a captured image for analysis
MCP support
The skill maps screen capture to the screencapture command and OCR to pytesseract, with PIL or OpenCV for image processing and Python scripts for execution. It does not describe an MCP server or MCP client.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ lotosbin/ claude-skills --skill screen-captureAfter installing, type/screen-capturein Claude Code to confirm it loaded.
Details
From the project README屏幕捕获与分析专家
触发条件
当用户提到以下内容时自动触发:
- "截图"
- "屏幕内容"
- "获取屏幕"
- "分析屏幕"
- "屏幕文本"
- "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:截取全屏
请截取整个屏幕并保存到文件。
执行步骤:
- 使用
screencapture -S screen.png捕获全屏 - 返回截图文件路径
场景2:截取区域
请让我选择区域进行截图。
执行步骤:
- 使用
screencapture -i -s screen.png交互式选择区域 - 返回截图文件路径
场景3:识别屏幕文字
请识别屏幕上的文字内容。
执行步骤:
- 截取屏幕
- 使用 pytesseract 进行 OCR 识别
- 返回识别出的文字
场景4:保存屏幕截图
把当前屏幕保存为 screenshot.png。
执行步骤:
screencapture -S /Users/liubinbin/screenshot.png
MCP 工具映射
| 功能 | 工具 |
|---|---|
| 屏幕截图 | screencapture 命令 |
| OCR 识别 | pytesseract |
| 图像处理 | PIL / OpenCV |
| Python 执行 | python3 脚本 |
注意事项
- macOS 权限: 首次使用需要在系统偏好设置中授权屏幕录制权限
- Tesseract OCR: 需要安装
brew install tesseract - Python 依赖:
pip3 install pyautogui pytesseract pillow opencv-python
安装依赖
# macOS 屏幕录制权限工具
brew install tesseract
# Python 依赖
pip3 install pyautogui pytesseract pillow opencv-python
Comments
Markdown supported