screen-capture

使用系统原生方法进行屏幕捕获和内容分析,支持 macOS screencapture 命令和 Python 截图库

12 stars

Best use case

screen-capture is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

使用系统原生方法进行屏幕捕获和内容分析,支持 macOS screencapture 命令和 Python 截图库

Teams using screen-capture should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/screen-capture/SKILL.md --create-dirs "https://raw.githubusercontent.com/lotosbin/claude-skills/main/.claude/skills/screen-capture/Skill.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/screen-capture/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How screen-capture Compares

Feature / Agentscreen-captureStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

使用系统原生方法进行屏幕捕获和内容分析,支持 macOS screencapture 命令和 Python 截图库

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 屏幕捕获与分析专家

## 触发条件
当用户提到以下内容时自动触发:
- "截图"
- "屏幕内容"
- "获取屏幕"
- "分析屏幕"
- "屏幕文本"
- "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:截取全屏

```markdown
请截取整个屏幕并保存到文件。
```

**执行步骤:**
1. 使用 `screencapture -S screen.png` 捕获全屏
2. 返回截图文件路径

### 场景2:截取区域

```markdown
请让我选择区域进行截图。
```

**执行步骤:**
1. 使用 `screencapture -i -s screen.png` 交互式选择区域
2. 返回截图文件路径

### 场景3:识别屏幕文字

```markdown
请识别屏幕上的文字内容。
```

**执行步骤:**
1. 截取屏幕
2. 使用 pytesseract 进行 OCR 识别
3. 返回识别出的文字

### 场景4:保存屏幕截图

```markdown
把当前屏幕保存为 screenshot.png。
```

**执行步骤:**
```bash
screencapture -S /Users/liubinbin/screenshot.png
```

## MCP 工具映射

| 功能 | 工具 |
|------|------|
| 屏幕截图 | `screencapture` 命令 |
| OCR 识别 | `pytesseract` |
| 图像处理 | `PIL` / `OpenCV` |
| Python 执行 | `python3` 脚本 |

## 注意事项

1. **macOS 权限**: 首次使用需要在系统偏好设置中授权屏幕录制权限
2. **Tesseract OCR**: 需要安装 `brew install tesseract`
3. **Python 依赖**: `pip3 install pyautogui pytesseract pillow opencv-python`

## 安装依赖

```bash
# macOS 屏幕录制权限工具
brew install tesseract

# Python 依赖
pip3 install pyautogui pytesseract pillow opencv-python
```

Related Skills

Screen Click Skill (屏幕点击)

12
from lotosbin/claude-skills

## 描述

ui-ux-designer

12
from lotosbin/claude-skills

UI/UX 设计师专家,精通界面设计、交互设计、用户体验和设计系统

tech-lead

12
from lotosbin/claude-skills

技术负责人专家,精通技术架构设计、技术选型、代码审查和团队技术管理

task-manager

12
from lotosbin/claude-skills

统一任务管理技能,使用 GitHub Issues 管理所有 Agent 任务,支持任务创建、更新、追踪和完成

Red Pen Mark Remover

12
from lotosbin/claude-skills

Removes red handwritten marks from scanned documents and images using color detection and inpainting algorithms.

product-manager

12
from lotosbin/claude-skills

产品经理专家,精通产品规划、需求分析、功能设计和竞品研究

miniapp-develop

12
from lotosbin/claude-skills

小程序开发专家,精通微信、支付宝、抖音等多个平台的小程序开发

marketing-operations

12
from lotosbin/claude-skills

市场运营专家,精通数字营销、用户增长、运营策略和数据分析

legal-advisor

12
from lotosbin/claude-skills

法务顾问专家,精通法务合规、合同管理、知识产权、劳动法和风险管理

kuikly-develop

12
from lotosbin/claude-skills

Kuikly 开发专家,精通 Kuikly 框架设计理念、核心特性和最佳实践

cto

12
from lotosbin/claude-skills

首席技术官专家,精通技术架构设计、技术团队管理、技术战略规划、技术选型、研发效能提升和创新技术评估

coo

12
from lotosbin/claude-skills

首席运营官专家,精通日常运营管理、市场营销战略、客户服务、团队协调和业务流程优化,同时兼管市场运营和服务顾问职能