Headless Chrome automation on Cloudflare Workers with Puppeteer and Playwright.
Works with
Supports both Puppeteer (v1.0.4) and Playwright (v1.1.0) for screenshots, PDFs, web scraping, and browser automation on Cloudflare's global network
Session reuse and browser context isolation for performance optimization; multiple tabs within a single browser to reduce concurrency usage
Includes 8 documented issue preventions covering XPath workarounds, binding configuration, timeouts, concurrency limits,
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versioncloudflare-browser-renderingExecute the skills CLI command in your project's root directory to begin installation:
Fetches cloudflare-browser-rendering from jezweb/claude-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate cloudflare-browser-rendering. Access via /cloudflare-browser-rendering in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
695
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
695
stars
Production-ready knowledge domain for building browser automation workflows with Cloudflare Browser Rendering.
Status: Production Ready ✅ Last Updated: 2026-01-21 Dependencies: cloudflare-worker-base (for Worker setup) Latest Versions: @cloudflare/[email protected], @cloudflare/[email protected], [email protected]
Recent Updates (2025):
wrangler.jsonc:
{
"name": "browser-worker",
"main": "src/index.ts",
"compatibility_date": "2023-03-14",
"compatibility_flags": ["nodejs_compat"],
"browser": {
"binding": "MYBROWSER"
}
}
Why nodejs_compat? Browser Rendering requires Node.js APIs and polyfills.
npm install @cloudflare/puppeteer
import puppeteer from "@cloudflare/puppeteer";
interface Env {
MYBROWSER: Fetcher;
}
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const { searchParams } = new URL(request.url);
const url = searchParams.get("url") || "https://example.com";
// Launch browser
const browser = await puppeteer.launch(env.MYBROWSER);
const page = await browser.newPage();
// Navigate and capture
await page.goto(url);
const screenshot = await page.screenshot();
// Clean up
await browser.close();
return new Response(screenshot, {
headers: { "content-type": "image/png" }
});
}
};
npx wrangler deploy
Test at: https://your-worker.workers.dev/?url=https://example.com
CRITICAL:
env.MYBROWSER to puppeteer.launch() (not undefined)browser.close() when done (or use browser.disconnect() for session reuse)nodejs_compat compatibility flagCloudflare Browser Rendering provides headless Chromium browsers running on Cloudflare's global network. Use familiar tools like Puppeteer and Playwright to automate browser tasks:
| Method | Best For | Complexity |
|---|---|---|
| Workers Bindings | Complex automation, custom workflows, session management | Advanced |
| REST API | Simple screenshot/PDF tasks | Simple |
This skill covers Workers Bindings (the advanced method with full Puppeteer/Playwright APIs).
| Feature | Puppeteer | Playwright |
|---|---|---|
| API Familiarity | Most popular | Growing adoption |
| Package | @cloudflare/[email protected] |
@cloudflare/[email protected] |
| Session Management | ✅ Advanced APIs | ⚠️ Basic |
| Browser Support | Chromium only | Chromium only (Firefox/Safari not yet supported) |
| Best For | Screenshots, PDFs, scraping | Testing, frontend automation |
Recommendation: Use Puppeteer for most use cases. Playwright is ideal if you're already using it for testing.
Core APIs (complete reference: https://pptr.dev/api/):
Global Functions:
puppeteer.launch(env.MYBROWSER, options?) - Launch new browser (CRITICAL: must pass binding)puppeteer.connect(env.MYBROWSER, sessionId) - Connect to existing sessionpuppeteer.sessions(env.MYBROWSER) - List running sessionspuppeteer.history(env.MYBROWSER) - List recent sessions (open + closed)puppeteer.limits(env.MYBROWSER) - Check account limitsBrowser Methods:
browser.newPage() - Create new tab (preferred over launching new browsers)browser.sessionId() - Get session ID for reusebrowser.close() - Terminate sessionbrowser.disconnect() - Keep session alive for reusebrowser.createBrowserContext() - Isolated incognito context (separate cookies/cache)Page Methods:
page.goto(url, { waitUntil, timeout }) - Navigate (use "networkidle0" for dynamic content)page.screenshot({ fullPage, type, quality, clip }) - Capture imagepage.pdf({ format, printBackground, margin }) - Generate PDFpage.evaluate(() => ...) - Execute JS in browser (data extraction, XPath workaround)page.content() / page.setContent(html) - Get/set HTMLpage.waitForSelector(selector) - Wait for elementpage.type(selector, text) / page.click(selector) - Form interactionCritical Patterns:
// Must pass binding
const browser = await puppeteer.launch(env.MYBROWSER); // ✅
// const browser = await puppeteer.launch(); // ❌ Error!
// Session reuse for performance
const sessions = await puppeteer.sessions(env.MYBROWSER);
const freeSessions = sessions.filter(s => !s.connectionId);
if (freeSessions.length > 0) {
browser = await puppeteer.connect(env.MYBROWSER, freeSessions[0].sessionId);
}
// Keep session alive
await browser.disconnect(); // Don't close
// XPath workaround (not directly supported)
const data = await page.evaluate(() => {
return new XPathEvaluator()
.createExpression("/html/body/div/h1")
.evaluate(document, XPathResult.FIRST_ORDERED_NODE_TYPE)
.singleNodeValue.innerHTML;
});
Status: GA (Sept 2025) - Playwright v1.55, MCP v0.0.30 support, local dev support ([email protected]+)
Installation:
npm install @cloudflare/playwright
Configuration Requirements (2025 Update):
{
"compatibility_flags": ["nodejs_compat"],
"compatibility_date": "2025-09-15" // Required for Playwright v1.55
}
Basic Usage:
import { chromium } from "@cloudflare/playwright";
const browser = await chromium.launch(env.BROWSER);
const page = await browser.newPage();
await page.goto("https://example.com");
const screenshot = await page.screenshot();
await browser.close();
Puppeteer vs Playwright:
puppeteer vs { chromium } from "@cloudflare/playwright"waitForSelector()Recommendation: Use Puppeteer for session reuse patterns. Use Playwright if migrating existing tests or need MCP integration.
Official Docs: https://developers.cloudflare.com/browser-rendering/playwright/
Why: Launching new browsers is slow and consumes concurrency limits. Reuse sessions for faster response, lower concurrency usage, better resource utilization.
async function getBrowser(env: Env): Promise<Browser> {
const sessions = await puppeteer.sessions(env.MYBROWSER);
const freeSessions = sessions.Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
wordpress-elementor
129jezweb/claude-skills
Productivitysame reporeact-native
22jezweb/claude-skills
Frontendsame repozustand-state-management
7jezweb/claude-skills
Productivitysame repoonboarding-ux
4jezweb/claude-skills
Productivitysame reporeact-hook-form-zod
4jezweb/claude-skills
Frontendsame repoicon-set-generator
4jezweb/claude-skills
Productivitysame repoReviews
4.5★★★★★70 reviews- IIsabella Johnson★★★★★Dec 20, 2024
cloudflare-browser-rendering reduced setup friction for our internal harness; good balance of opinion and flexibility.
- CChen Gill★★★★★Dec 16, 2024
We added cloudflare-browser-rendering from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- CChaitanya Patil★★★★★Dec 12, 2024
cloudflare-browser-rendering fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- OOmar Torres★★★★★Dec 4, 2024
cloudflare-browser-rendering fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- RRen Chawla★★★★★Nov 23, 2024
Registry listing for cloudflare-browser-rendering matched our evaluation — installs cleanly and behaves as described in the markdown.
- RRen Agarwal★★★★★Nov 11, 2024
We added cloudflare-browser-rendering from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- AAditi Verma★★★★★Nov 7, 2024
cloudflare-browser-rendering reduced setup friction for our internal harness; good balance of opinion and flexibility.
- PPiyush G★★★★★Nov 3, 2024
Registry listing for cloudflare-browser-rendering matched our evaluation — installs cleanly and behaves as described in the markdown.
- AAditi Robinson★★★★★Oct 26, 2024
Registry listing for cloudflare-browser-rendering matched our evaluation — installs cleanly and behaves as described in the markdown.
- SShikha Mishra★★★★★Oct 22, 2024
cloudflare-browser-rendering reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 70
1 / 7Discussion
Comments — not star reviews- No comments yet — start the thread.