cloudflare-experiments
Scaffolds and documents new Cloudflare Experiments across Cloudflare products (not Workers-only). Use when adding a new experiment, copying an experiment structure, or updating root or experiment READMEs and deploy buttons.
- License 许可
- MIT
- 最近更新
- 2026-10-06
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- cloudflare-experiments
- description
- Scaffolds and documents new Cloudflare Experiments across Cloudflare products (not Workers-only). Use when adding a new experiment, copying an experiment structure, or updating root or experiment READMEs and deploy buttons.
03 SKILL.md 正文
Cloudflare Experiments
Scope (read this first)
This monorepo is a catalog of deployable reference implementations across Cloudflare products - Workers AI, Durable Objects, D1, R2, KV, Queues, Workflows, Browser Rendering, Vectorize, Hyperdrive, Access, Email, Turnstile, Stream, Rate Limiting, Analytics Engine, and more.
It is not a Workers-only project. Workers are usually how examples ship and how products are wired together at the edge; each experiment still maps to a specific Cloudflare product or platform capability.
When writing docs, READMEs, agent guidance, or marketing copy: say Cloudflare products / platform, list concrete products, and only mention Workers as the typical deploy vehicle.
When to use
- Adding a new experiment to the repo.
- Scaffolding a new experiment (copy structure from an existing one).
- Updating documentation (root README or experiment README) or deploy buttons.
Adding a new experiment
- Scaffold: Copy an existing experiment folder (e.g.
apps/experiments/is-it-down) toapps/experiments/<new-name>. Keep the same layout:src/index.ts,src/routes/,src/lib/,src/utils/,src/constants/,src/types/,package.json,wrangler.json,tsconfig.json,README.md. - Implement: Replace route logic, add any bindings in
wrangler.jsonand type them insrc/types/env.d.ts. Do not share code with other experiments. Name the experiment after the product capability it demonstrates. - Tests: Add
test/with Vitest smoke + unit/route tests per experiment standards. - Document: Update the root README.md experiments table with name, description, and deploy link. In the experiment’s README, document purpose, API (query params, response shape), run locally, and deploy button. Lead with the Cloudflare product(s) shown, not "a Worker that…".
- Docs site: Add or update the Fumadocs page - run
node apps/docs/scripts/scaffold-experiment-doc.mjs <name>, fill TODOs from source, add toapps/docs/content/docs/meta.json. Follow the experiment-docs skill or Experiment Documentation Guide. Keep site-wide positioning product-first (apps/docs/lib/shared.tsproductScopeBlurb). - Deploy button: In the experiment README use:
[](https://deploy.workers.cloudflare.com/?url=https://github.com/<owner>/cloudflare-experiments/tree/main/apps/experiments/<name>)Replace<owner>and<name>with the real repo owner and experiment folder name.
Experiment structure reminder
src/index.ts: Hono app, mount routes,export default { fetch: app.fetch }(typical Worker entry).src/routes/*.ts: Route handlers; usejsonError/jsonSuccessfrom utils for consistent responses.src/types/env.d.ts: Env/bindings types for the Cloudflare products used.- Root
package.jsonprovides Turborepo, Prettier, and ESLint; each experiment is otherwise self-contained.
04 同仓库更多 Skills
whereami
Use when editing whereami. GET /whereami returns request.cf (country, city, colo, etc.); no bindings.
websocket-echo
Use when editing websocket-echo. GET /echo WebSocket upgrade; echoes messages.
website-to-llms-txt
Use when editing website-to-llms-txt. GET /llms.txt?url=; returns plain-text llms.txt format (title, description, links, contact); no bindings.
website-to-api
Use when editing website-to-api. GET /api?url=; returns structured title, headings, links, images.
website-metadata-extractor
Use when editing website-metadata-extractor. GET /metadata?url=; extracts title, description, canonical, og tags.
website-devtools-inspector
Use when editing website-devtools-inspector. GET /devtools?url=; headers, cookies, scripts, assets, metadata.