cloudflare-r2

Configure Cloudflare R2 buckets and manage objects via S3-compatible APIs.

Updated Sep 16, 2025
One-click install
npx skills add https://github.com/kienhaminh/speed-reader --skill cloudflare-r2-kienhaminh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-r2
Source: https://github.com/kienhaminh/speed-reader/tree/main/.claude/skills/cloudflare-r2
Command: npx skills add https://github.com/kienhaminh/speed-reader --skill cloudflare-r2-kienhaminh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a practical guide to Cloudflare R2: S3-compatible object storage with zero egress, bucket management, and integration with Workers.

Core Features & Use Cases

  • Bucket & Object Management: Create and manage buckets, upload/download objects.
  • S3 Compatibility: Use standard S3 SDKs with R2 endpoints.
  • Wrangler Integration: Local development and deployment workflows.
  • Security & Access: Presigned URLs and ACLs concepts.

Quick Start

Follow steps to configure credentials and create a bucket, then upload an object.

Frequently Asked Questions about cloudflare-r2

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

FAQPage Schema
How do I set up S3-compatible object storage with zero egress costs?

Cloudflare R2 provides S3-compatible object storage with zero egress fees. Configure credentials via Wrangler or API tokens, create a bucket, and use standard S3 SDKs pointing to R2 endpoints to store and retrieve objects without incurring data transfer charges.

Can I migrate my files from AWS S3 to Cloudflare R2?

Yes. R2 is S3-compatible, so you can migrate existing S3 buckets using standard S3 tools and SDKs. Configure R2 credentials, point your migration tool to R2 endpoints, and transfer objects while maintaining the same API patterns and bucket structure.

How do I integrate R2 storage with Cloudflare Workers?

Cloudflare R2 integrates directly with Workers via Wrangler bindings. Define R2 bucket bindings in your wrangler.toml, then access buckets programmatically in Worker code using the provided runtime API to upload, download, and manage objects at the edge.

How do I configure public or private bucket access and presigned URLs?

R2 supports bucket ACLs and access control via credentials. Generate presigned URLs with R2 access keys to grant temporary, time-limited access to specific objects without exposing bucket credentials, and configure CORS policies for browser-based uploads and downloads.

Do I need to change my code to use R2 instead of S3?

Minimal changes are needed. R2 is S3-compatible, so existing S3 SDKs work with R2 by changing endpoint URLs and credentials. Update your configuration to point to R2 endpoints and use R2-generated access keys; application logic remains largely unchanged.

What lifecycle rules and bucket configuration options does R2 support?

R2 supports lifecycle rules for automatic object expiration and transitioning, bucket configuration for access patterns, and credential management through access keys and API tokens. These enable cost-efficient storage policies and fine-grained permission control aligned with your application needs.