screenshot

A macOS-only command that captures a window, the full screen, or a selected area and then makes the image available for analysis. It uses macOS’s built-in screencapture tool and does not itself take a screenshot without being asked.

In plain words
What is it for?
Use it to review interface design and accessibility, investigate visible errors, inspect code shown on screen, analyze charts, or compare a before-and-after interface.
Why use it?
It lets you discuss what is visible on screen—such as a user interface, error message, code, or chart—without manually describing every detail. Users on other systems must provide a screenshot file themselves.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ysicing/code-pilot/screenshot
Clone the repo
git clone --depth 1 https://github.com/ysicing/code-pilot
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.00791
Opus 5 $0.00010 $0.00396
Sonnet 5 $0.00004 $0.00158
Haiku 4.5 $0.00002 $0.00079

Measured yesterday against content hash b8b3e43d8f15, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

screenshot scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/screenshot.md · 133 lines

What it actually says

截图

在 macOS 上截取屏幕并分析图像。

⚠️ 系统要求:此命令仅支持 macOS 系统,需要 screencapture 工具。Linux/Windows 用户请手动截图后提供文件路径。

使用方法

/screenshot [选项]

选项

  • 无 : 选择窗口(Claude 会确认选项)
  • --window : 指定窗口截图
  • --full : 截取整个屏幕
  • --crop : 选择范围截图

基本示例

# 截取窗口并分析
/screenshot --window
"分析截取的画面"

# 选择范围并分析
/screenshot --crop
"说明选中范围的内容"

# 全屏截图并分析
/screenshot --full
"分析整个屏幕的构成"

与 Claude 的协作

# 无特定问题 - 情况分析
/screenshot --crop
(Claude 会自动分析屏幕内容,说明元素和构成)

# UI/UX 问题分析
/screenshot --window
"提出这个 UI 的问题点和改进方案"

# 错误分析
/screenshot --window
"告诉我这个错误消息的原因和解决方法"

# 设计审查
/screenshot --full
"从 UX 角度评估这个设计"

# 代码分析
/screenshot --crop
"指出这段代码的问题"

# 数据可视化分析
/screenshot --crop
"分析从这个图表中可以读取的趋势"

详细示例

# 从多个角度分析
/screenshot --window
"分析这个画面的以下方面:
1. UI 的一致性
2. 可访问性问题
3. 改进建议"

# 为比较分析多次截图
/screenshot --window
# (保存 before 图像)
# 进行更改
/screenshot --window
# (保存 after 图像)
"比较 before 和 after 图像,分析变更点和改进效果"

# 聚焦特定元素
/screenshot --crop
"评估选中按钮的设计是否与其他元素协调"

禁止事项

  • 禁止在未截图的情况下说"已截图"
  • 禁止尝试分析不存在的图像文件
  • /screenshot 命令不会实际执行截图

注意事项

  • 系统兼容性检查:在非 macOS 系统上会提示系统要求和替代方案

  • 未指定选项时,请提示以下选择:

    "请选择截图方式?
    1. 选择窗口 (--window) → screencapture -W
    2. 整个屏幕 (--full) → screencapture -x
    3. 选择范围 (--crop) → screencapture -i"
    
  • 请在用户执行 screencapture 命令后开始图像分析

  • 指定具体问题或观点可以进行更有针对性的分析

替代方案(非 macOS 系统)

Linux 系统:

# GNOME Screenshot
gnome-screenshot -a

# scrot
scrot -s

# ImageMagick
import screenshot.png

Windows 系统:

  • 使用 Win + Shift + S 快捷键
  • 或使用截图工具应用

截图完成后,请提供文件路径以便分析。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 133 lines · 19 tokens per session scan A b8b3e43d8f15

Subscribe to this mod's changes

screenshot is a command published in the GitHub repository ysicing/code-pilot (38 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 19 tokens to every session and 791 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.