cloudflare-r2

Manage Cloudflare R2 objects via the Workers API.

16|7|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-r2-jackspace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-r2
Source: https://github.com/jackspace/ClaudeSkillz/tree/main/skills/cloudflare-r2
Command: npx skills add https://github.com/jackspace/ClaudeSkillz --skill cloudflare-r2-jackspace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides complete Cloudflare R2 knowledge for building a secure, S3-compatible object storage layer on Cloudflare's edge network, including bucket configuration, CORS, presigned URLs, and metadata handling.

Core Features & Use Cases

  • R2 Workers API - put(), get(), head(), delete(), list()
  • Multipart Uploads - Resumable uploads for large files
  • Presigned URLs - Client-side uploads/downloads
  • CORS Configuration - Browser access to R2 buckets
  • HTTP Metadata - Content-Type, Cache-Control
  • Custom Metadata - User-defined key-value pairs
  • Bucket Configuration - wrangler.jsonc setup and bindings
  • Error Handling & Performance - Retry strategies, range requests, batch ops

Quick Start

Use this Skill to create an R2 bucket, configure a Worker binding, and implement basic uploads and downloads at the edge.

Frequently Asked Questions about cloudflare-r2

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

FAQPage Schema
How do I upload files to Cloudflare R2 from my application?

Upload files to R2 using the R2 Workers API put() method via a Worker binding. Configure your bucket in wrangler.jsonc, then call env.BUCKET.put(key, body) with the file content and optional metadata like Content-Type and Cache-Control headers.

Can I let users upload directly to R2 without going through my server?

Yes, use presigned URLs to grant time-limited direct access. Generate a presigned URL server-side with the R2 API, then share it with clients for direct uploads or downloads, reducing server load and improving performance.

How do I handle large file uploads to R2?

Use multipart uploads for resumable, large-file transfers. The R2 Workers API supports multipart operations that let you upload chunks independently, retry failed segments, and resume interrupted uploads without restarting.

What's the best way to serve assets from R2 across regions?

Deploy R2 with Cloudflare Workers to serve assets from the edge network. Workers bindings connect to your R2 bucket, enabling fast, geographically distributed asset delivery with built-in caching and content negotiation.

How do I enable browser-based access to R2 buckets?

Configure CORS on your R2 bucket to allow cross-origin requests from your domain. Set allowed origins, methods (GET, PUT, POST), and headers in bucket settings so browsers can fetch or upload objects directly.

Does R2 support custom metadata and content attributes?

Yes, R2 stores both HTTP metadata (Content-Type, Cache-Control, Content-Encoding) and custom key-value metadata. Include metadata in put() calls and retrieve it via head() to track object properties without separate databases.