docs(skill): document the agent-browser → view_image chain for screenshots

The vendored agent-browser skill described the ``screenshot``
subcommand but didn't tell the model how to actually look at the
resulting PNG. ``agent-browser screenshot`` writes to disk; the
SDK's ``view_image`` (from the ``Filesystem`` capability we already
enable on the agent) is what loads the bytes back as multimodal
content.

Add the explicit two-step pattern:

  exec_command:  agent-browser screenshot /workspace/page.png
  view_image:    {"path": "/workspace/page.png"}

Plus a guidance note that ``snapshot -i`` (text accessibility tree at
~200-400 tokens) is the cheap default and screenshots are for cases
where pixels actually matter — visual layout, captchas, custom
widgets where the a11y tree is incomplete.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
0xallam
2026-04-25 14:38:13 -07:00
parent cd1bb46d50
commit ab3da5c0b0
+19 -2
View File
@@ -236,14 +236,31 @@ only for simple expressions.
### Screenshot
`agent-browser screenshot` writes a PNG to disk in the sandbox. The
shell command alone does **not** put the image into your context —
chain it with the SDK ``view_image`` tool to actually see it:
```bash
exec_command: agent-browser screenshot /workspace/page.png
view_image: {"path": "/workspace/page.png"}
```
```bash
agent-browser screenshot # temp path, printed on stdout
agent-browser screenshot page.png # specific path
agent-browser screenshot page.png # specific path (relative to cwd)
agent-browser screenshot --full full.png # full scroll height
agent-browser screenshot --annotate map.png # numbered labels + legend keyed to snapshot refs
```
`--annotate` is designed for multimodal models: each label `[N]` maps to ref `@eN`.
`--annotate` is designed for multimodal models: each label `[N]` maps
to ref `@eN`. Take the annotated screenshot, then ``view_image`` it,
and you can correlate visual layout with snapshot refs.
Snapshots (`snapshot -i`) give you a compact text view that costs ~200-400
tokens; screenshots cost more. Use `snapshot` first; reach for
`screenshot + view_image` only when you actually need pixels (visual
layout questions, captchas, custom widgets where the accessibility
tree is incomplete).
### Handle multiple pages via tabs