← 返回 Skills 市场
cytwyatt

Cloudflare Browser Rendering

作者 Yangtao Chen · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ✓ 安全检测通过
344
总下载
1
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install cloudflare-browser-rendering-skill
功能描述
Use Cloudflare Browser Rendering REST APIs to extract rendered webpage content as Markdown or crawl whole sites asynchronously. Use when normal web_fetch is...
使用说明 (SKILL.md)

Cloudflare Browser Rendering

Overview

Use this skill to bridge the gap between lightweight web_fetch and full interactive browser automation.

Routing rule:

  • Use web_fetch for simple static pages and quick reads.
  • Use this skill when content depends on JavaScript rendering or when you need to crawl many related pages.
  • Use browser when the task requires interaction such as login, clicking, typing, or manual flow control.

Quick decision guide

  • Single page, static, fastest path matters -> web_fetch
  • Single page, JS-heavy, want clean markdown -> /markdown
  • Whole docs/blog/help center crawl -> /crawl
  • Needs login/UI actions -> browser

If uncertain, start with web_fetch. Escalate to /markdown if the page is incomplete or empty. Escalate to /crawl only when multiple pages are needed.

Read references/decision-guide.md for routing details and references/*.md for endpoint notes.

Prerequisites

Expect these environment variables to be available before running the scripts:

  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID

The token needs Browser Rendering Write for /markdown and crawl creation. Reading crawl results can use Browser Rendering Read or Write.

Single-page extraction with /markdown

Use scripts/cf_markdown.py.

Examples:

python3 scripts/cf_markdown.py --url https://example.com
python3 scripts/cf_markdown.py --url https://example.com --wait-until networkidle0
python3 scripts/cf_markdown.py --url https://example.com --wait-until networkidle0 --timeout-ms 60000
python3 scripts/cf_markdown.py --url https://example.com --cache-ttl 0 --json
python3 scripts/cf_markdown.py --html '\x3Cdiv>Hello\x3C/div>'
python3 scripts/cf_markdown.py --url https://example.com --user-agent 'Mozilla/5.0 ...'
python3 scripts/cf_markdown.py --url https://example.com --cookies-json '[{"name":"session","value":"abc","domain":"example.com"}]'
python3 scripts/cf_markdown.py --url https://example.com --authenticate-json '{"username":"u","password":"p"}'
python3 scripts/cf_markdown.py --url https://example.com --reject-request-pattern-json '["/^.*\\\\.(css)$/"]'

Guidelines:

  • Prefer --wait-until networkidle0 or networkidle2 for SPA/JS-heavy pages.
  • If a JS-heavy page times out, first raise --timeout-ms (for example 60000), then consider falling back to domcontentloaded if full idle waiting is too slow.
  • Use --cache-ttl 0 when freshness matters more than speed.
  • Use --json when you want full API output for debugging.
  • Use raw JSON flags when you need advanced body fields without patching the script.

Multi-page crawling with /crawl

Use scripts/cf_crawl.py.

Examples:

python3 scripts/cf_crawl.py start --url https://developers.cloudflare.com/workers/ --depth 2 --limit 20 --format markdown
python3 scripts/cf_crawl.py wait --job-id \x3Cjob_id> --poll-seconds 5
python3 scripts/cf_crawl.py results --job-id \x3Cjob_id> --limit 20 --status completed
python3 scripts/cf_crawl.py run --url https://developers.cloudflare.com/workers/ --depth 2 --limit 20 --format markdown --wait
python3 scripts/cf_crawl.py run --url https://developers.cloudflare.com/workers/ --depth 2 --limit 20 --format markdown --wait --fetch-results --results-status completed --out-json out/crawl.json --out-markdown out/crawl.md
python3 scripts/cf_crawl.py start --url https://example.com --source links --goto-options-json '{"timeout":30000}'

Guidelines:

  • Keep initial crawls small: low depth and modest limit.
  • Use run --wait for one-shot jobs.
  • Use run --wait --fetch-results when you want a full one-command workflow.
  • Use start + wait + results when you want more control.
  • Poll lightly; do not tight-loop.
  • Prefer markdown format for downstream summarization or embeddings.
  • Use --out-json and --out-markdown for large outputs instead of dumping everything into chat.

Output handling

For large crawls:

  • First inspect summary fields: job status, total, finished, browser seconds used.
  • Then fetch filtered results, usually status=completed.
  • Avoid dumping huge markdown blobs into chat; summarize and point to saved output if needed.

Failure and fallback rules

  • If /markdown returns incomplete content, retry with --wait-until networkidle0.
  • If /crawl is overkill for the task, fall back to /markdown on key URLs.
  • If the site requires interaction or login, stop using this skill and switch to browser.
  • If the API is unavailable or credentials are missing, report that clearly and fall back to web_fetch when possible.

Resources

  • scripts/cf_markdown.py - rendered single-page Markdown extraction
  • scripts/cf_crawl.py - async crawl job helper
  • references/decision-guide.md - routing and fallback guidance
  • references/markdown-endpoint.md - focused notes on /markdown
  • references/crawl-endpoint.md - focused notes on /crawl
安全使用建议
This skill appears coherent and implements Cloudflare Browser Rendering calls as described. Before installing: (1) verify you trust the source repo/author and optionally review the included scripts; (2) provision a Cloudflare API token with the minimum required permissions (prefer Read for result-only workflows, Write only if creating crawls/markdown jobs); (3) avoid pasting site-login secrets or long-lived credentials into CLI flags unless necessary — the scripts will forward any provided authenticate/cookies JSON to Cloudflare; (4) control crawl scope (low depth/limit, avoid includeExternalLinks) to limit cost and data collection; and (5) be aware outputs may be written to disk if you use --out-json/--out-markdown. If you want extra assurance, run the scripts locally with a throwaway token and inspect network calls or review the GitHub repo history before using in production.
功能分析
Type: OpenClaw Skill Name: cloudflare-browser-rendering-skill Version: 0.1.1 The skill bundle provides a legitimate interface for Cloudflare's Browser Rendering and Crawling APIs. The Python scripts (cf_markdown.py and cf_crawl.py) use standard libraries to interact with official Cloudflare endpoints (api.cloudflare.com) using provided environment variables. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found; the instructions in SKILL.md are consistent with the stated purpose of content extraction and web crawling.
能力评估
Purpose & Capability
Name/description (Cloudflare Browser Rendering) align with what's required and present: the scripts call Cloudflare /markdown and /crawl endpoints and the skill only requests CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID and python3. There are no unrelated environment variables, binaries, or surprising capabilities.
Instruction Scope
SKILL.md and the included scripts explicitly instruct calling Cloudflare REST APIs and handling results; they reference only the declared env vars and the Cloudflare endpoints. The instructions do not ask the agent to read unrelated system files or exfiltrate data outside Cloudflare API usage. Note: the CLI accepts cookies/auth JSON flags which, if supplied, will be forwarded to Cloudflare as part of the render request (this is expected for authenticating target sites).
Install Mechanism
No install spec or external downloads are present (instruction-only with Python scripts included). Nothing is written to disk by an installer step; the scripts are plain Python using the stdlib HTTP client.
Credentials
The skill only requires the Cloudflare API token and account ID (appropriate for this purpose). However, the CLI flags allow embedding target-site credentials (authenticate-json, cookies-json) which will be sent to Cloudflare as part of the render job — be cautious supplying sensitive credentials via those flags or in shared contexts. Ensure the Cloudflare token uses least privilege (Browser Rendering Write only if needed).
Persistence & Privilege
The skill is not always-enabled, has no install-time persistence, and does not modify other skills or system-wide settings. It can be invoked autonomously (default) which is normal for skills and not a standalone concern here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cloudflare-browser-rendering-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cloudflare-browser-rendering-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
- Added an open source LICENSE file. - Updated SKILL.md to include an openclaw metadata block specifying environment requirements and a homepage link. - No changes to core functionality.
v0.1.0
Initial release: Adds Cloudflare Browser Rendering skill for advanced content extraction and crawling. - Provides REST API access for rendering and extracting Markdown from JavaScript-heavy pages. - Supports full-site asynchronous crawling for documentation and research. - Offers detailed decision guidance for when to use web_fetch, this skill, or full browser automation. - Includes Python scripts for /markdown and /crawl endpoint usage with authentication, timing, and fetch options. - Documents fallback and error handling procedures, environment prerequisites, and recommended output handling practices.
元数据
Slug cloudflare-browser-rendering-skill
版本 0.1.1
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 2
常见问题

Cloudflare Browser Rendering 是什么?

Use Cloudflare Browser Rendering REST APIs to extract rendered webpage content as Markdown or crawl whole sites asynchronously. Use when normal web_fetch is... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 344 次。

如何安装 Cloudflare Browser Rendering?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cloudflare-browser-rendering-skill」即可一键安装,无需额外配置。

Cloudflare Browser Rendering 是免费的吗?

是的,Cloudflare Browser Rendering 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cloudflare Browser Rendering 支持哪些平台?

Cloudflare Browser Rendering 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cloudflare Browser Rendering?

由 Yangtao Chen(@cytwyatt)开发并维护,当前版本 v0.1.1。

💬 留言讨论