cloudflare-r2-d1

Guide Cloudflare R2, D1, and KV storage with Workers bindings.

1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/SecurityRonin/ronin-marketplace --skill cloudflare-r2-d1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-r2-d1
Source: https://github.com/SecurityRonin/ronin-marketplace/tree/main/plugins/deployment-skills/skills/cloudflare-r2-d1
Command: npx skills add https://github.com/SecurityRonin/ronin-marketplace --skill cloudflare-r2-d1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides structured guidance to design, configure, and operate Cloudflare's edge storage services (R2, D1, KV) and Workers bindings, reducing integration friction and mistakes.

Core Features & Use Cases

  • Guidance on when to use R2 for object storage, D1 for relational data, and KV for fast, cached configuration.
  • Best practices for bindings with Workers, wrangler.toml configuration, and cross-service patterns (D1 + R2 + KV).
  • Real-world use cases include edge-backed media storage, per-tenant databases, and low-latency config data for edge apps.

Quick Start

Install and review the D1/R2/KV patterns, then implement basic bindings in wrangler.toml and a simple Worker fetch handler to validate storage integration. Then try creating a sample table in D1, uploading an object to R2, and setting a value in KV.

Frequently Asked Questions about cloudflare-r2-d1

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
When should I use Cloudflare R2 versus D1 or KV for edge storage?

Use Cloudflare R2 for object and file storage, D1 for relational databases, and KV for fast, cached configuration data. Selecting the correct edge storage product depends on whether your application needs to store files, query relational tables, or read low-latency config.

How do I configure Workers bindings for R2, D1, and KV in my wrangler.toml file?

To configure Workers bindings, define your R2, D1, and KV resources in wrangler.toml and implement a fetch handler in your Worker. Correct bindings configuration connects your edge storage services to the Worker runtime for secure access.

Can I use multiple edge storage products like D1 and R2 together in a single Cloudflare Worker?

Yes, you can combine D1, R2, and KV within a single Cloudflare Worker using cross-service patterns. This approach allows you to build complex edge apps that integrate per-tenant databases, object storage, and cached configuration seamlessly.

What are the limits and best practices for Cloudflare edge storage and Workers bindings?

Best practices for Cloudflare edge storage include understanding specific limits for R2, D1, and KV, and configuring wrangler.toml correctly. Following practical constraints and implementation guidance prevents integration friction and optimizes edge performance.

How do I start integrating Cloudflare R2, D1, and KV into a new edge application?

To start integrating edge storage, review the D1, R2, and KV patterns, then implement basic bindings in wrangler.toml. Validate the storage integration by creating a sample D1 table, uploading an R2 object, and setting a KV value within a fetch handler.