accept-element
Aceitar uma contribuição externa de Remotion Element verificando suas prévias commitadas, enviando-as para o R2, removendo os ativos temporários e preparando o…
npx skills add https://github.com/remotion-dev/remotion --skill accept-elementAccept a Remotion Element
This is a maintainer-only workflow for contributions that used the external path in the submit-element skill. Do not use it for a repository writer's direct submission, which already has public preview URLs and no committed preview assets. Read the Element contribution guide, the scaffold-element skill, and the submit-element skill completely before making changes.
Run this workflow on the external contributor's pull request branch. Do not force push. For a pull request from a fork, confirm that “Allow edits from maintainers” is enabled. If the branch cannot be updated, upload only after approval and ask the contributor to apply the URL and asset cleanup described below.
1. Confirm the contribution is reviewable
Identify the single submitted <category>/<slug> and confirm that:
- The implementation, page, central definition, and sidebar registration are in the pull request.
- The page frontmatter and central definition use
/elements/<category>-<slug>-preview.pngand.mp4review URLs. - The matching files are committed at
packages/docs/static/elements/<category>-<slug>-preview.pngand.mp4. - The contributor explicitly reviewed the Element in Studio and approved both committed preview assets.
- The pull request has passed code review against the Element contribution guide.
Do not accept an Element whose metadata already points to a missing https://remotion.media asset or whose review assets are available only outside the pull request.
2. Verify the committed assets against the final code
Run the focused test, then render the Element again from the final pull request source:
cd packages/docs
bun test src/test/elements.test.ts
bun run render-element-previews --element=<category>/<slug>
cd ../..
Give the maintainer these committed asset paths:
packages/docs/static/elements/<category>-<slug>-preview.pngpackages/docs/static/elements/<category>-<slug>-preview.mp4
Also give them the fresh render paths:
packages/docs/.element-previews/<category>/<slug>/preview.pngpackages/docs/.element-previews/<category>/<slug>/preview.mp4
Ask the maintainer to visually compare the committed assets with the fresh render and confirm that they represent the same poster frame and animation. Stop and wait for explicit approval of the final source and both committed assets before uploading. Do not infer approval from the agent's own inspection. If the maintainer rejects them, return the contribution to the submission workflow.
3. Upload the exact approved files
With maintainer R2 credentials in packages/docs/.env, run:
cd packages/docs
bun run upload-element-preview \
--element=<category>/<slug> \
--source=submission
cd ../..
Running the command from packages/docs makes Bun load packages/docs/.env. Element preview uploads do not use packages/remotion-media/.env; do not use the generic upload-r2 or offload-r2 skills for them.
This command uploads the exact files from packages/docs/static/elements; it does not rerender or delete them. The explicit submission source validates that the assets are committed and unmodified, then checks the local paths, signatures, combined size, uploaded sizes, public HTTP responses, and content types. Do not continue unless both uploads are verified.
The command prints the public URLs:
https://remotion.media/elements/<category>-<slug>-preview.pnghttps://remotion.media/elements/<category>-<slug>-preview.mp4
4. Convert the contribution to its published state
Only after the upload succeeds:
- Replace the local
posterUrlandvideoUrlinpackages/docs/src/components/Elements/element-definitions.tswith the printedhttps://remotion.mediaURLs. - Replace the local
imageURL inpackages/docs/elements/<category>/<slug>/index.mdxwith the public poster URL. - Delete the two files from
packages/docs/static/elements. - Remove
packages/docs/static/elementsif it is empty.
Do not change the slug or flat asset names between upload and cleanup.
5. Validate and update the pull request
cd packages/docs
bun test src/test/elements.test.ts
cd ../..
bun run build
bun run stylecheck
git diff --check
git status --short
The focused test now validates that the metadata contains the exact public URLs and that no matching local review assets remain.
Inspect the final diff. It should contain the Element source, page, definition, gallery registration, and public URLs, but not the PNG or MP4. Commit the acceptance cleanup normally to the same pull request branch and push without force. Then stop and report that the pull request is ready for review.