Official agent skill

K2

by cloudflare in cloudflare/skills

Build and troubleshoot Cloudflare K2 or K2 Streams durable logs.

OfficialApache-2.0Auto-check passed

Install K2

skills CLI
$ npx skills add cloudflare/skills --skill k2 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cloudflare/skills k2 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cloudflare/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/k2 .claude/skills/k2 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
k2
GitHub stars
3k
Used in
1 other repo
Token cost
~544 tokens
SKILL.md length
193 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

Build and troubleshoot Cloudflare K2 or K2 Streams durable logs.

  • Producing from Workers
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Configuring retention and inputs
  • Consuming through subscriptions

What it does

K2 is an agent skill from cloudflare/skills, published by the product's own GitHub organization. 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.

Its SKILL.md is about 540 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Cloudflare. The repository describes itself as: Skills for teaching agents how to build on Cloudflare. The licence is Apache-2.0.

When your agent uses it

  • Producing from Workers
  • Configuring retention and inputs
  • Consuming through subscriptions

Example prompts

  • “/k2”

What it can do on your machine

Read from SKILL.md and the folder at commit 41e0d19. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developers.cloudflare.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

K2 loads about 544 tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 193 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~544

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cloudflare/skills at commit 41e0d19, republished under its Apache-2.0 licence (© cloudflare). 193 words, ~544 tokens.

Download SKILL.mdSave it as .claude/skills/k2/SKILL.md (or your agent's skills folder).
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, 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

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
Size a stream or consumerLimitsCurrent 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.

© cloudflare, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/k2 of cloudflare/skills.

Open the folder on GitHubat commit 41e0d19

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in cloudflare/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

K2 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

K2 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
K2 this skillcloudflare/skills3k1 repos~544Automated safety check: PassApache-2.0
Cloudflare Browser Renderingcloudflare/moltworker9.9k—~742Automated safety check: PassApache-2.0
Star Office UI Setupringhyacinth/Star-Office-UI7.5k—~1.3kAutomated safety check: PassMIT
Cloudflarehodgef/apiker1277 repos~2.2kAutomated safety check: PassMIT
Webhome Extension Builderwebhtv/webhtv1.7k—~2.8kAutomated safety check: PassGPL-3.0
Golivemikehasa/golive-skill1.2k—~13kAutomated safety check: NotesMIT

Similar skills

  • Cloudflare Browser Rendering

    cloudflare/moltworker

    Official

    Drives headless Chrome through Cloudflare Browser Rendering over a CDP WebSocket to take screenshots, navigate and scrape pages, and record multi-page videos.

    9.9k GitHub stars~742 tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Star Office UI Setup

    ringhyacinth/Star-Office-UI

    Sets up Star Office UI, a pixel-art office dashboard that shows AI agent states, lets other agents join and can be opened from a phone or a public link.

    7.5k GitHub stars~1.3k tokensUpdated 7 mo ago
    Agent WorkflowsAuto-check passed
  • Cloudflare

    hodgef/apiker

    Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF…

    127 GitHub starsUsed in 7 repos~2.2k tokens
    DevOps & CloudAuto-check passed
  • Build, review, debug, reverse-engineer, and package WebHome injected extension scripts for FongMi/WebHome App WebView pages.

    1.7k GitHub stars~2.8k tokensUpdated today
    SecurityAuto-check passed
  • Golive

    mikehasa/golive-skill

    Take an agent-written app from repo to live production on the user's OWN accounts, with providers they choose (hosting, database, auth, payments, email, domain/DNS).

    1.2k GitHub stars~13k tokensUpdated 3 days ago
    Backend & APIsAuto-check: notes
  • Build, review, debug, reverse-engineer data sources for, and package FongMi/WebHome custom homepage single-file HTML.

    1.7k GitHub stars~3.8k tokensUpdated today
    Frontend & DesignAuto-check passed

More from cloudflare/skills

All 16 skills in this repo
  • Turnstile Spin

    cloudflare/skills

    Official

    Set up, repair, or migrate to Cloudflare Turnstile bot verification in an existing frontend and backend, including server-side Siteverify.

    3k GitHub starsUsed in 4 repos~7.2k tokens
    Auto-check: notes
  • Nextjs On Cloudflare

    cloudflare/skills

    Official

    Build, migrate, and deploy Next.js apps on Cloudflare Workers with vinext.

    3k GitHub starsUsed in 2 repos~678 tokens
    Auto-check passed
  • Agents SDK

    cloudflare/skills

    Official

    Build, debug, or review Cloudflare Agents SDK applications using the agents package.

    3k GitHub starsUsed in 2 repos~3k tokens
    Auto-check passed
  • Durable Objects

    cloudflare/skills

    Official

    Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.

    3k GitHub starsUsed in 2 repos~1.5k tokens
    Auto-check passed
  • Sandbox Next

    cloudflare/skills

    Official

    Build or maintain Cloudflare Sandbox apps on @cloudflare/sandbox@next (SDK 1.0 preview).

    3k GitHub starsUsed in 2 repos~1.7k tokens
    Auto-check passed
  • Cloudflare One Migrations

    cloudflare/skills

    Official

    Assess and plan migrations from existing VPN, SWG, or SASE platforms to Cloudflare One, including policy mapping, parity gaps, and rollout.

    3k GitHub starsUsed in 6 repos~3.1k tokens
    Auto-check passed

Works with

Questions about K2

What does K2 do?

Build and troubleshoot Cloudflare K2 or K2 Streams durable logs. K2 is an agent skill from cloudflare/skills, published by the product's own GitHub organization. Build and troubleshoot Cloudflare K2 or K2 Streams durable logs.

When should I use K2?

K2 fits situations like: producing from Workers; configuring retention and inputs; consuming through subscriptions.

How do I install K2 in Claude Code?

Run `npx skills add cloudflare/skills --skill k2 -a claude-code`. Or copy the skill folder (skills/k2 in cloudflare/skills) into .claude/skills/k2 in your project. Claude Code loads it when a task matches its description.

How do I install K2 in Codex?

Run `npx skills add cloudflare/skills --skill k2 -a codex`. Or copy the skill folder (skills/k2 in cloudflare/skills) into .agents/skills/k2 in your project. Codex loads it when a task matches its description.

Can I use K2 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cloudflare/skills --skill k2 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/k2, .gemini/skills/k2, .github/skills/k2 and .opencode/skills/k2 in your project.

What does K2 need to run?

SKILL.md names no scripts, command-line tools or credentials: K2 is instructions for the agent only.

Does K2 access the network?

SKILL.md names 2 domains. As links in the text: developers.cloudflare.com and github.com. This is read from the text; nothing was executed.

Is K2 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does K2 use?

K2 is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does K2 use?

About 544 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to K2?

Skills that share tags, products or a category with K2: Cloudflare Browser Rendering (cloudflare/moltworker, 9.9k stars), Star Office UI Setup (ringhyacinth/Star-Office-UI, 7.5k stars), Cloudflare (hodgef/apiker, 127 stars) and Webhome Extension Builder (webhtv/webhtv, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains K2?

cloudflare (a GitHub organization, an official publisher) maintains it in cloudflare/skills, which has 2,999 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 1, 2026.

Source: cloudflare/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.