Automated summary
This skill drives a real headless browser through `crawlberg interact` to run an ordered list of actions (click, type, keypress, scroll, wait, screenshot, JS) before capturing the page's final DOM.
Strengths
- Documents the exact action schema behind `--actions` (click, type, press, scroll, wait, screenshot, executeJs, scrape) including required fields per action.
- Explains the result shape (final page state wrapped under `interaction`) and the `json` vs `markdown` output formats.
- Covers the operational flags that matter: `--timeout`, `--browser-mode`, and `--browser-endpoint` for an external CDP over ws:// or wss://.
- Calls out validation traps up front — unknown fields are rejected, there is no `select` or `wait_for_selector` action, and scroll direction is up/down only.
Limitations
- No robots.txt handling on `interact`: it targets the single URL you pass, with no `--respect-robots-txt` flag.
- The schema is strict and capped at 100 actions per call; anything outside the documented shapes errors out.
- `executeJs` runs arbitrary page-context JavaScript and should be limited to trusted scripts; no guardrails are described.
Use it when the content only appears after interaction — a Load more button, infinite scroll, a form submission, or JS that fires on user input.
Avoid it for static pages or bulk collection across many URLs, where a plain scrape is enough and robots.txt compliance matters.
Security analysis
CautionThis is reference documentation for a legitimate scraping CLI, with no destructive commands, no piping of remote scripts to a shell, no credential exfiltration, and no obfuscation. The risk is limited to the powerful primitives it exposes — arbitrary in-page JS execution, remote CDP attachment, and login automation — which are documented honestly and come with sensible limits and a warning about hardcoded credentials. Powerful-but-legitimate, hence caution rather than safe.
- •Documents `executeJs`, which runs arbitrary JavaScript in the page context; if an agent builds that script from scraped page content it becomes a prompt-injection-to-code path (the doc does say 'trusted scripts only', which is good but unenforced).
- •The login example pipes a password through `--actions` on the command line, which is visible in process listings/shell history; the doc does warn against hardcoding credentials, but the pattern still encourages passing them as CLI args.
- •Uses external CDP endpoints (`ws://`/`wss://`), i.e. attaches to a remote browser with the user's session/cookies — powerful, though legitimate for the stated purpose.
- •Drives a network-connected headless browser against arbitrary URLs; no robots.txt handling on `interact` is explicitly acknowledged.
Examples
The page at https://example.com hides its full list behind a 'Load more' button. Use crawlberg interact to click #load-more, wait 500ms, then scrape the resulting HTML.I need the results page from https://shop.example.com/search. Drive the browser: type 'wireless headphones' into input[name=q], press Enter, wait for #results, then capture the page as markdown.This article only renders after scrolling. Scroll down three times on https://blog.example.com/post, then take a full-page screenshot and scrape the DOM so I can parse it.name: automating-the-browser
description: >-
Use when extracting a page needs scripted interaction first — click, type,
press a key, scroll, wait, screenshot, or run JS before capturing the DOM.
Covers crawlberg interact URL --actions with the real action schema,
result shape, limits, and external-CDP options.
<!--
AI-RULEZ :: GENERATED FILE — DO NOT EDIT
Content-Hash: blake3:c099a207dd4d659bcbd8000afd8d104f51644c894a2073d064b670ad7e7dee10
Source-Hash: blake3:7631394eb6104ea44a9e698d5caa9ef10b3bebf9b83bb055f907ff58efd6bd0e
Schema-Version: v1
-->
Automating the browser
crawlberg interact <url> --actions '[...]' drives a real headless browser
through an ordered list of actions, then captures the resulting page. Reach for
it when a static scrape is not enough: the content lives behind a "Load more"
button, an infinite scroll, a form submission, or JS that only runs on
interaction.
Quick recipe
crawlberg interact https://example.com \
--actions '[{"type":"click","selector":"#load-more"},
{"type":"wait","milliseconds":500},
{"type":"scrape"}]'
Actions run in order. The result wraps the final page state under
interaction (see Output below).
Flag surface
| Flag | Default | Purpose |
| -------------------- | ------- | ------------------------------------------------------------ |
| --actions | — | Required. JSON array of action objects (see below). |
| --format | json | json (full result) or markdown (final HTML only). |
| --timeout | 30000 | Per-request timeout in ms. |
| --browser-mode | auto | auto, always, never. Interaction needs a browser. |
| --browser-endpoint | — | External CDP ws:// or wss:// URL. |
| --config | — | Inline JSON or @file.json for the full CrawlConfig. |
There is no --respect-robots-txt flag on interact; it targets the one URL
you point it at.
Action schema
Each action is a JSON object tagged by type (camelCase). Unknown fields are
rejected, so match the shapes exactly:
| type | Fields | Notes |
| ------------- | -------------------------------------------------------------- | --------------------------------------------------------------- |
| click | selector | Click the element matching the CSS selector. |
| type | selector, text | Type text into the input matching selector. |
| press | key | Press a key, e.g. "Enter", "Tab", "Escape". |
| scroll | direction ("up"/"down"), selector?, amount? | Scroll the page, or a scrollable element if selector is set. |
| wait | milliseconds?, selector? | Wait a fixed time, or until selector appears (selector wins). |
| screenshot | fullPage? | Capture the viewport, or the full scrollable page if true. |
| executeJs | script | Run arbitrary JS in the page context. Trusted scripts only. |
| scrape | — | Capture the current page HTML into the result. |
There is no select action and no wait_for_selector action: to wait for an
element, use wait with a selector field. Scroll direction is up or
down only.
Limits (enforced — exceeding them errors)
- Max 100 actions per call.
- Single
wait: max 300000 ms; total wait across allwaitactions: max 300 s. selectormax 4096 bytes;textandexecuteJsscriptmax 1 MB each.scrollamountmax 100000 px (absolute).
Output
JSON mode (default)
The result is wrapped under an interaction key. It carries the final page
HTML (interaction.final_html) and a per-action record under
interaction.action_results[...] — including screenshot data and executeJs
return values where applicable.
crawlberg interact https://example.com \
--actions '[{"type":"type","selector":"#q","text":"rust"},
{"type":"press","key":"Enter"},
{"type":"wait","selector":".results"},
{"type":"scrape"}]' \
--format json | jq '.interaction.final_html | length'
Markdown mode
Prints interaction.final_html directly — the raw final DOM, not converted
Markdown. Use JSON mode and feed final_html to a scrape step when you need
clean Markdown.
Patterns
Expand lazy content, then capture
crawlberg interact https://example.com/feed \
--actions '[{"type":"scroll","direction":"down"},
{"type":"wait","milliseconds":800},
{"type":"scroll","direction":"down"},
{"type":"wait","milliseconds":800},
{"type":"scrape"}]'
Capture a full-page screenshot after login
crawlberg interact https://app.example.com \
--actions '[{"type":"type","selector":"#email","text":"me@example.com"},
{"type":"type","selector":"#password","text":"..."},
{"type":"click","selector":"button[type=submit]"},
{"type":"wait","selector":".dashboard"},
{"type":"screenshot","fullPage":true}]'
Never hardcode credentials — pass them from the environment or a secrets store.
Point at an external Chrome
crawlberg interact https://example.com \
--browser-endpoint ws://browser.internal:9222/devtools/browser/<id> \
--actions '[{"type":"click","selector":"#go"},{"type":"scrape"}]'
See the headless-fallback skill for CDP endpoints, wait strategies, and
persistent browser profiles set via --config.
When to reach for scrape or crawl instead
If the page yields its content on a plain fetch (or via --browser-mode always) with no clicking or typing, use crawlberg scrape — see
scraping-html-to-markdown. Use interact only when ordered actions must run
before the content exists.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/browser-interaction-automation-mtfbwm8g' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/browser-interaction-automation-mtfbwm8g/download' --output '.skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md.part' && mv '.skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md.part' '.skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md' && test -s '.skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/automating-the-browser' && cp -R '.skill-downloads/browser-interaction-automation-mtfbwm8g' '.claude/skills/automating-the-browser'Cursor
test -f '.skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md' && test -s '.skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/automating-the-browser' && cp -R '.skill-downloads/browser-interaction-automation-mtfbwm8g' '.cursor/skills/automating-the-browser'Codex
test -f '.skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md' && test -s '.skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/automating-the-browser' && cp -R '.skill-downloads/browser-interaction-automation-mtfbwm8g' '.agents/skills/automating-the-browser'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/browser-interaction-automation-mtfbwm8g'openskills read 'browser-interaction-automation-mtfbwm8g'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/browser-interaction-automation-mtfbwm8g/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Create Interactive Maps with kepler.gl
Data & AI
Create interactive map visualizations and export standalone HTML using the keplergl Python package. Use to plot geospatial data from DataFrames, GeoJSON, or CSV.
Agent-Driven Parameter Optimization
Data & AI
Guide for optimizing configurable systems with a measurable objective, using bounded trials and evidence-based recommendations.
ICP Visitor Outreach
Data & AI
Identify signed-up users matching the ideal customer profile but stalled, and draft personalized outreach to re-engage them.