workers-development

โดย cloudflare

เรียกใช้ ตรวจสอบ และดีบัก Cloudflare Workers ระหว่างการพัฒนาในเครื่องด้วย cf dev, wrangler dev หรือ Cloudflare Vite plugin โดยใช้ Local Explorer เพื่ออ่านและป้อนข้อมูลให้ binding รวมถึงค้นหา traces และ logs ในเครื่อง นอกจากนี้ยังส่งต่อการดีบักใน production ไปยัง Workers observability ใช้สำหรับดีบักคำขอ ไม่ว่าโปรเจกต์จะใช้ Wrangler หรือไม่ก็ตาม

npx skills add https://github.com/cloudflare/skills --skill workers-development

Workers development and debugging

Use the project's existing tooling, scripts, and configuration. Installed help, the Local Explorer API schema, and current docs describe the supported operations; read them rather than guessing endpoints or flags.

NeedTools and discovery
Run locallyUse the project's existing dev command: cf dev in a cf project, otherwise the Wrangler or Cloudflare Vite dev script. See local development.
Inspect or seed local binding dataLocal Explorer is a UI and API for local KV, R2, D1, SQLite-backed Durable Objects, and Workflows, and can trigger Cron handlers. Open /cdn-cgi/local/explorer on the dev server's origin.
Debug local requestsLocal Explorer captures traces and logs from every local invocation, including binding operations, without code changes. Check traces before adding logging.
Debug a deployed WorkerChoose logs, traces, or metrics with Workers observability, or the cloudflare skill's observability reference when installed. If the Cloudflare MCP server is connected (bundled with this plugin), use search to find the Workers Observability API operations, then execute to call them, scoped to the target account, Worker, and time window.

Use the Local Explorer API

When the dev server detects an AI agent, including under cf dev, it prints a hint with the API URL and relevant endpoints. Fetch the OpenAPI specification from /cdn-cgi/local/explorer/api on the dev server's origin, then extract only the operations the task needs. If no hint appears, request that URL directly. If the API or an operation is missing, compare the installed Wrangler or Vite plugin version against the requirements in the Local Explorer docs.

Bindings are simulated locally by default, but a binding set to remote: true reaches the real deployed resource while the Worker runs locally. Traces also capture those remote calls. Identify which bindings are remote before seeding or writing data.

Skill feedback

If the user reports that this skill gave incorrect or outdated guidance, or is missing information, read references/skill-feedback.md.

Skills เพิ่มเติมจาก cloudflare

add-autogate
cloudflare
คู่มือทีละขั้นตอนสำหรับการเพิ่ม autogate ใหม่ให้กับ workerd เพื่อการเปิดตัวการเปลี่ยนแปลงที่มีความเสี่ยงแบบค่อยเป็นค่อยไป รวมถึงการลงทะเบียน enum การแมปสตริง รูปแบบการใช้งาน และ...
add-autogate
cloudflare
คำแนะนำทีละขั้นตอนสำหรับการเพิ่มออโตเกตใหม่ให้กับ workerd เพื่อการเปิดตัวการเปลี่ยนแปลงที่มีความเสี่ยงแบบค่อยเป็นค่อยไป รวมถึงการลงทะเบียน enum การแมปสตริง รูปแบบการใช้งาน และ…
add-compat-flag
cloudflare
คู่มือทีละขั้นตอนสำหรับการเพิ่มแฟล็กความเข้ากันได้ใหม่ให้กับ workerd รวมถึง schema capnp, การใช้งาน C++, การทดสอบ และข้อกำหนดด้านเอกสาร
add-compat-flag
cloudflare
คู่มือทีละขั้นตอนสำหรับการเพิ่ม compatibility flag ใหม่ให้กับ workerd รวมถึงข้อกำหนดเกี่ยวกับ capnp schema, การใช้งาน C++, การทดสอบ และเอกสารประกอบ
agents-sdk
cloudflare
สร้าง AI agent บน Cloudflare Workers โดยใช้ Agents SDK โหลดเมื่อสร้าง stateful agent, durable workflow, แอป WebSocket แบบเรียลไทม์, งานตามกำหนดเวลา,…
architecture
cloudflare
ใช้เมื่อนำทางในโค้ดเบสเป็นครั้งแรก เพิ่มเมธอดไคลเอ็นต์ใหม่ เพิ่มคอนเทนเนอร์แฮนเดลเลอร์/บริการใหม่ หรือทำความเข้าใจการไหลของคำขอ...
basin
cloudflare
สร้างและแก้ไขปัญหาเวิร์กโฟลว์การวิเคราะห์ข้อมูลของ Cloudflare Basin ด้วย Basin Pipelines, Basin Catalog และ Basin SQL ใช้สำหรับสตรีมข้อมูลไปยังตาราง R2 Iceberg จัดการแค็ตตาล็อก หรือสืบค้นตารางเหล่านั้น รวมถึงใช้กับคำขอที่ใช้ชื่อเดิมว่า Data Platform, Pipelines, R2 Data Catalog หรือ R2 SQL
data-analysisawsdatabase
bazel-test-hygiene
cloudflare
กฎบังคับสำหรับการรันการทดสอบ bazel ระหว่างการพัฒนา โหลดสกิลนี้ก่อนรันคำสั่งทดสอบ bazel ใดๆ โดยเฉพาะเมื่อตรวจสอบการแก้ไขหรือ…