Publish to R2 from your prompt.

One skill and CLI script for your default Cloudflare website bucket.

Install upcloud
upcloud file.html
Target bucket: DEFAULT_UPCLOUD_BUCKET R2 static website
Coding agent or shell input
  • Agent file prompt "upcloud file.html"
  • Agent directory prompt "upcloud this dir"
  • Direct CLI force flag upload -f file.html
Resolved bucket destination
  • Root object check /file.html
  • Confirmed folder prefix /upcloud/*
  • Overwrite without prompt /file.html
$ upload . CLOUDFLARE_DEFAULT_ACCOUNT_ID=foo
14 files, 412.8 KB Upload to /upcloud/? [y/N] y
Agent prompts and CLI calls share one Cloudflare R2 bucket.

Four steps collapse into one command.

Skip the dashboard, bucket flags, and manual overwrite checks.

Manual R2 upload routine

  1. Pass the account ID and bucket name on every run
  2. Check whether file.html already exists at the root
  3. Count directory files and byte size before syncing
  4. Repeat the same flags across agent and shell

With the upcloud skill and script

Agent: “upcloud file.html” DEFAULT_UPCLOUD_BUCKET/file.html
Shell: $ upcloud file.html Checks root before writing
Shell: $ upload -f file.html Overwrites root file
Shell: $ upload . Prints file count and size first
Every invocation targets DEFAULT_UPCLOUD_BUCKET automatically.

Every invocation checks before writing.

Switch between agent phrases, root files, force flags, and directory syncs.

Ask your coding agent in plain words

Say “upcloud this file” to publish a file to the bucket root, or “upcloud this dir” to confirm and upload a folder under a matching prefix.

Single file
DEFAULT_UPCLOUD_BUCKET/file.html
Directory
DEFAULT_UPCLOUD_BUCKET/folder/*
> upcloud index.html
Uploading to DEFAULT_UPCLOUD_BUCKET/index.html

> upcloud this dir
Target: DEFAULT_UPCLOUD_BUCKET/upcloud/
Confirm upload? [y/N] y
Uploaded folder to /upcloud/

Three environment variables run the script.

Missing credentials print usage help and exit before touching the network.

Variable Sample setting Role in upcloud
DEFAULT_UPCLOUD_BUCKET DEFAULT_UPCLOUD_BUCKET=site-bucket R2 bucket configured to serve static website assets
CLOUDFLARE_DEFAULT_ACCOUNT_ID CLOUDFLARE_DEFAULT_ACCOUNT_ID=foo Account identifier owning the target R2 bucket
CLOUDFLARE_API_TOKEN CLOUDFLARE_API_TOKEN=bar API token with R2 object read and write access
Unset variable behaviour Prints help to stdout Halts immediately and prints required exports

Install the skill and export your tokens.

Add skills/upcloud/SKILL.md from btbytes/skills to your coding agent, link the CLI script, and set your Cloudflare R2 credentials.

Four ways to set up upcloud

  1. Install with npx skills: Run npx skills add btbytes/skills --skill upcloud -g to install upcloud/SKILL.md globally across supported coding agents.
  2. Or clone and sync locally: Clone github.com/btbytes/skills and run ./scripts/sync-skills.sh --skill upcloud to symlink into ~/.agents/skills, ~/.gemini/skills, ~/.claude/skills, ~/.cursor/skills, and ~/.codex/skills.
  3. Add CLI scripts to PATH: Symlink skills/upcloud/scripts/upcloud and upload into ~/.local/bin (or add the scripts/ directory to PATH) to run commands directly in your shell.
  4. Export Cloudflare R2 variables: Set DEFAULT_UPCLOUD_BUCKET, CLOUDFLARE_DEFAULT_ACCOUNT_ID, and CLOUDFLARE_API_TOKEN in your shell profile. Missing variables print usage help and exit safely.
View SKILL.md
1. Install skill & link CLI
# Option A: Install globally via npx skills
$ npx skills add btbytes/skills --skill upcloud -g

# Option B: Clone repo & symlink to local coding agents
$ git clone https://github.com/btbytes/skills.git && cd skills
$ ./scripts/sync-skills.sh --skill upcloud

# Optional: Symlink CLI scripts to ~/.local/bin
$ ln -sf "$PWD/skills/upcloud/scripts/upcloud" ~/.local/bin/upcloud
$ ln -sf "$PWD/skills/upcloud/scripts/upload" ~/.local/bin/upload
2. Fallback help output when env vars are unset
$ upcloud file.html
Missing Cloudflare environment variables.

Set these before running upcloud:
  CLOUDFLARE_DEFAULT_ACCOUNT_ID=foo
  CLOUDFLARE_API_TOKEN=bar
  DEFAULT_UPCLOUD_BUCKET=site-bucket

Usage:
  upcloud <file.html>    Upload file to bucket root
  upload -f <file.html>  Overwrite root file immediately
  upload .               Print count and size, then sync
Install from btbytes/skills/skills/upcloud/SKILL.md and export R2 tokens.