Assets To R2 — DevOps skill for Claude Code
Claude skill + Bun CLI: move committed repo assets to Cloudflare R2 behind cdn.nuasite.com, rewriting references to absolute CDN URLs so nuasite keeps emitting correct /cdn-cgi/image transform.
How to install Assets To R2
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open contember/assets-to-r2 and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Assets To R2 does
Claude skill + Bun CLI: move committed repo assets to Cloudflare R2 behind cdn.nuasite.com, rewriting references to absolute CDN URLs so nuasite keeps emitting correct /cdn-cgi/image transforms
Alternatives in DevOps
- Claudable — Claudable is an open-source web builder that leverages local CLI agents, such as Claude Code, Codex, Gemini CL 4k ★
- WP CLI And Ops — WordPress CLI and operations management 902 ★
- Codeg — Aggregate and browse AI coding agent sessions (Claude Code, Codex, Gemini CLI, etc.) in one place 850 ★
README
assets-to-r2
A Claude Code skill (plus a standalone Bun CLI) that moves heavy binary assets out of a git repository onto Cloudflare R2 behind `cdn.nuasite.com`, and rewrites every reference to absolute CDN URLs.
Built for the recurring problem where a site repo accumulates gigabytes of committed article photos, uploaded PDFs and crawled media — typically after a site rebuild — and every clone pays for it.
Why the rewrite is mandatory
The nuasite `` component (`@nuasite/components`) builds Cloudflare transform URLs by splicing the origin of `src` into the prefix:
src |
emitted |
|---|---|
/assets/a.jpg |
/cdn-cgi/image/…/assets/a.jpg — against the site's own host |
https://cdn.nuasite.com/assets/x/a.jpg |
https://cdn.nuasite.com/cdn-cgi/image/…/assets/x/a.jpg |
Same-zone is structural — the component never emits a cross-origin form. So once an asset lives on R2, a root-relative reference asks the site's zone to transform a file it no longer hosts. See `reference/nuasite-image.md`.
Install
Clone into your Claude skills directory; the checkout *is* the skill:
git clone git@github.com:contember/assets-to-r2.git ~/.claude/skills/assets-to-r2
Claude picks it up automatically. Requires Bun — the CLI has no dependencies (it uses `Bun.S3Client`).
Use
Ask Claude: *"presuň assety z tohohle repa na CDN"*. Or drive the CLI directly from the target repo's root:
A2R=~/.claude/skills/assets-to-r2/scripts/a2r.ts
bun $A2R preflight --slug my-project # prove creds + that the zone fronts the bucket
bun $A2R inventory --slug my-project # classify assets → .a2r/plan.json
bun $A2R mark move --class uncertain # adjust the plan
bun $A2R upload --dry-run # then without --dry-run
bun $A2R rewrite # dry-run; then --apply
bun $A2R verify # CDN reachability + a real cdn-cgi transform
bun $A2R prune --apply # del
Related Skills
Agentspodium Com Deploy App
Deploy a project from a git repository onto AgentsPodium: frontend and backend on one pod, behind one domain,
Claude Code Generate Images MCP
Auto generate and insert image assets during UI coding in Claude Code, using an MCP server for Azure OpenAI gp
Claude AWS Guard
Claude Code plugin that guards aws CLI calls from the Bash tool. Configurable profile blocklist, extra denies
Docker Claudebox
Claude Code in Docker. Drop-in OpenAI-compatible API, MCP server, Telegram bot, and CLI — five interfaces, one
Img Hosting
Private, self-hosted, Imgur-shaped image host on Cloudflare Workers (R2 + D1) — with a Claude Code skill + CLI
Pre Deploy 3gate
Use right before a production deploy or when you're about to claim work is "shipped". Runs the 3-gate verifica
Related Agents
Delivery
Packages finished renders for streaming distribution and VOD — HLS/DASH packaging with Shaka/GPAC, MP4 fragmen
Browser Stealth Agent
Stealth browser automation agent for targets behind Cloudflare, Akamai, Google, DataDome, or PerimeterX bot de
Media Orchestrator
Creates, optimizes, and orchestrates media assets — images (ResGrid, AVIF/WebP), video (clips, GIFs, Veo), aud