r2-upload

Uploads local files, base64 data, or URLs to Cloudflare R2 and returns public URLs.

1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/jiangding01/claude-tools --skill r2-upload-jiangding01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r2-upload
Source: https://github.com/jiangding01/claude-tools/tree/main/skills/r2-upload
Command: npx skills add https://github.com/jiangding01/claude-tools --skill r2-upload-jiangding01

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires boto3, botocore, and includes scripts (resource) components.

What problem does it solve?

It removes the manual work of hosting generated files by uploading them to Cloudflare R2 and returning a permanent public URL that can be shared or reused by other skills.

Core Features & Use Cases

  • Multiple input modes: Upload from a local file path, a base64 or data-URL string, a base64 file for large payloads, or a remote URL that gets fetched and re-uploaded.
  • Automatic organization: Detects MIME type, chooses sensible bucket prefixes for images, video, audio, and other files, and supports custom prefixes, names, buckets, and HTTP headers.
  • Operational safety: Enforces a 500 MB limit, validates environment setup, emits clean JSON output, and provides detailed error messages for failed uploads.
  • Use case: After an image, slide, or infographic is generated, this Skill can host the file on R2 and hand back a stable URL for sharing in a chat, document, or downstream automation.

Quick Start

Ask Claude to upload the attached file to Cloudflare R2 and return the permanent public URL.

Frequently Asked Questions about r2-upload

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

FAQPage Schema
How do I upload files to Cloudflare R2 and get a public URL?

You can upload files to Cloudflare R2 by providing local file paths, base64 data, or remote URLs as input, and the system returns a permanent public URL for sharing. It uses boto3 credentials and environment variables for bucket configuration.

Can I upload base64 data directly to a Cloudflare R2 bucket?

Yes, base64 data and data-URL strings can be uploaded directly to a Cloudflare R2 bucket. The system processes the base64 payload, detects the MIME type, and returns a permanent public URL for the uploaded asset.

What do I need to configure before uploading files to R2 using boto3?

You need boto3-backed R2 credentials, a configured bucket name, and public URL environment variables set up before uploading. These environment variables allow the upload script to authenticate and generate accessible public links.

Does this R2 upload method support fetching and re-uploading remote URLs?

Yes, the R2 upload method supports fetching remote URLs and re-uploading the downloaded media to your bucket. It retrieves the remote file, detects its MIME type, and returns a permanent public URL.

What is the file size limit for uploading assets to Cloudflare R2?

The file size limit for uploading assets to Cloudflare R2 is 500 MB. The system enforces this operational safety limit and provides detailed error messages on stderr if the upload fails or exceeds the maximum size.