What problem does it solve?
This Skill enables programmatic management of Cloudflare R2 object storage, providing a unified pattern to upload, download, list, delete files, and generate presigned URLs for secure, time-limited access in serverless and edge deployments.
Core Features & Use Cases
- Upload files to an R2 bucket using a simple API binding.
- Download, stream, and serve objects quickly with efficient requests.
- List objects with prefix filtering and pagination for inventory and media libraries.
- Delete single or multiple objects as part of cleanup and lifecycle management.
- Generate presigned URLs to grant temporary access without exposing credentials.
- Use Case: Build a serverless API that accepts user uploads, stores them in R2, and serves private assets via presigned URLs.
Quick Start
Configure a bucket binding in wrangler.toml (e.g., MY_BUCKET bound to my-bucket), then access the bucket in code via env.MY_BUCKET. To get started:
- Create the bucket: wrangler r2 bucket create my-bucket
- Basic usage: upload with env.MY_BUCKET.put(key, data), download with env.MY_BUCKET.get(key), list with env.MY_BUCKET.list(...), delete with env.MY_BUCKET.delete(key).