r2-storage

Manage Cloudflare R2 object storage (upload, download, list, delete, presigned URLs) using boto3 S3-compatible API. Supports CLI usage and importable Python module.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "r2-storage" with this command: npx skills add Jack2/openclaw-skill-r2-storage

r2-storage Skill

Manage Cloudflare R2 buckets and objects via the S3-compatible API. Uses boto3 under the hood.

When to Use This Skill

Use this skill whenever Marouane needs to:

  • Upload files to R2 (backups, assets, media)
  • Download files from R2
  • List bucket contents
  • Delete objects
  • Generate temporary pre-signed URLs for sharing

Credentials

Set via environment variables (defaults are pre-configured for Marouane's account):

VariableDescription
R2_ACCESS_KEY_IDR2 Access Key ID
R2_SECRET_ACCESS_KEYR2 Secret Access Key
R2_ENDPOINTR2 endpoint URL
R2_ACCOUNT_IDCloudflare Account ID

CLI Usage

# Upload
python3 scripts/r2.py upload myfile.txt my-bucket
python3 scripts/r2.py upload myfile.txt my-bucket --key folder/myfile.txt

# Download
python3 scripts/r2.py download my-bucket/folder/myfile.txt ./local-copy.txt

# List
python3 scripts/r2.py list my-bucket
python3 scripts/r2.py list my-bucket --prefix folder/

# Delete
python3 scripts/r2.py delete my-bucket/folder/myfile.txt

# Pre-signed URL (default 1h)
python3 scripts/r2.py presign my-bucket/folder/myfile.txt
python3 scripts/r2.py presign my-bucket/folder/myfile.txt --expires 86400

Python Import Usage

from scripts.r2 import upload, download, list_objects, delete, presign

# Upload
upload("local.txt", "my-bucket", key="optional/key.txt")

# List
objects = list_objects("my-bucket", prefix="folder/")
for obj in objects:
    print(obj["key"], obj["size"])

# Pre-signed URL
url = presign("my-bucket", "folder/file.txt", expires=3600)

Requirements

  • Python 3.8+
  • boto3 (python3-boto3 on Ubuntu — already installed on vps118558)

Notes

  • Cloudflare R2 is S3-compatible; standard boto3 patterns apply.
  • Pre-signed URLs work for GET requests only (public download links).
  • The region_name="auto" is required for R2 compatibility.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Cloudflare R2 CLI

Minimal Python CLI for secure upload, download, list, and delete operations on Cloudflare R2 storage using AWS Signature V4 authentication.

Registry SourceRecently Updated
3600Profile unavailable
Automation

pidrive

Private file storage for AI agents. Mount S3 as a filesystem via WebDAV. Use standard unix commands (ls, cat, grep, cp, rm). All persistent data in S3, small...

Registry SourceRecently Updated
580Profile unavailable
Coding

App Legal Pages

Generate and deploy app Privacy Policy and Terms of Service static websites from an app feature document. Use when a user provides app requirements/feature d...

Registry SourceRecently Updated
2000Profile unavailable
Coding

Ghost Browser

Automated Chrome browser using nodriver for AI agent web tasks. Full CLI control with LLM-optimized commands — text-based interaction, markdown output, sessi...

Registry SourceRecently Updated
2740Profile unavailable