---
name: remotion-dev-upload-element-previews
description: "Upload a Remotion Element's preview assets to remotion.media and replace local preview URLs. Use when given an Element slug, or when exactly one Element's preview assets are present in the current worktree."
license: "NOASSERTION"
metadata:
  decimalai-skill-id: "29f183b7-eedb-4797-b1fd-e1e743daccf7"
  decimalai-version-id: "219e883b-d5a9-48b1-8f43-bbeb169224a4"
  decimalai-version: "2"
  decimalai-body-sha256: "9b26531d6992d270cbd9ab280a670f4fcee64f56860ff72ae41fcd1e76dc3c7f"
  decimalai-name: "remotion-dev/upload-element-previews"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "devops"
  decimalai-source: "https://app.decimal.ai/s/remotion-dev-upload-element-previews@2/SKILL.md"
---
# Upload Element Previews

1. Identify the Element slug. Ask if it is ambiguous.
2. Choose the source:
   - Use `render` for fresh files in `.element-previews`.
   - Use `submission` for committed files in `static/elements`.
3. Upload the previews:

```bash
cd packages/docs
bun run upload-element-preview \
  --element=<category>/<slug> \
  --source=<render|submission>
```

Each upload uses a new random URL postfix, including when the Element already has hosted previews. This keeps previews from concurrent branches independent.

4. Replace `image`, `posterUrl`, and `videoUrl` with the newly printed `remotion.media` URLs.
5. If using `submission`, delete the local review assets. If using `render`, leave `.element-previews` uncommitted.
6. Commit and push when the work belongs on a branch.
