Skip to content
alyn
Cloudflare Official

K2 skill

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 cloudflare/skills --skill k2
GitHub stars
3,336
Pack installs
1.7M
Alyn Score
71/99
Updated
12 h ago
License
Apache-2.0

Install K2

Pick your agent. Every command is ready to paste.

$npx skills add cloudflare/skills --skill k2

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads k2 when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the k2 skill”. In Codex, type $k2.

The skill itself

SKILL.md

GitHub

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. While cloudflare-docs PR #33858 remains open, use its proposed pages if the public URLs have not been published.

Documentation

Task Docs Check for
Create a stream and try K2 Get started Prerequisites, setup sequence, current API examples
Understand streams and subscriptions Concepts Record model and delivery behavior
Configure a stream Configuration Inputs, authentication, CORS, retention
Produce from HTTP or a Worker Produce records Request and binding syntax, encoding, errors, retries
Consume through subscriptions Consume records Leases, acknowledgements, retries, errors
Size a stream or consumer Limits Current quotas and size limits

Retrieve the matching pages above for each task and use their current examples. For capacity or cost questions, check current limits and any published pricing before quoting values. State when a requested pricing or availability detail is not yet published.

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.

Tips for K2

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It bundles reference files. The agent reads them only when needed, so they cost no context until then.
  • • It is part of a pack with 22 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about K2

What does the K2 skill do?

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.

How do I install K2?

Run "npx skills add cloudflare/skills --skill k2" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does K2 work in Cursor and Codex?

Yes. K2 uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is K2 free?

K2 is open source on GitHub under the Apache-2.0 license. It is free to install; check the license before commercial use.

Who made K2?

K2 is published by Cloudflare in the cloudflare/skills repository, together with 21 other skills.

Similar skills. From other creators.