From ab3da5c0b0e32f44d29b9f1f23f1f904e6c92187 Mon Sep 17 00:00:00 2001 From: 0xallam Date: Sat, 25 Apr 2026 14:38:13 -0700 Subject: [PATCH] =?UTF-8?q?docs(skill):=20document=20the=20agent-browser?= =?UTF-8?q?=20=E2=86=92=20view=5Fimage=20chain=20for=20screenshots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- strix/skills/tooling/agent_browser.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/strix/skills/tooling/agent_browser.md b/strix/skills/tooling/agent_browser.md index bcf3ae2..4682ade 100644 --- a/strix/skills/tooling/agent_browser.md +++ b/strix/skills/tooling/agent_browser.md @@ -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