cloudflare-r2
This skill covers provisioning and operating Cloudflare R2 buckets via Wrangler CLI, AWS CLI, and boto3, plus binding R2 to Workers for server-side access. Learn lifecycle configuration, presigned URL generation, public bucket serving, and CORS setup to eliminate egress costs for read-heavy workloads and media delivery.
Cloudflare R2 lets you manage S3-compatible object storage with zero egress fees on Cloudflare's global network.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-05-22
Cloudflare R2 lets you manage S3-compatible object storage with zero egress fees on Cloudflare's global network. This skill covers provisioning and operating Cloudflare R2 buckets via Wrangler CLI, AWS CLI, and boto3, plus binding R2 to Workers for server-side access. Learn lifecycle configuration, presigned URL generation, public bucket serving, and CORS setup to eliminate egress costs for read-heavy workloads and media delivery.
Use it when
- Cloudflare R2 bucket management with Wrangler CLI lets you create, list, and configure buckets from the command line.
- Yes, Cloudflare R2 is S3-compatible, so you can use AWS CLI directly.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
BagelHole/DevOps-Security-Agent-Skills/cloudflare-r2 · repository language: Shell
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is cloudflare r2 object storage and how does it work?
Cloudflare R2 is an object storage service that eliminates egress fees, making it ideal for read-heavy workloads and media delivery. R2 provides S3-compatible APIs, so you can use existing tools like AWS CLI and boto3 without vendor lock-in. The skill covers provisioning buckets via Wrangler CLI, configuring access controls, and binding R2 to Cloudflare Workers for server-side operations.
How do I set up r2 bucket management with wrangler?
Cloudflare R2 bucket management with Wrangler CLI lets you create, list, and configure buckets from the command line. Wrangler provides straightforward commands for provisioning storage and managing bucket settings. The skill teaches you to use Wrangler for end-to-end bucket lifecycle management, from initial setup through configuration of lifecycle rules and access policies.
Can I use aws cli with cloudflare r2 and how?
Yes, Cloudflare R2 is S3-compatible, so you can use AWS CLI directly. The skill covers generating R2 API tokens, configuring AWS CLI credentials to point to R2 endpoints, and executing standard S3 commands like put-object and get-object. This approach works seamlessly for teams already familiar with AWS tooling.
How do I generate presigned URLs and configure public access?
Cloudflare R2 presigned URL generation allows temporary, authenticated access to private objects without exposing credentials. The skill teaches you to create presigned URLs programmatically and configure public bucket access for static asset hosting. You'll learn both approaches: restricting access via presigned URLs and opening buckets for direct serving.
What are r2 worker bindings and how do I use them?
Cloudflare R2 worker bindings let you access R2 buckets directly from Cloudflare Workers server-side code. The skill shows you how to bind R2 buckets in your wrangler.toml configuration and interact with objects via the Workers runtime. This enables server-side file operations, transformations, and conditional logic without exposing bucket credentials to clients.
How do I configure lifecycle rules and CORS for r2 buckets?
Cloudflare R2 lifecycle rules automate object expiration and archival, reducing storage costs over time. CORS policies control which origins can access your bucket from browsers. The skill covers setting expiration policies, configuring allowed methods and headers, and troubleshooting cross-origin requests for seamless integration with web applications.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Cloudflare R2
S3-compatible object storage with zero egress fees, built on Cloudflare's global network.
When to Use
- Storing user uploads, media files, backups, or static assets.
- Replacing AWS S3 to eliminate egress costs for read-heavy workloads.
- Serving files at the edge via Workers or public bucket access.
- Building multi-cloud storage that avoids vendor lock-in (S3 API compatible).
- Storing ML model artifacts, training data, or inference results.
Prerequisites
- Cloudflare account with R2 enabled (dashboard > R2 > subscribe).
- Wrangler CLI v3+ installed:
npm install -g wrangler. - Authenticated via
wrangler loginorCLOUDFLARE_API_TOKEN. - For S3 API access: R2 API token created under R2 > Manage R2 API Tokens.
Bucket Management with Wrangler
Create and List Buckets
```bash
Create a new bucket
npx wrangler r2 bucket create app-assets
Create a bucket in a specific region (hint for data locality)
npx wrangler r2 bucket
(truncated - see the full file via the links below)
File tree — 1 file
infrastructure/cloudflare/cloudflare-r2/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Set up and manage Cloudflare R2 buckets with zero egress fees”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
r2-storage provides S3-compatible object storage through Cloudflare R2, enabling you to upload, download, and manage files, images, videos, and structured data. The skill includes patterns for multipart uploads, conditional operations, custom metadata, range requests, and AWS SDK integration.
Cloudflare R2 provides production-ready patterns for S3-compatible object storage within Workers. Configure buckets and bindings, then use core APIs like put(), get(), delete(), and list() to manage files, with built-in support for multipart uploads, presigned URLs, CORS, and metadata handling.
r2-upload is a TypeScript MCP skill for uploading files to Cloudflare R2, AWS S3, or any S3-compatible storage service. It automatically generates secure, time-limited presigned URLs for downloads with customizable expiration—defaulting to 5 minutes—and supports multiple bucket configurations with automatic content-type detection.
Cloud Uploader transfers promo videos and album samplers to Cloudflare R2 or AWS S3, enabling web hosting, direct sharing, and CDN delivery. Configure your cloud provider credentials, verify your promo files exist, then run a dry-run preview before uploading with optional public access settings.
Vite Flare Starter clones and configures a complete Cloudflare full-stack template into a standalone, production-ready project. It bundles React 19, Hono on Workers, D1 with Drizzle ORM, better-auth, R2 storage, Workers AI, and TanStack Query—all pre-wired and ready to deploy after running setup.
pinme-r2 handles secure file uploads and downloads to your project's R2 bucket with automatic authentication and authorization. It provides streaming handlers for uploads, downloads with Range support, and metadata operations—all while keeping object keys server-controlled and enforcing size and media-type policies.
More skills cloudflare-workers-security (MIT) · aws-s3 (MIT) · cloudflare-pages (MIT) · firewall-config (MIT)