secondsky/claude-skills / plugins/cloudflare-browser-rendering/skills/cloudflare-browser-rendering
cloudflare-browser-rendering
VerifiedCloudflare Browser Rendering with Puppeteer/Playwright. Use for screenshots, PDFs, web scraping, or encountering rendering errors, timeout issues, memory exceeded.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 15.7 KB |
| references/common-errors.md | markdown | 14.9 KB |
| references/patterns.md | markdown | 12.6 KB |
| references/pricing-and-limits.md | markdown | 13.9 KB |
| references/puppeteer-api.md | markdown | 11.8 KB |
| references/puppeteer-vs-playwright.md | markdown | 15.1 KB |
| references/session-management.md | markdown | 16.4 KB |
| scripts/check-versions.shexecutable | script | 1.2 KB |
| templates/ai-enhanced-scraper.ts | script | 3.7 KB |
| templates/basic-screenshot.ts | script | 1.8 KB |
| templates/pdf-generation.ts | script | 2.8 KB |
| templates/playwright-example.ts | script | 2.7 KB |
| templates/screenshot-with-kv-cache.ts | script | 2.7 KB |
| templates/session-reuse.ts | script | 3.5 KB |
| templates/web-scraper-basic.ts | script | 2.9 KB |
| templates/web-scraper-batch.ts | script | 3.1 KB |
| templates/wrangler-browser-config.jsonc | other | 3.1 KB |
templates/wrangler-browser-config.jsonc
View on GitHub// Complete wrangler.jsonc configuration for Browser Rendering
{
"name": "browser-worker",
"main": "src/index.ts",
"compatibility_date": "2023-03-14",
// REQUIRED: nodejs_compat flag for Browser Rendering
"compatibility_flags": [
"nodejs_compat"
],
// Browser binding (required)
"browser": {
"binding": "MYBROWSER"
// Optional: Use real headless browser during local development
// "remote": true
},
// Optional: KV for caching screenshots/PDFs
// Create with: npx wrangler kv namespace create SCREENSHOT_CACHE
// npx wrangler kv namespace create SCREENSHOT_CACHE --preview
"kv_namespaces": [
{
"binding": "SCREENSHOT_CACHE",
"id": "YOUR_KV_ID", // Replace with actual ID
"preview_id": "YOUR_PREVIEW_ID" // Replace with actual preview ID
}
],
// Optional: R2 for storing generated files
// Create with: npx wrangler r2 bucket create browser-files
"r2_buckets": [
{
"binding": "BROWSER_FILES",
"bucket_name": "browser-files"
}
],
// Optional: AI binding for AI-enhanced scraping
"ai": {
"binding": "AI"
},
// Optional: D1 for storing scraping results
// Create with: npx wrangler d1 create browser-db
"d1_databases": [
{
"binding": "DB",
"database_name": "browser-db",
"database_id": "YOUR_DB_ID"
}
],
// Optional: Environment variables
"vars": {
"ENVIRONMENT": "production"
},
// Optional: Secrets (set with: npx wrangler secret put SECRET_NAME)
// "secrets": ["API_KEY"]
// Optional: Custom routes for production
// "routes": [
// {
// "pattern": "browser.example.com/*",
// "zone_name": "example.com"
// }
// ]
}
/**
* Key Configuration Notes:
*
* 1. nodejs_compat flag is REQUIRED
* - Browser Rendering needs Node.js APIs
* - Automatically enables nodejs_compat_v2 if compatibility_date >= 2024-09-23
*
* 2. Browser binding name
* - Use "MYBROWSER" or any name you prefer
* - Reference in code: env.MYBROWSER
*
* 3. Remote binding for local development
* - "remote": true connects to real headless browser
* - Useful if hitting 1MB request limit in local dev
* - Remove for production (not needed)
*
* 4. KV for caching
* - Highly recommended for production screenshot services
* - Reduces browser usage and costs
* - Cache TTL: typically 1-24 hours
*
* 5. R2 for file storage
* - Store generated PDFs or screenshots long-term
* - Cheaper than KV for large files
* - Use presigned URLs for downloads
*
* 6. AI binding
* - Optional: for AI-enhanced scraping
* - Requires Workers Paid plan
* - See cloudflare-workers-ai skill
*
* 7. D1 database
* - Optional: store scraping metadata
* - Track URLs, timestamps, status
* - See cloudflare-d1 skill
*
* Commands:
* npx wrangler dev # Local development
* npx wrangler deploy # Deploy to production
* npx wrangler tail # View logs
*
* See also:
* - cloudflare-worker-base skill for complete Worker setup
* - cloudflare-kv skill for KV caching patterns
* - cloudflare-r2 skill for R2 storage patterns
*/
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |