Guide · Agent skill
How to use the Cloudflare Browser Control agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The cloudflare-browser skill teaches an AI agent to control a headless Chrome browser (one with no window) hosted by Cloudflare Browser Rendering, using the Chrome DevTools Protocol over a WebSocket connection. This guide is for developers who already run a Cloudflare Worker that exposes Browser Rendering, and it explains what the skill does, how to install it, how to configure it and how to ask the agent for work. By the end you will know what you need in place before installing and how to run the bundled screenshot and video scripts.
Quick start
- 1Check the requirements. Confirm you have a Cloudflare account with Browser Rendering, a deployed Worker that exposes /cdp, Node.js with the ws package, and ffmpeg if you want video.
- 2Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder.
- 3Or upload the ZIP in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP instead.
- 4Set the environment variables and profile. Set CDP_SECRET and WORKER_URL, then add a browser profile with a cdpUrl pointing to your Worker's /cdp endpoint in openclaw.json.
- 5Ask for a screenshot or video. Request the browser task in plain language, or run scripts/screenshot.js or scripts/video.js directly with the path to the skill folder.
What the skill lets the agent do
Once the skill is installed, the agent can control a headless Chrome browser for tasks such as screenshots, page navigation, scraping and video capture. The skill is written for environments where browser automation is needed inside a Cloudflare Workers setup.
- Save a screenshot of a web page as a PNG file with scripts/screenshot.js
- Record several pages into one MP4 video with scripts/video.js
- Reference code for navigating pages, scrolling and setting the viewport size
What you need before you install
The skill does not work on its own. The source requires a Cloudflare account with Browser Rendering and a deployed Worker that exposes a /cdp endpoint. You also need the following on the machine that runs the skill.
- Node.js, and the ws npm package
- A CDP_SECRET environment variable
- A WORKER_URL environment variable, which the scripts use
- ffmpeg, only if you want video capture
- An openclaw.json browser profile with a cdpUrl
Install the skill from the ZIP or the Claude apps
Download the ZIP for this skill from this page. You can install it in one of two ways.
To install it for yourself across projects, unzip it into ~/.claude/skills/. To install it for a single project, unzip it into that project's .claude/skills/ folder. The skill folder must be named cloudflare-browser and contain SKILL.md and the scripts folder.
If you use the Claude apps, you can upload the ZIP instead under Settings → Capabilities → Skills.
Configure the browser profile and secret
Set the CDP_SECRET environment variable so it matches your Worker's configuration. Then add a browser profile to openclaw.json whose cdpUrl points to your Worker's /cdp endpoint. The source shows the structure below; replace the placeholder URL with your own Worker address and secret.
- If the connection hangs, check that CDP_SECRET matches the Worker configuration
"browser": {
"profiles": {
"cloudflare": {
"cdpUrl": "https://your-worker.workers.dev/cdp?secret=..."
}
}
}Run the bundled scripts
The skill includes two command-line scripts. Replace /path/to/ with the location where you installed the skill. The screenshot script takes a URL and an output file name. The video script takes a comma-separated list of URLs and an output file name.
Video capture works by saving frames as PNGs during navigation and then stitching them with ffmpeg. The source gives this ffmpeg command for that step.
- scripts/cdp-client.js holds the connection code the other scripts use
- scripts/screenshot.js captures one page
- scripts/video.js records several pages
node /path/to/skills/cloudflare-browser/scripts/screenshot.js https://example.com output.png
node /path/to/skills/cloudflare-browser/scripts/video.js "https://site1.com,https://site2.com" output.mp4
ffmpeg -framerate 10 -i frame_%04d.png -c:v libx264 -pix_fmt yuv420p output.mp4Ask the agent for browser work in plain language
You do not need to type script paths yourself once the skill is installed. The skill is meant to be used when the agent needs browser automation in a Cloudflare Workers environment, so ask for the outcome you want. The agent decides when to use the skill based on the request.
Good requests name the page, the action and the output. For example, you might ask the agent to take a screenshot of a specific URL and save it, or to capture several pages into a single video. Keep requests tied to the Cloudflare setup you have configured.
- Take a screenshot of https://example.com and save it as output.png
- Record a short video that covers https://site1.com and https://site2.com
- Scroll down a page and capture what is visible
Safety notes before you use it
The skill runs scripts and uses the network. The browser runs remotely on Cloudflare, not on your machine. The source also states that the secret is passed in the WebSocket URL query string, so it can appear in logs.
For that reason, avoid using this skill on sensitive or logged-in sites. Keep CDP_SECRET out of shared logs and treat your Worker URL with the secret as a credential.
- Do not use it on sensitive or logged-in sites
- Treat the secret in the WebSocket URL as something that may appear in logs
- Only run scripts from skills you trust
Troubleshoot common problems
The source lists three common failures and how to handle them. Most are timing issues rather than configuration errors.
- No target created: this is a race condition. Wait for the Target.targetCreated event with a timeout.
- Commands time out: the Worker may have a cold start delay. Increase the timeout to 30-60 seconds.
- WebSocket hangs: check that CDP_SECRET matches the Worker configuration.
What people use it for
- Saving a PNG screenshot of a public web page for a report or review
- Recording several pages into one MP4 for a short walkthrough
- Scraping page content from inside an existing Cloudflare Workers setup
- Checking how a page looks at a set viewport size using the reference code
Frequently asked questions
How do I install the cloudflare-browser skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills instead.
What do I need to run the cloudflare-browser skill?
You need Node.js with the ws npm package, a Cloudflare account with Browser Rendering, and a deployed Worker that exposes /cdp. You also need the CDP_SECRET and WORKER_URL environment variables, a browser profile with cdpUrl in openclaw.json, and ffmpeg if you want video capture.
Is the cloudflare-browser skill free?
The skill is licensed under Apache-2.0. The source does not state pricing for Cloudflare Browser Rendering or your Worker, so check your Cloudflare account for those costs.
Why does the cloudflare-browser skill need a Cloudflare Worker?
The skill connects to Chrome through a WebSocket to a Worker endpoint at /cdp, which relays the connection to Cloudflare Browser Rendering. Without a deployed Worker and a matching CDP_SECRET, the scripts have nothing to connect to.
Can I use the cloudflare-browser skill for logged-in or sensitive sites?
The source advises against it. The browser runs remotely on Cloudflare, and the secret is passed in the WebSocket URL query string, so it can appear in logs.
Why does my cloudflare-browser connection hang or time out?
The source says to check that CDP_SECRET matches your Worker configuration if the WebSocket hangs. For timeouts, the Worker may have a cold start delay, so increase the timeout to 30-60 seconds. If no target is created, wait for the Target.targetCreated event with a timeout.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you already run a Cloudflare Worker that exposes Browser Rendering over CDP and want an AI agent to take screenshots or record page captures inside that setup. Pick something else if you do not have a Cloudflare account or Worker, or if you need to automate sensitive or logged-in sites, since the secret can appear in logs.
Download the skill