cloudflare-expert
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCloudflare Platform Skill
Cloudflare平台技能指南
Consolidated skill for building on the Cloudflare platform. Use decision trees below to find the right product, then load detailed references.
这是一份在Cloudflare平台上进行开发的综合技能指南。使用下方的决策树找到合适的产品,然后查看详细参考文档。
How to Use This Skill
如何使用本技能指南
Reference File Structure
参考文件结构
Each product in contains a as the entry point, which may be structured in one of two ways:
./references/<product>/README.mdMulti-file format (5 files):
| File | Purpose | When to Read |
|---|---|---|
| Overview, when to use, getting started | Always read first |
| Runtime API, types, method signatures | Writing code |
| wrangler.toml, bindings, setup | Configuring a project |
| Common patterns, best practices | Implementation guidance |
| Pitfalls, limitations, edge cases | Debugging, avoiding mistakes |
Single-file format: All information consolidated in .
README.md./references/<product>/README.md多文件格式(5个文件):
| 文件 | 用途 | 阅读时机 |
|---|---|---|
| 概述、适用场景、入门指南 | 务必首先阅读 |
| 运行时API、类型定义、方法签名 | 编写代码时 |
| wrangler.toml配置、绑定设置、项目初始化 | 配置项目时 |
| 常见模式、最佳实践 | 实现功能时参考 |
| 陷阱、限制、边缘案例 | 调试问题、避免错误时 |
单文件格式: 所有信息整合在中。
README.mdReading Order
阅读顺序
- Start with
README.md - Then read additional files relevant to your task (if multi-file format):
- Building feature → +
api.mdpatterns.md - Setting up project →
configuration.md - Troubleshooting →
gotchas.md
- Building feature →
- 从开始
README.md - 然后根据任务需求阅读相关的附加文件(如果是多文件格式):
- 开发功能 → +
api.mdpatterns.md - 搭建项目 →
configuration.md - 故障排查 →
gotchas.md
- 开发功能 →
Example Paths
示例路径
./references/workflows/README.md # Start here for Workflows
./references/workflows/api.md # Workflow class, step methods
./references/durable-objects/gotchas.md # DO limitations
./references/workers-ai/README.md # Single-file - all Workers AI docs./references/workflows/README.md # Workflows从这里开始
./references/workflows/api.md # Workflow类、步骤方法
./references/durable-objects/gotchas.md # Durable Objects限制
./references/workers-ai/README.md # 单文件格式 - 包含Workers AI所有文档Quick Decision Trees
快速决策树
"I need to run code"
"我需要运行代码"
Need to run code?
├─ Serverless functions at the edge → workers/
├─ Full-stack web app with Git deploys → pages/
├─ Stateful coordination/real-time → durable-objects/
├─ Long-running multi-step jobs → workflows/
├─ Run containers → containers/
├─ Multi-tenant (customers deploy code) → workers-for-platforms/
└─ Scheduled tasks (cron) → cron-triggers/我需要运行代码?
├─ 边缘无服务器函数 → workers/
├─ 支持Git部署的全栈Web应用 → pages/
├─ 有状态协调/实时功能 → durable-objects/
├─ 长时间运行的多步骤任务 → workflows/
├─ 运行容器 → containers/
├─ 多租户(客户部署代码) → workers-for-platforms/
└─ 定时任务(cron) → cron-triggers/"I need to store data"
"我需要存储数据"
Need storage?
├─ Key-value (config, sessions, cache) → kv/
├─ Relational SQL → d1/ (SQLite) or hyperdrive/ (existing Postgres/MySQL)
├─ Object/file storage (S3-compatible) → r2/
├─ Message queue (async processing) → queues/
├─ Vector embeddings (AI/semantic search) → vectorize/
├─ Strongly-consistent per-entity state → durable-objects/ (DO storage)
├─ Secrets management → secrets-store/
└─ Streaming ETL to R2 → pipelines/我需要存储数据?
├─ 键值存储(配置、会话、缓存) → kv/
├─ 关系型SQL → d1/(SQLite)或 hyperdrive/(现有Postgres/MySQL)
├─ 对象/文件存储(兼容S3) → r2/
├─ 消息队列(异步处理) → queues/
├─ 向量嵌入(AI/语义搜索) → vectorize/
├─ 强一致性单实体状态 → durable-objects/(DO存储)
├─ 密钥管理 → secrets-store/
└─ 流式ETL到R2 → pipelines/"I need AI/ML"
"我需要AI/机器学习"
Need AI?
├─ Run inference (LLMs, embeddings, images) → workers-ai/
├─ Vector database for RAG/search → vectorize/
├─ Build stateful AI agents → agents-sdk/
├─ Gateway for any AI provider (caching, routing) → ai-gateway/
└─ AI-powered search widget → ai-search/我需要AI/机器学习?
├─ 运行推理(大语言模型、嵌入、图像) → workers-ai/
├─ 用于RAG/搜索的向量数据库 → vectorize/
├─ 构建有状态AI代理 → agents-sdk/
├─ 任意AI提供商网关(缓存、路由) → ai-gateway/
└─ AI驱动的搜索组件 → ai-search/"I need networking/connectivity"
"我需要网络/连接"
Need networking?
├─ Expose local service to internet → tunnel/
├─ TCP/UDP proxy (non-HTTP) → spectrum/
├─ WebRTC TURN server → turn/
├─ Private network connectivity → network-interconnect/
├─ Optimize routing → argo-smart-routing/
└─ Real-time video/audio → realtimekit/ or realtime-sfu/我需要网络/连接?
├─ 将本地服务暴露到互联网 → tunnel/
├─ TCP/UDP代理(非HTTP) → spectrum/
├─ WebRTC TURN服务器 → turn/
├─ 私有网络连接 → network-interconnect/
├─ 优化路由 → argo-smart-routing/
└─ 实时音视频 → realtimekit/ 或 realtime-sfu/"I need security"
"我需要安全防护"
Need security?
├─ Web Application Firewall → waf/
├─ DDoS protection → ddos/
├─ Bot detection/management → bot-management/
├─ API protection → api-shield/
├─ CAPTCHA alternative → turnstile/
└─ Credential leak detection → waf/ (managed ruleset)我需要安全防护?
├─ Web应用防火墙 → waf/
├─ DDoS防护 → ddos/
├─ 机器人检测/管理 → bot-management/
├─ API防护 → api-shield/
├─ CAPTCHA替代方案 → turnstile/
└─ 凭证泄露检测 → waf/(托管规则集)"I need media/content"
"我需要媒体/内容处理"
Need media?
├─ Image optimization/transformation → images/
├─ Video streaming/encoding → stream/
├─ Browser automation/screenshots → browser-rendering/
└─ Third-party script management → zaraz/我需要媒体/内容处理?
├─ 图片优化/转换 → images/
├─ 视频流/编码 → stream/
├─ 浏览器自动化/截图 → browser-rendering/
└─ 第三方脚本管理 → zaraz/"I need infrastructure-as-code"
"我需要基础设施即代码"
Need IaC?
├─ Pulumi → pulumi/
├─ Terraform → terraform/
└─ Direct API → api/我需要基础设施即代码?
├─ Pulumi → pulumi/
├─ Terraform → terraform/
└─ 直接API调用 → api/Product Index
产品索引
Compute & Runtime
计算与运行时
| Product | Entry File |
|---|---|
| Workers | |
| Pages | |
| Pages Functions | |
| Durable Objects | |
| Workflows | |
| Containers | |
| Workers for Platforms | |
| Cron Triggers | |
| Tail Workers | |
| Snippets | |
| Smart Placement | |
| 产品 | 入口文件 |
|---|---|
| Workers | |
| Pages | |
| Pages Functions | |
| Durable Objects | |
| Workflows | |
| Containers | |
| Workers for Platforms | |
| Cron Triggers | |
| Tail Workers | |
| Snippets | |
| Smart Placement | |
Storage & Data
存储与数据
| Product | Entry File |
|---|---|
| KV | |
| D1 | |
| R2 | |
| Queues | |
| Hyperdrive | |
| DO Storage | |
| Secrets Store | |
| Pipelines | |
| R2 Data Catalog | |
| R2 SQL | |
| 产品 | 入口文件 |
|---|---|
| KV | |
| D1 | |
| R2 | |
| Queues | |
| Hyperdrive | |
| DO Storage | |
| Secrets Store | |
| Pipelines | |
| R2 Data Catalog | |
| R2 SQL | |
AI & Machine Learning
AI与机器学习
| Product | Entry File |
|---|---|
| Workers AI | |
| Vectorize | |
| Agents SDK | |
| AI Gateway | |
| AI Search | |
| 产品 | 入口文件 |
|---|---|
| Workers AI | |
| Vectorize | |
| Agents SDK | |
| AI Gateway | |
| AI Search | |
Networking & Connectivity
网络与连接
| Product | Entry File |
|---|---|
| Tunnel | |
| Spectrum | |
| TURN | |
| Network Interconnect | |
| Argo Smart Routing | |
| Workers VPC | |
| 产品 | 入口文件 |
|---|---|
| Tunnel | |
| Spectrum | |
| TURN | |
| Network Interconnect | |
| Argo Smart Routing | |
| Workers VPC | |
Security
安全防护
| Product | Entry File |
|---|---|
| WAF | |
| DDoS Protection | |
| Bot Management | |
| API Shield | |
| Turnstile | |
| 产品 | 入口文件 |
|---|---|
| WAF | |
| DDoS Protection | |
| Bot Management | |
| API Shield | |
| Turnstile | |
Media & Content
媒体与内容处理
| Product | Entry File |
|---|---|
| Images | |
| Stream | |
| Browser Rendering | |
| Zaraz | |
| 产品 | 入口文件 |
|---|---|
| Images | |
| Stream | |
| Browser Rendering | |
| Zaraz | |
Real-Time Communication
实时通信
| Product | Entry File |
|---|---|
| RealtimeKit | |
| Realtime SFU | |
| 产品 | 入口文件 |
|---|---|
| RealtimeKit | |
| Realtime SFU | |
Developer Tools
开发者工具
| Product | Entry File |
|---|---|
| Wrangler | |
| Miniflare | |
| C3 | |
| Observability | |
| Analytics Engine | |
| Web Analytics | |
| Sandbox | |
| Workerd | |
| Workers Playground | |
| 产品 | 入口文件 |
|---|---|
| Wrangler | |
| Miniflare | |
| C3 | |
| Observability | |
| Analytics Engine | |
| Web Analytics | |
| Sandbox | |
| Workerd | |
| Workers Playground | |
Infrastructure as Code
基础设施即代码
| Product | Entry File |
|---|---|
| Pulumi | |
| Terraform | |
| API | |
| 产品 | 入口文件 |
|---|---|
| Pulumi | |
| Terraform | |
| API | |
Other Services
其他服务
| Product | Entry File |
|---|---|
| Email Routing | |
| Email Workers | |
| Static Assets | |
| Bindings | |
| Cache Reserve | |
| 产品 | 入口文件 |
|---|---|
| Email Routing | |
| Email Workers | |
| Static Assets | |
| Bindings | |
| Cache Reserve | |