Upload R2
Upload large Remotion repository assets to the Cloudflare R2 bucket behind remotion.media and replace local public/ assets with hosted URLs. Use when a file is too large for Git or when a PR should avoid committing media binaries by hosting them on remotion.media.
Get the complete skill folder, including its scripts and reference files.
When to use this skill
Use Upload R2 when an AI agent needs a reusable SKILL.md workflow for this job: Upload large Remotion repository assets to the Cloudflare R2 bucket behind remotion.media and replace local public/ assets with hosted URLs. Use when a file is too large for Git or when a PR should avoid committing media binaries by hosting them on remotion.media.
When not to use it
Skip Upload R2 when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.
How to install
Where will you use it?
mkdir -p ~/.claude/skills/upload-r2 # Save SKILL.md to ~/.claude/skills/upload-r2/SKILL.md
- Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/upload-r2/SKILL.md. For a shared project, commit the folder at .claude/skills/upload-r2/ instead.
- Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
- For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.
Full install guide for Claude, Cursor, and Codex →
Try a starter prompt
After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.
Use the Upload R2 skill for this task: Find the main worktree:. Confirm any required inputs or files before making changes.
What supports this recommendation?
83/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.
- Documentation
- 92/100
- Practical detail
- 92/100
- Source evidence
- 63/100
- Source signals
- 70/100
Model compatibility evidence
- claudeuntested
No model-specific signal or recorded compatibility test was found.
- chatgptuntested
No model-specific signal or recorded compatibility test was found.
- geminiuntested
No model-specific signal or recorded compatibility test was found.
- copilotuntested
No model-specific signal or recorded compatibility test was found.
- llamauntested
No model-specific signal or recorded compatibility test was found.
- perplexityuntested
No model-specific signal or recorded compatibility test was found.
- mistraluntested
No model-specific signal or recorded compatibility test was found.
- grokuntested
No model-specific signal or recorded compatibility test was found.
Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.
What this skill does
# Upload R2 Asset
Use this for large media assets that should be hosted on `https://remotion.media/` instead of committed to Git.
## Workflow
1. Find the main worktree: ```bash git worktree list --porcelain ``` Prefer the worktree on `refs/heads/main`, usually `/Users/jonathanburger/remotion`.
2. Load R2 credentials from the main worktree: ```bash --env-file=/Users/jonathanburger/remotion/packages/remotion-media/.env ``` Do not print secret values. The required variables are `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
3. Upload the file to the `parser-media` bucket using Bun's S3-compatible client: ```bash bun --env-file=/Users/jonathanburger/remotion/packages/remotion-media/.env -e "import {S3Client} from 'bun'; const filePath='<local-file>'; const key='<remote-file-name>'; const client=new S3Client({accessKeyId:Bun.env.AWS_ACCESS_KEY_ID, secretAccessKey:Bun.env.AWS_SECRET_ACCESS_KEY, endpoint:'https://2fe488b3b0f4deee223aef7464784c46.r2.cloudflarestorage.com', bucket:'parser-media'}); const file=Bun.file(filePath); if (await client.exists(key)) { const stat=await client.stat(key); if (stat.size===file.size) { console.log('exists-same-size', key, file.size); process.exit(0); } } await client.write(key, file); const stat=await client.stat(key); console.log('uploaded', key, stat.size);" ```
4. Verify the public URL: ```bash curl -I --fail https://remotion.media/<remote-file-name> ```
5. Replace local asset usage with the hosted URL and delete the local binary.
Do not wrap remote URLs in `staticFile()`: `staticFile()` rejects `http://` and `https://` URLs. Use the URL string directly, for example: ```tsx <Video src="https://remotion.media/example.mp4" /> ```
6. Run the focused lint or stylecheck for touched packages, then commit and push.
Intended uses
- Find the main worktree:
- Load R2 credentials from the main worktree:
- Upload the file to the parser-media bucket using Bun's S3-compatible client:
- Verify the public URL:
- Replace local asset usage with the hosted URL and delete the local binary.
- Run the focused lint or stylecheck for touched packages, then commit and push.
Implementation notes
- Review the source instructions and adapt inputs before running the workflow.
Try it, then tell us how it went
A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.