Skip to content

Cloudflare Browser Control

Lets an agent drive a headless Chrome via Cloudflare to take screenshots and capture page video

Stars
9,944
Licence
Apache-2.0
Files
4 files

What it does

This skill teaches an AI agent to control a headless (no window) Chrome browser hosted by Cloudflare Browser Rendering, using the Chrome DevTools Protocol over a WebSocket connection. Once installed, the agent can run the bundled scripts to save a screenshot of a web page or record several pages into an MP4 video, and it has reference code for navigating, scrolling and setting the viewport. It requires you to deploy your own Cloudflare Worker that relays the connection, and it is meant for environments where you already run that setup.

Great for

  • Developers who already run a Cloudflare Worker that exposes Browser Rendering over CDP
  • Teams automating screenshots or page captures from an AI agent inside a Cloudflare-based setup

Skip it if

  • Non-developers without a Cloudflare account or Worker deployment, since setup requires a CDP_SECRET, a WORKER_URL and a browser profile configuration
  • Use on sensitive or logged-in sites: the browser runs remotely on Cloudflare and the secret is passed in the WebSocket URL query string, so it can appear in logs

Try asking

  • “Take a screenshot of https://example.com and save it as output.png”
  • “Record a short MP4 video that browses three product pages in sequence”
  • “Scrape the rendered text of a JavaScript-heavy page after it loads”
Step-by-step guide: how to use Cloudflare Browser ControlInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 4 original files, the Apache-2.0 licence and an attribution note.

    cloudflare-browser.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip cloudflare-browser.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip cloudflare-browser.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Store CDP_SECRET in an environment variable and rotate it if the Worker URL with secret was ever shared or logged
  • Increase timeouts to 30-60 seconds if the Worker has cold-start delays
  • Use the video script with --fps and --scroll flags to control the recording; confirm ffmpeg is installed first

What's inside

  • scripts/cdp-client.js
  • scripts/screenshot.js
  • scripts/video.js
  • SKILL.md

Redistributed unmodified from cloudflare/moltworker under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.