Storage Selection

Choose the right Cloudflare storage primitive: D1, R2, KV, Durable Object storage, Hyperdrive, Vectorize, AI Search, cache, or external databases. Use before modeling data, writing migrations, or deciding consistency/cost trade-offs.

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add zllovesuki/cloudflare-agent-skills --skill storage-selection
Manual install
git clone --depth 1 https://github.com/zllovesuki/cloudflare-agent-skills.git /tmp/cloudflare-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/cloudflare-agent-skills/skills/storage-selection ~/.claude/skills/storage-selection

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Storage Selection

Use this skill before creating tables, buckets, namespaces, indexes, or object state.

## Storage matrix

| Data shape | Preferred primitive | Why |
|---|---|---|
| Relational records, SQL queries, indexes | D1 | SQLite-style relational storage |
| Large files, media, exports, backups | R2 | Object storage and egress-friendly distribution |
| Globally cached key/value reads | KV | Low-latency cache with eventual consistency |
| Per-entity consistent state and coordination | Durable Object storage | Private storage attached to serialized code |
| Existing Postgres/MySQL | Hyperdrive | Connection acceleration/caching for external DBs |
| Embeddings and vector similarity | Vectorize | Custom vector index/query control |
| Managed retrieval/RAG | AI Search | Ingestion, search, reranking, retrieval features |
| Public static frontend files | Assets/static hosting | Simple and cheap static delivery |

## Decision tree

1. Is the data a large blob or file? Use R2. Store metadata elsewhere.
2. Does the logic require serialized state changes for one entity? Use Durable Objects.
3. Is the data relational and queryable? Use D1, or Hyperdrive if it must remain in an existing Postgres/MySQL database.
4. Is the data a cached, eventually consistent value? Use KV.
5. Is the data an embedding/vector? Use Vectorize, or AI Search if managed retrieval is enough.
6. Is the data public static content? Use assets/static delivery.

## Consistency rules
Read the full skill on GitHub

Details

Skill name
storage-selection
Path
skills/storage-selection/SKILL.md
Repo updated
28 April 2026

FAQ

What does the Storage Selection skill do?

Choose the right Cloudflare storage primitive: D1, R2, KV, Durable Object storage, Hyperdrive, Vectorize, AI Search, cache, or external databases. Use before modeling data, writing migrations, or deciding consistency/cost trade-offs.

How do I install the Storage Selection skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add zllovesuki/cloudflare-agent-skills --skill storage-selection. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Storage Selection popular?

It lives in zllovesuki/cloudflare-agent-skills, which has 9 GitHub stars and 0 forks.

Related skills

Agents

9

zllovesuki/cloudflare-agent-skills

Build Cloudflare Agents SDK applications for autonomous multi-step tool use, AIChatAgent chat agents, Durable Object-backed state, tools, scheduling, callable methods, WebSockets, SQL state, and constrained agent behavior. Use when RAG or Workflows are not enough.

AI, LLMs & Agents

Cloudflare Architecture

9

zllovesuki/cloudflare-agent-skills

Choose Cloudflare Developer Platform primitives and architecture shapes before writing code. Use for Cloudflare Workers, Durable Objects, D1, R2, Queues, Workflows, Containers, Realtime, Workers AI, Vectorize, AI Search, Agents, cost, limits, and migration decisions.

Software Development

Containers

9

zllovesuki/cloudflare-agent-skills

Decide when to use Cloudflare Containers instead of Workers and design container-backed workloads, native binaries, long-running processes, image processing, larger runtime shapes, and Worker frontends. Use as an escape hatch when Workers constraints do not fit.

DevOps & Cloud

Table Design Advisor

9

shisuidata/ss-data-skills

Use when designing or reviewing a data warehouse table schema. Advises on warehouse layer, table grain, fact or dimension modeling, fields, primary key, partitioning, update strategy, lifecycle, naming, downstream usage, and data quality checks. 中文触发词:表设计、数仓建模、表结构审查、表粒度、分区设计。

AI, LLMs & Agents

RAG Vectorize AI Search

9

zllovesuki/cloudflare-agent-skills

Build retrieval augmented generation on Cloudflare with AI Search, Vectorize, Workers AI embeddings, chunking, metadata filters, citations, ingestion pipelines, reranking, and grounded answer generation. Use when implementing RAG, semantic search, or document QA.

AI, LLMs & Agents

Workers AI

9

zllovesuki/cloudflare-agent-skills

Write Cloudflare Workers AI and AI Gateway code for model inference, prompts, streaming, token budgets, model selection, observability, and fallback design. Use when adding LLM, embeddings, summarization, classification, or generation to Workers.

AI, LLMs & Agents

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.