screenshot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Screenshotting

屏幕截图功能

Take screenshots to see what's on screen. Captures persist as files (unlike browsermcp snapshots which only exist in context).
截取屏幕截图以查看屏幕内容。截图会保存为文件(与仅存在于上下文的browsermcp快照不同)。

Quick Reference

快速参考

bash
undefined
bash
undefined

Capture specific app window

捕获特定应用窗口

~/.claude/skills/screenshot/scripts/look.py --app Ghostty
~/.claude/skills/screenshot/scripts/look.py --app Ghostty

Capture window by title match

通过标题匹配捕获窗口

~/.claude/skills/screenshot/scripts/look.py --app Chrome --title "LinkedIn"
~/.claude/skills/screenshot/scripts/look.py --app Chrome --title "LinkedIn"

Capture full screen

捕获全屏

~/.claude/skills/screenshot/scripts/look.py --screen
~/.claude/skills/screenshot/scripts/look.py --screen

List available windows

列出可用窗口

~/.claude/skills/screenshot/scripts/look.py --list
~/.claude/skills/screenshot/scripts/look.py --list

List windows grouped by category

按类别分组列出窗口

~/.claude/skills/screenshot/scripts/look.py --categories
~/.claude/skills/screenshot/scripts/look.py --categories

List only browser windows

仅列出浏览器窗口

~/.claude/skills/screenshot/scripts/look.py --category browsers
~/.claude/skills/screenshot/scripts/look.py --category browsers

Native resolution (skip resize)

原始分辨率(跳过缩放)

~/.claude/skills/screenshot/scripts/look.py --app Safari --native

**Categories:** browsers, terminals, editors, communication, documents, media, other
~/.claude/skills/screenshot/scripts/look.py --app Safari --native

**类别:** browsers, terminals, editors, communication, documents, media, other

When to Use

适用场景

Reactive (user asks):
  • "Have a look at this"
  • "Can you see what's on screen?"
  • "What does it look like?"
  • "Check the browser"
Proactive (verify state):
  • After uncertain CLI operations (did it background?)
  • When tool prompt state is unclear
  • After browsermcp actions when snapshot isn't enough
  • To verify visual changes actually happened
Documentation:
  • Capture steps in a workflow
  • Before/after comparisons
  • Bug evidence with screenshots
响应式(用户主动请求):
  • "Have a look at this"
  • "Can you see what's on screen?"
  • "What does it look like?"
  • "Check the browser"
主动式(验证状态):
  • 执行不确定的CLI操作后(是否成功后台运行?)
  • 当工具提示状态不明确时
  • 执行browsermcp操作后,快照不足以满足需求时
  • 验证视觉变化是否实际发生
文档记录:
  • 捕获工作流中的步骤
  • 前后对比截图
  • 用截图作为Bug证据

When NOT to Use

不适用场景

  • Browser-only tasks where browsermcp snapshot suffices
  • When you just need to describe what's visible
  • High-frequency captures that would clutter the directory
  • 仅浏览器任务,browsermcp快照已足够时
  • 仅需描述可见内容时
  • 高频率捕获会导致目录杂乱时

Anti-Patterns

反模式

PatternProblemFix
Capture without purposeClutters contextOnly screenshot when you need the visual
Skip --list firstWrong window capturedList windows to find exact app/title
Native on large screensHuge files, slow uploadUse default 1568px resize
模式问题解决方法
无目的捕获占用上下文空间仅在需要视觉信息时才截图
未先执行--list捕获到错误窗口先列出窗口以找到准确的应用/标题
大屏幕使用原生分辨率文件过大,上传缓慢使用默认的1568px缩放

Resolution Strategy

分辨率策略

Default: 1568px max dimension (~1,600 tokens, optimal for API)
OptionTokensUse case
Default (1568px)~1,600Full detail, no resize penalty
--max-size 735
~500Quick look, text readable
--native
variesWhen original resolution needed
Why 1568px: Images larger than this get resized server-side anyway. Pre-resizing avoids upload latency while getting the same visual fidelity.
默认:最大尺寸1568px(约1600个token,API最优尺寸)
选项Token数使用场景
默认(1568px)~1600完整细节,无缩放损耗
--max-size 735
~500快速查看,文本可读
--native
可变需要原始分辨率时
为什么选择1568px: 大于此尺寸的图片会在服务器端被缩放。预先缩放可避免上传延迟,同时保持相同的视觉保真度。

Output

输出

Ephemeral (no path): Screenshots go to
/tmp/claude-screenshots/
— auto-cleaned by OS, won't clutter project directories:
/tmp/claude-screenshots/2025-12-15-143022-chrome.png
Persistent (explicit path): For documentation workflows, specify where screenshots should live:
bash
look.py --app Chrome ./docs/step3.png
Design rationale: Quick looks are ephemeral by default. Documentation requires intentional placement. If a subagent is documenting, it should think about where artifacts belong.
临时文件(无指定路径): 截图保存到
/tmp/claude-screenshots/
— 由系统自动清理,不会杂乱项目目录:
/tmp/claude-screenshots/2025-12-15-143022-chrome.png
持久文件(指定路径): 用于文档工作流时,可指定截图保存位置:
bash
look.py --app Chrome ./docs/step3.png
设计理念: 快速查看的截图默认是临时的。文档记录需要有意指定保存位置。如果子代理负责文档记录,应考虑工件的存放位置。

How It Works

工作原理

  1. Window enumeration: Uses macOS CGWindowList API (pure Quartz, no AppleScript)
  2. Capture: Uses
    screencapture -l<windowid>
    for windows,
    screencapture -x
    for screen
  3. Resize: Uses
    sips --resampleHeightWidthMax
    for efficient scaling
Key capability: Can capture windows even when covered or minimized.
  1. 窗口枚举: 使用macOS CGWindowList API(纯Quartz,无AppleScript)
  2. 捕获: 对窗口使用
    screencapture -l<windowid>
    ,对屏幕使用
    screencapture -x
  3. 缩放: 使用
    sips --resampleHeightWidthMax
    进行高效缩放
核心能力: 即使窗口被覆盖或最小化,也能捕获。

Limitations

局限性

Scrollback: Only captures visible viewport. If content scrolled off screen, it won't be in the screenshot. Workaround: increase window size or pipe output to file.
Multiple monitors: Untested.
--screen
with
-m
flag captures main monitor only.
Window selection: Takes first match when multiple windows match filters. No "frontmost" heuristic yet.
滚动内容: 仅捕获可见视口。如果内容滚动出屏幕,不会出现在截图中。解决方法:增大窗口尺寸或将输出管道到文件。
多显示器: 未测试。带
-m
标志的
--screen
仅捕获主显示器。
窗口选择: 当多个窗口匹配筛选条件时,捕获第一个匹配项。目前没有“最前端”启发式逻辑。

Integration with browsermcp

与browsermcp的集成

browsermcp's
browser_screenshot
injects images directly into context but doesn't persist them as files. Use this skill when you need:
  • Screenshots that persist beyond the conversation
  • Captures of non-browser apps
  • Captures of windows behind the browser
  • Files to upload to Drive or include in docs
browsermcp的
browser_screenshot
直接将图片注入上下文,但不会保存为文件。在以下场景使用本技能:
  • 需要在对话之外持久化的截图
  • 捕获非浏览器应用
  • 捕获浏览器后方的窗口
  • 需要上传到Drive或包含在文档中的文件

Permissions

权限

Requires Screen Recording permission in System Preferences > Privacy & Security.
If capture fails with "check Screen Recording permissions", the user needs to grant permission to the terminal app (Ghostty, Terminal, iTerm, etc.).
需要在系统设置 > 隐私与安全性中开启“屏幕录制”权限。
如果捕获失败并提示“check Screen Recording permissions”,用户需要为终端应用(Ghostty、Terminal、iTerm等)授予权限。