High Risk:This skill has significant security concerns. Review the findings below before installing.

r2

Caution·Scanned 2/18/2026

This skill manages Cloudflare R2 using rclone and includes scripts for setup, upload, download, sync, and credential display. It instructs executing curl -fsSL https://rclone.org/install.sh | sudo bash, writes/reads ~/.config/rclone/rclone.conf and ~/.config/r2/config.json, and requires R2_* credentials.

from clawhub.ai·veb5c5d1·10.6 KB·0 installs
Scanned from 1.0.0 at eb5c5d1 · Transparency log ↗
$ vett add clawhub.ai/junwatu/r2Review security findings before installing

r2 ☁️

Cloudflare R2 Storage management using rclone.

Install

curl -fsSL https://rclone.org/install.sh | sudo bash

Credentials Required

Set R2_CONFIG in dashboard with this JSON format:

{
  "access_key_id": "YOUR_ACCESS_KEY_ID",
  "secret_access_key": "YOUR_SECRET_ACCESS_KEY",
  "endpoint": "https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com",
  "bucket": "your-bucket-name"
}

Get credentials from Cloudflare:

  1. Go to https://dash.cloudflare.com → R2
  2. Create API token with Object Read/Write/List permissions
  3. Copy Account ID (from R2 dashboard URL)
  4. Endpoint format: https://<account_id>.r2.cloudflarestorage.com

Setup

# Quick setup
r2-setup --config '{"access_key_id":"...","secret_access_key":"...","endpoint":"...","bucket":"..."}'

Or run interactively:

./skills/r2/scripts/setup.sh

Commands

Upload

r2-upload /path/to/file.txt              # Upload single file
r2-upload /path/to/folder/               # Upload folder contents
r2-upload /path/to/file.txt --bucket other-bucket  # Upload to specific bucket

Download

r2-download file.txt /local/path/        # Download single file
r2-download folder/ /local/              # Download folder
r2-download file.txt                     # Download to current dir

List

r2-ls                                    # List bucket contents
r2-ls my-bucket                          # List specific bucket
r2-ls --long                             # Long format with sizes

Sync (One-way)

r2-sync /local/folder/ r2:bucket/        # Local → R2
r2-sync r2:bucket/ /local/folder/        # R2 → Local
r2-sync /local/ r2:bucket/ --delete      # Mirror (delete extra files on dest)

Delete

r2-rm file.txt                           # Delete single file
r2-rm folder/                            # Delete folder contents
r2-purge my-bucket                       # Delete all files in bucket

Show Credentials

./skills/r2/scripts/show-creds.sh           # Human-readable
./skills/r2/scripts/show-creds.sh --raw     # JSON format for UI

Direct rclone Commands

# Copy files
rclone copy /local/file.txt r2:bucket/

# Sync with progress
rclone sync /local/ r2:bucket/ -P

# Check disk usage
rclone size r2:bucket

Config Location

  • Env config: ~/.config/r2/config.json (or dashboard R2_CONFIG)
  • rclone config: ~/.config/rclone/rclone.conf
  • Named remote: r2

Troubleshooting

403 Access Denied

Token lacks permissions. Update API token in Cloudflare with:

  • Object Read ✅
  • Object Write ✅
  • Object List ✅

Bucket Not Found

Create the bucket first:

rclone mkdir r2:bucket-name