agentleFS
MrTrenchTruckerMrTrenchTrucker/contak-browser-skills/skills/kasm-browser/SKILL.md

kasm-browser

Skill5 starsChanged 6 months agoMITView on GitHub

Drive a persistent interactive browser via Chrome DevTools Protocol (KASM Chrome)

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
  1. Distinctive:

    When invoked, drive a persistent KASM Chrome browser using Chrome DevTools Protocol.

    line 8
  2. Very specific:

    Wait for Page.loadEventFired before queuing a second navigation.

    line 36
  3. Distinctive:

    Always check the target site's Terms of Service before automating against it.

    line 53

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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, eval
  • url -- target URL (for navigate)
  • selector -- CSS selector (for click, type)
  • text -- text to type (for type)
  • tab_id -- existing tab to target (optional; otherwise pick or create)
  • output_path -- for screenshot action, where to save the PNG

Output

  • screenshot action: file path to PNG.
  • Other actions: status + DOM snapshot or evaluated value.

Steps

  1. Confirm CDP reachable: docker exec <container> curl -s http://localhost:9222/json/version.
  2. List tabs: docker exec <container> curl -s http://localhost:9222/json.
  3. Pick or create the target tab; capture its webSocketDebuggerUrl.
  4. Open a WebSocket to that URL from inside the container.
  5. Send the CDP commands for the action, applying the Human-Speed Rule between every meaningful step.
  6. Capture results (DOM, screenshot, console output).
  7. 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.loadEventFired before 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.