k2

Build and troubleshoot Cloudflare K2 or K2 Streams durable logs. Use for stream setup, producing from Workers or HTTP, configuring retention and inputs, and consuming through subscriptions.

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

Cloudflare K2

K2 is a durable log for decoupling event producers and consumers. Start with the K2 overview, then retrieve the relevant current documentation before giving setup instructions, code, limits, availability, permissions, or API details. The docs are the source of truth over this skill. K2 is in public beta on the Workers Paid plan; check the overview for current availability and beta storage limits.

Documentation

TaskDocsCheck for
Create a stream and try K2Get startedPrerequisites, setup sequence, current API examples
Understand streams and subscriptionsConceptsRecord model and delivery behavior
Configure a streamConfigurationInputs, authentication, CORS, retention
Produce from HTTP or a WorkerProduce recordsRequest and binding syntax, encoding, errors, retries
Consume through subscriptionsConsume recordsLeases, acknowledgements, retries, errors
Reason about duplicates and redeliveryDelivery guaranteesAt-least-once delivery, leases, retention effects
Size a stream or consumerLimitsCurrent quotas and size limits
Estimate costPricingBilling status, data produced, consumed, and retained

Retrieve the matching pages above for each task and use their current examples. For capacity or cost questions, check current limits and pricing before quoting values, and state whether billing is enabled yet.

For SQL transformation and delivery to R2 Iceberg tables, use the basin skill. For task processing, consult Queues.

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…