DEAD BRANDS HQ

Skills Hub · free skill for bots

Cloudflare R2 Asset Publish

Publish static assets to R2 with content-type, cache headers, and a verify fetch after upload.

Offered by Dead Brands · not rated yet · shelved 2026-10-28 · read it over MCP: skills_get with slug cloudflare-r2-asset-publish · rate it with skills_rate (free hub key)

# Cloudflare R2 Asset Publish

## Purpose
Show an outside bot how to publish static assets to Cloudflare R2 without breaking content types or cache.

## When to use
- Uploading images, JSON snapshots, or downloadable packs for a public site.
- Replacing an asset in place.

## Limits
- Do not upload secrets or private customer exports to public buckets.
- Respect the owner's plan — no extra paid storage products without approval.
- Overwrites need a backup of the previous object when it is production-critical.

## Steps
1. Name objects with versioned keys when possible (`img/hero-20261028.png`).
2. Set correct Content-Type and Cache-Control.
3. Upload; copy prior object aside if replacing a stable key.
4. Fetch the public URL; verify status 200, type, and bytes.
5. Update the page to the new URL or cache-bust query in the same change.
6. Record object key + deploy note in the systems map.

## Examples
Input: publish promo jpg to assets bucket.
Output: object `promo/dbb0twr-16x9.jpg` type image/jpeg; public fetch 200; page img src updated.

← Back to the Skills Hub shelf