cloudflare-workers-expert
Expert in Cloudflare Workers and the Edge Computing ecosystem. Covers Wrangler, KV, D1, Durable Objects, and R2 storage.
- License 许可
- Apache-2.0
- 最近更新
- 2026-06-23
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- cloudflare-workers-expert
- risk
- safe
- source
- community
- date_added
- 2026-02-27
- description
- Expert in Cloudflare Workers and the Edge Computing ecosystem. Covers Wrangler, KV, D1, Durable Objects, and R2 storage.
02 资源文件 101
- 其他.gitattributes151 B
- 其他.gitignore300 B
- 资产文件assets/group-qr.jpg136.1 KB
- 资产文件assets/showcase-1.jpg118.8 KB
- 资产文件assets/showcase-2.jpg107.4 KB
- 资产文件assets/showcase-3.jpg95.7 KB
- 参考文档CHANGELOG.md17.5 KB
- 许可证LICENSE1.4 KB
- 参考文档manifest.json21.7 KB
- 参考文档NOTICE.md2.1 KB
- 参考文档README.md3.7 KB
- 参考文档references/chart-editing.md3.4 KB
- 参考文档references/custom-template-workflow.md3.3 KB
- 参考文档references/original-design-guide.md4.0 KB
- 参考文档references/pptx-edit-schema.md6.1 KB
- 参考文档references/workflow.md6.3 KB
- 脚本scripts/apply_update.py9.6 KB
- 脚本scripts/build_manifest.py2.7 KB
- 脚本scripts/build_pptx.py13.1 KB
- 脚本scripts/check_update.py5.6 KB
- 脚本scripts/compute_capacity.py10.3 KB
- 脚本scripts/render_slides.py1.9 KB
- 参考文档templates/architecture-deck/detail.json1.2 MB
- 参考文档templates/architecture-deck/intro.md2.8 KB
- 资产文件templates/architecture-deck/preview.png860.5 KB
- 资产文件templates/architecture-deck/template.pptx1002.0 KB
- 参考文档templates/competition-speech/detail.json1.4 MB
- 参考文档templates/competition-speech/intro.md2.2 KB
- 资产文件templates/competition-speech/preview.png959.2 KB
- 资产文件templates/competition-speech/template.pptx1.1 MB
- 参考文档templates/cute-orange-class/detail.json75.6 KB
- 参考文档templates/cute-orange-class/intro.md3.0 KB
- 资产文件templates/cute-orange-class/preview.png720.2 KB
- 资产文件templates/cute-orange-class/template.pptx3.0 MB
- 参考文档templates/data-viz-deck/detail.json997.7 KB
- 参考文档templates/data-viz-deck/intro.md3.4 KB
- 资产文件templates/data-viz-deck/preview.png825.0 KB
- 资产文件templates/data-viz-deck/template.pptx2.4 MB
- 参考文档templates/geometric-summary/detail.json178.9 KB
- 参考文档templates/geometric-summary/intro.md2.5 KB
- 资产文件templates/geometric-summary/preview.png552.2 KB
- 资产文件templates/geometric-summary/template.pptx9.7 MB
- 参考文档templates/INDEX.md7.1 KB
- 参考文档templates/mckinsey-style/detail.json1003.9 KB
- 参考文档templates/mckinsey-style/intro.md2.7 KB
- 资产文件templates/mckinsey-style/preview.png744.1 KB
- 资产文件templates/mckinsey-style/template.pptx587.8 KB
- 参考文档templates/minimal-business-summary/detail.json106.8 KB
- 参考文档templates/minimal-business-summary/intro.md2.2 KB
- 资产文件templates/minimal-business-summary/preview.png325.0 KB
- 资产文件templates/minimal-business-summary/template.pptx3.6 MB
- 参考文档templates/operations-deck/detail.json1.1 MB
- 参考文档templates/operations-deck/intro.md2.7 KB
- 资产文件templates/operations-deck/preview.png657.0 KB
- 资产文件templates/operations-deck/template.pptx2.6 MB
- 参考文档templates/premium-corp/detail.json831.9 KB
- 参考文档templates/premium-corp/intro.md3.3 KB
- 资产文件templates/premium-corp/preview.png894.0 KB
- 资产文件templates/premium-corp/template.pptx753.9 KB
- 参考文档templates/quarterly-illust/detail.json136.1 KB
- 参考文档templates/quarterly-illust/intro.md2.7 KB
- 资产文件templates/quarterly-illust/preview.png508.3 KB
- 资产文件templates/quarterly-illust/template.pptx13.3 MB
- 参考文档templates/red-patriot-general/detail.json164.6 KB
- 参考文档templates/red-patriot-general/intro.md2.9 KB
- 资产文件templates/red-patriot-general/preview.png1.4 MB
- 资产文件templates/red-patriot-general/template.pptx8.9 MB
- 参考文档templates/red-patriot-youth/detail.json104.8 KB
- 参考文档templates/red-patriot-youth/intro.md3.0 KB
- 资产文件templates/red-patriot-youth/preview.png887.2 KB
- 资产文件templates/red-patriot-youth/template.pptx6.5 MB
- 参考文档templates/report-massive-charts/detail.json997.5 KB
- 参考文档templates/report-massive-charts/intro.md1.9 KB
- 资产文件templates/report-massive-charts/preview.png949.1 KB
- 资产文件templates/report-massive-charts/template.pptx1.7 MB
- 参考文档templates/report-massive-models/detail.json980.0 KB
- 参考文档templates/report-massive-models/intro.md1.8 KB
- 资产文件templates/report-massive-models/preview.png979.3 KB
- 资产文件templates/report-massive-models/template.pptx1.5 MB
- 参考文档templates/report-massive-reports/detail.json816.7 KB
- 参考文档templates/report-massive-reports/intro.md1.9 KB
- 资产文件templates/report-massive-reports/preview.png617.1 KB
- 资产文件templates/report-massive-reports/template.pptx1.1 MB
- 参考文档templates/report-savior/detail.json1.0 MB
- 参考文档templates/report-savior/intro.md2.9 KB
- 资产文件templates/report-savior/preview.png833.0 KB
- 资产文件templates/report-savior/template.pptx1.8 MB
- 参考文档templates/thesis-formula/detail.json323.7 KB
- 参考文档templates/thesis-formula/intro.md2.8 KB
- 资产文件templates/thesis-formula/preview.png526.0 KB
- 资产文件templates/thesis-formula/template.pptx1.1 MB
- 参考文档templates/thesis-novice/detail.json269.7 KB
- 参考文档templates/thesis-novice/intro.md3.2 KB
- 资产文件templates/thesis-novice/preview.png560.7 KB
- 资产文件templates/thesis-novice/template.pptx1.3 MB
- 参考文档templates/top-thesis/detail.json316.1 KB
- 参考文档templates/top-thesis/intro.md2.1 KB
- 资产文件templates/top-thesis/preview.png637.1 KB
- 资产文件templates/top-thesis/template.pptx1.1 MB
- 参考文档updates.json15.9 KB
- 其他VERSION7 B
03 SKILL.md 正文
You are a senior Cloudflare Workers Engineer specializing in edge computing architectures, performance optimization at the edge, and the full Cloudflare developer ecosystem (Wrangler, KV, D1, Queues, etc.).
Use this skill when
- Designing and deploying serverless functions to Cloudflare's Edge
- Implementing edge-side data storage using KV, D1, or Durable Objects
- Optimizing application latency by moving logic to the edge
- Building full-stack apps with Cloudflare Pages and Workers
- Handling request/response modification, security headers, and edge-side caching
Do not use this skill when
- The task is for traditional Node.js/Express apps run on servers
- Targeting AWS Lambda or Google Cloud Functions (use their respective skills)
- General frontend development that doesn't utilize edge features
Instructions
- Wrangler Ecosystem: Use
wrangler.tomlfor configuration andnpx wrangler devfor local testing. - Fetch API: Remember that Workers use the Web standard Fetch API, not Node.js globals.
- Bindings: Define all bindings (KV, D1, secrets) in
wrangler.tomland access them through theenvparameter in thefetchhandler. - Cold Starts: Workers have 0ms cold starts, but keep the bundle size small to stay within the 1MB limit for the free tier.
- Durable Objects: Use Durable Objects for stateful coordination and high-concurrency needs.
- Error Handling: Use
waitUntil()for non-blocking asynchronous tasks (logging, analytics) that should run after the response is sent.
Examples
Example 1: Basic Worker with KV Binding
export interface Env {
MY_KV_NAMESPACE: KVNamespace;
}
export default {
async fetch(
request: Request,
env: Env,
ctx: ExecutionContext,
): Promise<Response> {
const value = await env.MY_KV_NAMESPACE.get("my-key");
if (!value) {
return new Response("Not Found", { status: 404 });
}
return new Response(`Stored Value: ${value}`);
},
};
Example 2: Edge Response Modification
export default {
async fetch(request, env, ctx) {
const response = await fetch(request);
const newResponse = new Response(response.body, response);
// Add security headers at the edge
newResponse.headers.set("X-Content-Type-Options", "nosniff");
newResponse.headers.set(
"Content-Security-Policy",
"upgrade-insecure-requests",
);
return newResponse;
},
};
Best Practices
- ✅ Do: Use
env.VAR_NAMEfor secrets and environment variables. - ✅ Do: Use
Response.redirect()for clean edge-side redirects. - ✅ Do: Use
wrangler tailfor live production debugging. - ❌ Don't: Import large libraries; Workers have limited memory and CPU time.
- ❌ Don't: Use Node.js specific libraries (like
fs,path) unless using Node.js compatibility mode.
Troubleshooting
Problem: Request exceeded CPU time limit.
Solution: Optimize loops, reduce the number of await calls, and move synchronous heavy lifting out of the request/response path. Use ctx.waitUntil() for tasks that don't block the response.
04 同仓库更多 Skills
test_skill
暂无简介
zustand-store-ts
Create Zustand stores following established patterns with proper TypeScript types and middleware.
zoom-automation
Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.
zoho-crm-automation
Automate Zoho CRM tasks via Rube MCP (Composio): create/update records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.
zod-validation-expert
Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.
zeroize-audit
Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C/C++/Rust code handling secrets, keys, passwords, or other sensitive data.