Introduction¶
When building agent toolchains, a common problem arises: standard HTTP scraping only retrieves raw responses. When encountering pages that rely on JavaScript rendering, such as SPAs, the returned content is essentially a shell; features like screenshots or PDF export are simply out of reach.
The philosophy behind DSH (DeepSeek Harness) is “Everything is a plugin”; browsing capabilities can also be integrated as plugins. dsh-cloudflare-browser-run addresses exactly this: it connects the headless Chrome provided by Cloudflare Browser Run to DSH, enabling agents to possess real browser-level web access capabilities.
What is it¶
dsh-cloudflare-browser-run is a DSH plugin maintained by RealAlexandreAI. Based on Cloudflare Browser Run (headless Chrome running on the Cloudflare network), it provides web browsing tools that support markdown scraping, screenshots, and PDF export for JavaScript-rendered pages.
It is a port of pi-cloudflare-browser-run, built according to the DSH (Cordis) plugin specification. The license is MIT, and it requires Node >= 20.0.0 to run.
Core Features¶
The plugin exposes three tools:
| Tool | Function |
|---|---|
browse |
Scrapes public URLs and returns clean markdown by default; action is optional screenshot | pdf |
screenshot |
Saves the page as a local PNG and returns the file path |
pdf |
Saves the page as a local PDF and returns the file path |
A few notable design points:
- Real browser access. The page is opened by a headless Chrome running on the Cloudflare network, allowing normal scraping of JavaScript-rendered pages (SPAs).
- SSRF Protection. Every URL is checked before the API is called.
localhost, private IPs, IPv6 literals, and addresses containing userinfo are directly rejected. The plugin only supports public web pages. - Credential Privacy. The API token only exists within the user’s configuration file; the plugin does not record or store it.
- Compliance Scraping. Browser Run identifies itself as a compliant bot during scraping.
Installation¶
Execute the following command in DSH to add the plugin to the web profile:
dsh plugin --profile web add dsh-cloudflare-browser-run
After installation, you must configure the Cloudflare credentials at the profile/settings level for the plugin to function properly.
Configuring Credentials¶
Add the following to your YAML configuration at the profile/settings level:
- id: cloudflare-browser-run
name: dsh-cloudflare-browser-run
config:
cf_api_token: <your token>
cf_account_id: <your account id>
How to obtain the two required items:
cf_api_token: Log in to the Cloudflare Dashboard → API Tokens → Create using the ‘Browser Rendering: Edit’ template. The token requires ‘Browser Rendering: Edit’ permissions.cf_account_id: Your account ID can be found in URLs likedash.cloudflare.com/<ACCOUNT_ID>/....
There are two optional configuration options:
cf_api_base: API base override;output_dir: Output directory for screenshots and PDFs; defaults to the system temporary directory.
Use Cases and Notes¶
Suitable scenarios:
- Scraping SPAs or other JavaScript-rendered pages to obtain clean markdown for feeding to the model;
- Scenarios requiring page archival as PDFs or screenshots;
- Accessing WebMCP sites or scenarios requiring a logged-in session.
Notes before use:
- The plugin only supports public web pages. Internal addresses will be rejected by SSRF protection, so do not expect it to access local services.
- The plugin runs with the permissions of the current DSH process. Before installation, it is recommended to review the source code and confirm that the license (MIT) meets your requirements.
- The runtime environment requires Node >= 20.0.0.
Conclusion¶
In short: dsh-cloudflare-browser-run fills the gap in DSH regarding JavaScript-rendered page scraping, screenshots, and PDF export using Cloudflare’s headless Chrome. Simply configure the two credentials to use it.
Repository: https://github.com/RealAlexandreAI/dsh-cloudflare-browser-run
Directory Page: https://www.skillhub.cn/plugins/RealAlexandreAI/dsh-cloudflare-browser-run (This link comes from a plugin submission lead; the community directory is an independent site with no official affiliation to DeepSeek / Fanghuang)