cloudflare-browser

Automate browser rendering tasks via CDP WebSocket in Cloudflare Workers.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/sahiixx/moltworker --skill cloudflare-browser-sahiixx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-browser
Source: https://github.com/sahiixx/moltworker/tree/main/skills/cloudflare-browser
Command: npx skills add https://github.com/sahiixx/moltworker --skill cloudflare-browser-sahiixx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ws, and includes scripts (resource) components.

What problem does it solve?

This skill enables automated browser-based tasks inside Cloudflare Browser Rendering, allowing you to render pages, capture screenshots, and generate video frames without leaving the Cloudflare environment. This simplifies automated testing, content capture, and archiving of web content.

Core Features & Use Cases

  • Headless browser control via CDP over WebSocket to navigate to URLs, capture screenshots, and set viewport sizes.
  • Video frame capture by stitching multiple screenshots for simple page walkthroughs or demonstrations.
  • Use Case: Generate a quick demo video by visiting a list of URLs and exporting frames to a video file.

Quick Start

Use environment variables CDP_SECRET and WORKER_URL to configure access to Cloudflare Browser Rendering. Then run node scripts in the skills/cloudflare-browser directory, for example:

  • Set secrets: export CDP_SECRET=your-secret export WORKER_URL=your-worker-url
  • Take a screenshot: node skills/cloudflare-browser/scripts/screenshot.js https://example.com output.png
  • Create a video from multiple URLs: node skills/cloudflare-browser/scripts/video.js "https://example.com,https://example.org" output.mp4 --fps 10 --scroll

Frequently Asked Questions about cloudflare-browser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate screenshot capture in Cloudflare Browser Rendering?

Automate screenshot capture in Cloudflare Browser Rendering by running a Node.js script that uses the ws library to connect via CDP WebSocket, navigate to a URL, and save the output to a PNG file.

Can I generate video frames from multiple URLs using a headless browser in Cloudflare Workers?

Yes, you can generate video frames from multiple URLs by stitching together screenshots captured during page navigation, exporting the sequence into an MP4 file with configurable frames per second and scrolling options.

What environment variables do I need to control a headless browser via CDP in Cloudflare?

To control a headless browser via CDP in Cloudflare, you need the CDP_SECRET environment variable for authentication and the WORKER_URL to route WebSocket connections to your configured Cloudflare Browser Rendering worker.

Does Cloudflare Browser Rendering support viewport resizing for automated web testing?

Yes, Cloudflare Browser Rendering supports viewport resizing for automated web testing, allowing you to set custom viewport sizes dynamically through CDP WebSocket commands before capturing page screenshots.

Why use the ws library for browser automation tasks inside Cloudflare Workers?

Use the ws library for browser automation tasks inside Cloudflare Workers because it provides the WebSocket client implementation required to communicate directly with Cloudflare Browser Rendering CDP endpoints.