Screenshot — website camera powered by iris
iris renders a page in a real Chrome via the DevTools Protocol, waits for
fonts, images, entrance animations (and lazy-loaded content on --full), then
captures a trustworthy image at retina @2x by default. It is a camera, not a
driver: it captures, it does not click, type, or script-scroll.
Preflight (once per session, before the first capture)
Paths like scripts/ and references/ below are relative to THIS skill's
directory — run them from there, or prefix them with the skill's absolute path.
bash scripts/doctor.sh
- Exits 0 and prints the resolved Chrome path only when a smoke capture succeeded.
- If anything is missing, run
bash scripts/install.sh and re-run doctor.
- If
$CHROME is not set in your environment, add --chrome <path printed by doctor>
to iris invocations (or export CHROME for the session).
- If
iris is not on your PATH, use the absolute path doctor printed.
Choosing a command
| Goal |
Command |
| Desktop shot (1440×900 @2x) |
iris <url> |
| Full page height |
iris --full <url> |
| Full page, dark mode |
iris --full --dark <url> |
| One element (first CSS match, auto-scroll, tight framing) |
iris --selector '#hero' --padding 24 <url> |
| iPhone (390×844 @3x, mobile UA) |
iris -s iphone <url> |
| iPad (1024×1366 @2x) |
iris -s ipad <url> |
| Custom viewport |
iris -s 1280x800 <url> |
| Local dev server |
iris http://localhost:3000 -o shots/home.png (bare localhost uses HTTP automatically) |
| Wait for an element before capturing |
iris --wait-for 'h1' <url> |
| Concurrent batch |
iris -o shots/ a.com b.com c.com or cat urls.txt | iris - -o shots/ |
| Machine-readable results |
add --json (one JSON object per capture on stdout) |
Conventions
- Save captures to
shots/ in the working directory unless the user specifies a path.
- Single URL →
-o file.png; multiple URLs → -o dir/ (filenames derive from the URL, collisions get -2, -3 suffixes).
- Use
--json for batches and verify each result; exit code 1 if any URL failed.
- Pages taller than ~16k px at @2x fall back to @1x automatically — check the JSON
scale field and mention it if it happens.
- Formats:
png (default), jpg, webp — picked by the -o extension or --format.
Limitations (do not fight these)
--selector captures the FIRST matching element in document order only. It conflicts with --full; --padding requires --selector.
- Cross-origin iframe content is not captured.
- No interaction (clicks, typing, scripted scroll). For interactive checks, use a browser automation tool instead.
References (read only when needed)
references/flags.md — complete flag reference, presets, JSON schema, tuning tips.
references/mcp-setup.md — register iris mcp so the agent gets a capture tool (stdio MCP server built into the same binary).
references/troubleshooting.md — failure modes and fixes (missing browser, headless libs, timeouts, batch failures, MCP tool not appearing).
MCP (optional)
If the user wants iris available as an agent tool rather than just a CLI, read
references/mcp-setup.md and register the server
(command: iris, args: ["mcp"]).
1---2name: screenshot3description: Capture screenshots of live websites with the iris CLI — full page, single CSS element, desktop/iPhone/iPad presets, dark mode, concurrent batch, JSON output. Use when the user asks to screenshot or capture a website or local dev server, visually verify a rendered page, check responsive or dark-mode rendering, or needs a visual reference for a task.4license: MIT5---67# Screenshot — website camera powered by iris89`iris` renders a page in a real Chrome via the DevTools Protocol, waits for10fonts, images, entrance animations (and lazy-loaded content on `--full`), then11captures a trustworthy image at retina `@2x` by default. It is a camera, not a12driver: it captures, it does not click, type, or script-scroll.1314## Preflight (once per session, before the first capture)1516Paths like `scripts/` and `references/` below are relative to THIS skill's17directory — run them from there, or prefix them with the skill's absolute path.1819```bash20bash scripts/doctor.sh21```2223- Exits 0 and prints the resolved Chrome path only when a smoke capture succeeded.24- If anything is missing, run `bash scripts/install.sh` and re-run doctor.25- If `$CHROME` is not set in your environment, add `--chrome <path printed by doctor>`26 to iris invocations (or export CHROME for the session).27- If `iris` is not on your PATH, use the absolute path doctor printed.2829## Choosing a command3031| Goal | Command |32|---|---|33| Desktop shot (1440×900 @2x) | `iris <url>` |34| Full page height | `iris --full <url>` |35| Full page, dark mode | `iris --full --dark <url>` |36| One element (first CSS match, auto-scroll, tight framing) | `iris --selector '#hero' --padding 24 <url>` |37| iPhone (390×844 @3x, mobile UA) | `iris -s iphone <url>` |38| iPad (1024×1366 @2x) | `iris -s ipad <url>` |39| Custom viewport | `iris -s 1280x800 <url>` |40| Local dev server | `iris http://localhost:3000 -o shots/home.png` (bare localhost uses HTTP automatically) |41| Wait for an element before capturing | `iris --wait-for 'h1' <url>` |42| Concurrent batch | `iris -o shots/ a.com b.com c.com` or `cat urls.txt \| iris - -o shots/` |43| Machine-readable results | add `--json` (one JSON object per capture on stdout) |4445## Conventions4647- Save captures to `shots/` in the working directory unless the user specifies a path.48- Single URL → `-o file.png`; multiple URLs → `-o dir/` (filenames derive from the URL, collisions get `-2`, `-3` suffixes).49- Use `--json` for batches and verify each result; exit code 1 if any URL failed.50- Pages taller than ~16k px at @2x fall back to @1x automatically — check the JSON `scale` field and mention it if it happens.51- Formats: `png` (default), `jpg`, `webp` — picked by the `-o` extension or `--format`.5253## Limitations (do not fight these)5455- `--selector` captures the FIRST matching element in document order only. It conflicts with `--full`; `--padding` requires `--selector`.56- Cross-origin iframe content is not captured.57- No interaction (clicks, typing, scripted scroll). For interactive checks, use a browser automation tool instead.5859## References (read only when needed)6061- `references/flags.md` — complete flag reference, presets, JSON schema, tuning tips.62- `references/mcp-setup.md` — register `iris mcp` so the agent gets a `capture` tool (stdio MCP server built into the same binary).63- `references/troubleshooting.md` — failure modes and fixes (missing browser, headless libs, timeouts, batch failures, MCP tool not appearing).6465## MCP (optional)6667If the user wants iris available as an agent tool rather than just a CLI, read68`references/mcp-setup.md` and register the server69(`command: iris, args: ["mcp"]`).