workers-development

Chạy, kiểm tra và gỡ lỗi Cloudflare Workers trong quá trình phát triển cục bộ bằng cf dev, wrangler dev hoặc plugin Cloudflare Vite; dùng Local Explorer để đọc và khởi tạo dữ liệu binding, đồng thời truy vấn trace và log cục bộ. Ngoài ra, chuyển hướng hoạt động gỡ lỗi trên môi trường production đến tính năng quan sát của Workers. Dùng để gỡ lỗi các yêu cầu, bất kể dự án có sử dụng Wrangler hay không.

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.

Thêm skills từ cloudflare

add-autogate
cloudflare
Hướng dẫn từng bước để thêm autogate mới vào workerd nhằm triển khai dần các thay đổi rủi ro, bao gồm đăng ký enum, ánh xạ chuỗi, mẫu sử dụng, và…
add-autogate
cloudflare
Hướng dẫn từng bước để thêm autogate mới vào workerd nhằm triển khai dần các thay đổi rủi ro, bao gồm đăng ký enum, ánh xạ chuỗi, mẫu sử dụng, và…
add-compat-flag
cloudflare
Hướng dẫn từng bước để thêm một cờ tương thích mới vào workerd, bao gồm lược đồ capnp, cách sử dụng C++, kiểm thử và các yêu cầu về tài liệu.
add-compat-flag
cloudflare
Hướng dẫn từng bước để thêm cờ tương thích mới vào workerd, bao gồm lược đồ capnp, cách sử dụng trong C++, kiểm thử và các yêu cầu về tài liệu.
agents-sdk
cloudflare
Xây dựng AI agent trên Cloudflare Workers bằng Agents SDK. Tải khi tạo agent có trạng thái, quy trình làm việc bền vững, ứng dụng WebSocket thời gian thực, tác vụ theo lịch trình,…
architecture
cloudflare
Sử dụng khi lần đầu điều hướng cơ sở mã, thêm một phương thức client mới, thêm một trình xử lý/dịch vụ container mới, hoặc hiểu cách một yêu cầu luân chuyển…
basin
cloudflare
Xây dựng và khắc phục sự cố các quy trình phân tích Cloudflare Basin bằng Basin Pipelines, Basin Catalog và Basin SQL. Sử dụng để truyền dữ liệu vào các bảng R2 Iceberg, quản lý danh mục hoặc truy vấn các bảng đó; cũng sử dụng cho các yêu cầu dùng tên cũ Data Platform, Pipelines, R2 Data Catalog hoặc R2 SQL.
data-analysisawsdatabase
bazel-test-hygiene
cloudflare
Các quy tắc bắt buộc khi chạy kiểm thử bazel trong quá trình phát triển. Tải kỹ năng này trước khi chạy bất kỳ lệnh kiểm thử bazel nào, đặc biệt là khi xác thực các bản sửa lỗi hoặc…