k2
This skill helps agents build and manage Cloudflare K2 durable logs for event streaming.
Identity proven by a skills index on cloudflare.com
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- Apache-2.0 (permissive)
- Pin
- a84b615pinned Oct 9, 2026
- Context cost
- about 490 tokenswhen the skill loads
- GitHub stars
- 3,012on cloudflare/skills
- Scripts
- None found
What it does
“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.”
Generated summary from the skill's own text
This skill helps agents build and manage Cloudflare K2 durable logs for event streaming. It provides guidance on stream creation, producing records from Workers or HTTP endpoints, configuring retention and inputs, and consuming events through subscriptions. The skill retrieves current documentation to ensure accurate setup instructions, API details, and platform limits.
When to use it
- Setting up a durable event log between producers and consumers
- Producing events from Cloudflare Workers or HTTP sources
- Configuring stream retention policies and input sources
- Building subscription-based event consumption patterns
When not to
- Processing tasks with complex workflows, use Queues instead
- Transforming and loading data to R2 Iceberg tables, use basin skill
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add cloudflare/skills --skill k2Installs from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install cloudflare/skills k2@a84b615ff9d40e7f99755aea23d65e52d645bd42Installs the commit we checked (a84b615).
Copy by hand
Download the folder at a84b615 and put it in .claude/skills/k2 for Claude Code and in .agents/skills/k2 for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install cloudflare@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "k2" by Cloudflare. Source, pinned to commit a84b615ff9d40e7f99755aea23d65e52d645bd42: https://github.com/cloudflare/skills/tree/a84b615ff9d40e7f99755aea23d65e52d645bd42/skills/k2 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/k2/ for Claude Code and .agents/skills/k2/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/cloudflare/k2
SKILL.md at the pin
--- name: k2 description: 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. --- # Cloudflare K2 K2 is a durable log for decoupling event producers and consumers. Start with the [K2 overview](https://developers.cloudflare.com/k2/index.md), 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](https://github.com/cloudflare/cloudflare-docs/pull/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](https://developers.cloudflare.com/k2/get-started/index.md) | Prerequisites, setup sequence, current API examples | | Understand streams and subscriptions | [Concepts](https://developers.cloudflare.com/k2/concepts/index.md) | Record model and delivery behavior | | Configure a stream | [Configuration](https://developers.cloudflare.com/k2/configuration/index.md) | Inputs, authentication, CORS, retention | | Produce from HTTP or a Worker | [Produce records](https://developers.cloudflare.com/k2/features/produce/index.md) | Request and binding syntax, encoding, errors, retries | | Consume through subscriptions | [Consume records](https://developers.cloudflare.com/k2/features/consume/index.md) | Leases, acknowledgements, retries, errors | | Size a stream or consumer | [Limits](https://developers.cloudflare.com/k2/platform/limits/index.md) | 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](https://developers.cloudflare.com/queues/index.md).
From cloudflare/skills at a84b615, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at a84b615Files
- SKILL.md2.2 KB · 906b7269c035
1 file, 2.2 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at a84b615More from Cloudflare
security-audit
This skill guides security audits of codebases, APIs, and services by finding vulnerabilities that cross real trust boundaries.
Contains scripts
Claude Code · about 5.4K tokens · pinned 6 days ago
kumo-design
Provides design rules for Cloudflare dashboard interfaces and Kumo UI components, covering text sizing, typography, spacing, borders, icons, animations, and…
Claude Code, Codex, Cursor +4 · about 1.5K tokens · pinned 6 days ago
agents-sdk
This skill helps build and debug Cloudflare Agents SDK applications, enabling creation of persistent agents with state management, RPC methods, scheduling…
Claude Code, Codex, Cursor +4 · about 3K tokens · pinned 6 days ago
basin
This skill helps agents build and troubleshoot Cloudflare Basin analytics workflows, which ingest events, transform data, manage Apache Iceberg tables in R2…
Claude Code, Codex, Cursor +4 · about 600 tokens · pinned 6 days ago
cloudflare
This skill helps agents discover Cloudflare products that match stated requirements and recommend the right combination for architecture and implementation.
Claude Code, Codex, Cursor +4 · about 6.4K tokens · pinned 6 days ago
cloudflare-email-service
This skill enables agents to send transactional emails and route incoming emails using Cloudflare's Email Service platform.
Claude Code, Codex, Cursor +4 · about 1.6K tokens · pinned 6 days ago
Related in Cloud and DevOps
cloudflare-one-migrations
This skill helps assess and plan migrations from VPN, SWG, or SASE platforms (Zscaler ZIA/ZPA, Palo Alto, legacy systems) to Cloudflare One.
by CloudflareOfficial publisher
Claude Code, Codex, Cursor +4 · about 3.1K tokens · pinned 6 days ago
nextjs-on-cloudflare
This skill guides agents to build and deploy Next.js applications on Cloudflare Workers using vinext, a Vite-based reimplementation of Next.js.
by CloudflareOfficial publisher
Claude Code, Codex, Cursor +4 · about 560 tokens · pinned 6 days ago
sandbox-migrate-to-next
This skill migrates Cloudflare Sandbox applications from the stable @cloudflare/sandbox package to the @cloudflare/sandbox@next SDK 1.0 preview release.
by CloudflareOfficial publisher
Claude Code, Codex, Cursor +4 · about 1.9K tokens · pinned 6 days ago
sandbox-next
This skill enables building and maintaining Cloudflare Sandbox apps using the @cloudflare/sandbox@next SDK (1.0 preview), which provides isolated Linux…
by CloudflareOfficial publisher
Claude Code, Codex, Cursor +4 · about 1.6K tokens · pinned 6 days ago
sandbox-stable
Builds and maintains Cloudflare Sandbox applications on the stable @cloudflare/sandbox package, providing isolated Linux environments running on Cloudflare…
by CloudflareOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 6 days ago
wrangler
This skill enables the agent to run Wrangler CLI commands for Cloudflare Workers projects, including local development setup, configuration management…
by CloudflareOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.7K tokens · pinned 6 days ago