kasm-browser
Skill5 starsChanged 6 months agoMITView on GitHub
Drive a persistent interactive browser via Chrome DevTools Protocol (KASM Chrome)
In this repositoryOne other file it gives its agents.
- browser-screenshotSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
When invoked, drive a persistent KASM Chrome browser using Chrome DevTools Protocol.
- Very specific: line 36
Wait for Page.loadEventFired before queuing a second navigation.
- Distinctive: line 53
Always check the target site's Terms of Service before automating against it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
KASM Browser via CDP
When invoked, drive a persistent KASM Chrome browser using Chrome DevTools Protocol. Use this when a flow needs login state, cookies that persist, captcha/2FA, or React-style synthetic events.
Inputs
action-- one of:navigate,click,type,screenshot,close_tab,evalurl-- target URL (fornavigate)selector-- CSS selector (forclick,type)text-- text to type (fortype)tab_id-- existing tab to target (optional; otherwise pick or create)output_path-- forscreenshotaction, where to save the PNG
Output
screenshotaction: file path to PNG.- Other actions: status + DOM snapshot or evaluated value.
Steps
- Confirm CDP reachable:
docker exec <container> curl -s http://localhost:9222/json/version. - List tabs:
docker exec <container> curl -s http://localhost:9222/json. - Pick or create the target tab; capture its
webSocketDebuggerUrl. - Open a WebSocket to that URL from inside the container.
- Send the CDP commands for the action, applying the Human-Speed Rule between every meaningful step.
- Capture results (DOM, screenshot, console output).
- Close the WebSocket; tidy up any tabs your flow created.
The Human-Speed Rule (mandatory)
Slow IS fast.
- Minimum 1.5-3 seconds between meaningful actions.
- Typing: one key at a time, 80-150 ms between keystrokes with jitter. Do NOT blast a full string via
input.value = "..."on sites that profile typing cadence. - Wait for
Page.loadEventFiredbefore queuing a second navigation. - Self-imposed rate limit: ~20 CDP calls per 10 seconds.
Bot-detection systems flag burst patterns even when intent is benign. Human-speed pacing is free immunity. Apply regardless of how impatient the user is.
Example: navigate + read title
const sock = new ws(tab.webSocketDebuggerUrl);
// ... open WS, set up send() helper ...
await send("Page.navigate", { url: "https://example.com" });
await new Promise(r => setTimeout(r, 3000)); // human-speed wait
const title = (await send("Runtime.evaluate", { expression: "document.title" })).result.result.value;Notes
- CDP is reachable only from inside the container -- always go via
docker exec. - For full setup, cross-host usage, common recipes, and troubleshooting, see
sops/SOP_Interactive_Browser_via_KASM_CDP.md. - Always check the target site's Terms of Service before automating against it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

