editframe
Build, preview, and render videos with Editframe, the HTML/CSS/React video composition tool. Use this whenever the user mentions Editframe, wants code-generated videos, asks to scaffold an Editframe project, build an HTML/CSS video composition, render MP4 locally, use ef-timegroup/ef-video/ef-audio/ef-text components, or automate video generation with Node.js and FFmpeg.
Best use case
editframe is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Build, preview, and render videos with Editframe, the HTML/CSS/React video composition tool. Use this whenever the user mentions Editframe, wants code-generated videos, asks to scaffold an Editframe project, build an HTML/CSS video composition, render MP4 locally, use ef-timegroup/ef-video/ef-audio/ef-text components, or automate video generation with Node.js and FFmpeg.
Teams using editframe should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/editframe/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How editframe Compares
| Feature / Agent | editframe | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Build, preview, and render videos with Editframe, the HTML/CSS/React video composition tool. Use this whenever the user mentions Editframe, wants code-generated videos, asks to scaffold an Editframe project, build an HTML/CSS video composition, render MP4 locally, use ef-timegroup/ef-video/ef-audio/ef-text components, or automate video generation with Node.js and FFmpeg.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Editframe
Editframe builds videos with code. Compositions are HTML pages using Editframe custom elements, CSS animations, browser-rendered media, and optional React. The CLI renders MP4 locally with headless Chrome and FFmpeg.
## Before building
1. Confirm Node.js is installed. Prefer Node 22+ for current docs, Node 18+ is the minimum from the getting-started page.
2. Confirm FFmpeg is installed and on `PATH`.
3. Ask what kind of project they want:
- Single video: product demo, social video, explainer, personal project.
- Reusable video template with variable data/assets.
- Video editing tool with Editframe as the engine.
- Video workflow automation that generates videos from triggers or inputs.
- Something else.
4. Ask what assets they have: local paths, URLs, clips, images, audio, brand files, website pages.
5. Ask whether they prefer `html` or `react`. If no preference, choose `html` for simple single videos and `react` for data-driven/templates or complex components.
If the user provides website URLs as a source, download and cache relevant assets first: HTML, stylesheets, images, video, audio. Use local paths in the composition so renders are reproducible.
## Scaffold
Use one of these:
```bash
npm create @editframe@latest -- html --global
npm create @editframe@latest -- react --global
```
If those flags fail because the CLI changed, fall back to the interactive scaffold:
```bash
npm create @editframe@latest
```
Then choose `html` or `react`.
## Preview
Start the dev server as a tracked background process when available:
```bash
npm start
```
It prints a localhost URL, commonly `http://localhost:4321`. Use the preview to verify timing, layout, and media. Hot reload should work while editing.
## Core composition model
Use `<ef-timegroup>` as the timing primitive. Every composition needs a root timegroup that defines the canvas and timeline.
Common modes:
- `mode="sequence"`: children play one after another. Use for scenes.
- `mode="fixed"`: children overlap. Use `duration` and optional `offset`.
- `mode="contain"`: duration becomes the longest internal temporal child. Useful for video/audio clips.
- `mode="fit"`: duration stretches to match the parent. Useful for full-length backgrounds or music.
Use CSS time strings: `500ms`, `2s`, `2.5s`.
Root canvas defaults for 1080p:
```html
<ef-timegroup mode="sequence" fps="30" class="relative w-[1920px] h-[1080px] overflow-hidden bg-black">
<!-- scenes -->
</ef-timegroup>
```
Preview controls can be wrapped with:
```html
<ef-preview>
<ef-timegroup id="composition" mode="sequence" class="relative w-[1920px] h-[1080px]"></ef-timegroup>
<ef-scrubber></ef-scrubber>
<ef-time-display></ef-time-display>
<ef-toggle-play></ef-toggle-play>
</ef-preview>
```
## Media and timing patterns
Add video:
```html
<ef-timegroup mode="contain">
<ef-video src="assets/clip.mp4"></ef-video>
</ef-timegroup>
```
Trim clips:
```html
<ef-timegroup mode="sequence">
<ef-video src="assets/clip1.mp4" sourceout="4s"></ef-video>
<ef-video src="assets/clip2.mp4" sourcein="8s" sourceout="12s"></ef-video>
</ef-timegroup>
```
Overlay content by wrapping media and HTML in a fixed/contain timegroup:
```html
<ef-timegroup mode="contain" class="relative">
<ef-video src="assets/demo.mp4" class="absolute inset-0 w-full h-full object-cover"></ef-video>
<ef-timegroup mode="fixed" duration="3s" offset="1s" class="absolute bottom-16 left-16">
<ef-text class="text-white text-6xl font-bold">New feature</ef-text>
</ef-timegroup>
</ef-timegroup>
```
Sequence transitions use `overlap` and Editframe CSS variables:
```html
<ef-timegroup mode="sequence" id="scenes" overlap="1s">
<ef-timegroup mode="fixed" duration="3s" class="scene bg-indigo-900"></ef-timegroup>
<ef-timegroup mode="fixed" duration="3s" class="scene bg-rose-900"></ef-timegroup>
</ef-timegroup>
<style>
#scenes > ef-timegroup {
animation:
fade-in var(--ef-transition-duration) ease-out both,
fade-out var(--ef-transition-duration) ease-in var(--ef-transition-out-start) both;
}
</style>
```
CSS animations are synchronized to the composition timeline. Use `var(--ef-duration)` when an animation should match an element's duration.
## Render
Render local composition:
```bash
npx editframe render -o output.mp4
```
Useful flags:
```bash
npx editframe render path/to/composition.html -o output.mp4
npx editframe render --url http://localhost:4321 -o output.mp4
npx editframe render -o output.mp4 --fps 60
npx editframe render -o output.mp4 --scale 2
npx editframe render -o output.mp4 --to-ms 5000
npx editframe render -o output.mp4 --from-ms 2000 --to-ms 7000
npx editframe render -o output.mp4 --data '{"title":"My Video"}'
npx editframe render -o output.mp4 --data-file data.json
```
Always verify the final MP4 exists and has a plausible duration/size. If possible, inspect the video or extract frames with FFmpeg before calling it done.
## API notes
Local rendering needs no account or API key. Cloud/API workflows use `EDITFRAME_API_KEY`. Never hardcode it.
File upload flow:
1. `POST https://editframe.com/api/v1/files` with `Authorization: Bearer $EDITFRAME_API_KEY`, content type, `X-Filename`, and raw bytes.
2. Poll `GET /api/v1/files/{id}` until `status` is `ready` or `failed`.
3. Sign the URL via the URL signing endpoint before using uploaded media as `src`.
Use the API only when the user asks for cloud rendering, hosted files, webhooks, or signed URLs. For normal local video creation, use the CLI.
## Common pitfalls
- FFmpeg missing from `PATH` causes render failures.
- Remote assets make renders flaky. Prefer local cached files.
- A root timegroup should define canvas size and FPS.
- `loop` helps preview playback but does not change the final render duration.
- Children in `fixed` mode overlap. Use `offset` if they should start later.
- Final FPS comes from the root timegroup.
- For complex reusable templates, pass data with `--data-file` instead of hardcoding copy/assets.
## References
Read `references/agent-prompt.md` when starting a new Editframe project with a user.
Read `references/docs-summary.md` for compact docs on composition, CLI render flags, and API files.
## Skill source
Use these sources to refresh or update this skill later:
- Main getting-started page: https://editframe.com/getting-started
- Docs getting started: https://editframe.com/docs/getting-started
- Time model docs: https://editframe.com/docs/composition/time-model
- Render CLI docs: https://editframe.com/docs/cli/render
- Files API docs: https://editframe.com/docs/api/files
- Embedded agent prompt: inspect https://editframe.com/getting-started page source and fetch the current bundled JS asset matching `AgentPrompt*.js`. Do not rely on a previously captured hashed asset URL because it changes on deploy.
Update procedure:
1. Re-fetch the URLs above.
2. From the getting-started page source, find the current `AgentPrompt*.js` asset and check it for the exported agent prompt string.
3. Update `references/agent-prompt.md` with the verbatim prompt if it changed.
4. Update `references/docs-summary.md` and this SKILL.md with any changed commands, flags, components, or pitfalls.
5. Run `skill_view(name="editframe")` to verify the skill loads and linked files are discoverable.Related Skills
writer
Write content in Eric's voice — articles, blog posts, tweets, social media posts, marketing copy, newsletter drafts. Loads WRITING-STYLE.md and enforces kill phrases.
positioning-angles
Use when defining product positioning, choosing strategic angles, crafting value propositions, competitive positioning, product messaging, differentiation strategy, or go-to-market angles. Also use for 'how should I position my app', 'what angle should I use', 'painkiller vs vitamin', or 'market positioning'.
outline-generator
Use when generating outlines, article structures, content outlines, blog outlines, planning article sections, structuring posts, breaking down topics into sections, or organizing ideas for long-form content. Also use for 'outline this', 'structure this article', or 'plan the sections'.
last30days-open
Use only when the user explicitly asks for the open variant of last30days, including watchlists, briefings, and history queries. Sources: Reddit, X, YouTube, web.
last30days
Use when researching what happened in the last 30 days on a topic. Also triggered by 'last30'. Sources: Reddit, X, YouTube, web. Produces expert-level summary with copy-paste-ready prompts.
hooks
Use when generating hooks, headlines, titles, and scroll-stopping openers for content. Also use when analyzing viral posts, Reels, TikToks, YouTube Shorts, or successful social examples to extract reusable hook patterns and improve hook guidance.
evaluate-content
Use when judging content quality OR editing/improving existing copy: shareability, readability, voice, cuttability, angle, copy sweeps.
editor-in-chief
Use when a first draft is complete and all Phase 1 gates are done: topic selected (seo-research), title approved (hooks), outline approved (outline-generator), draft written (writer). Runs autonomous diagnosis-prescribe-rewrite loop before Substack.
copywriting
Write or improve marketing copy for any surface: pages, ads, app stores, landing pages, TikTok/Meta scripts, push notifications, UGC. Combines page copy frameworks with direct response principles.
content-strategy
Use when building content strategy: hooks, angles, and ideas from what's trending now. Covers organic and paid creative across TikTok, X, YouTube, Meta, LinkedIn.
content-pipeline
Orchestrator for the 3-article content pipeline — runs research phase, spawns parallel article sub-agents, creates Typefully drafts. Use when running the full content pipeline (usually via cron at 3am).
yt-dlp
Download audio/video from YouTube and other sites using yt-dlp. Use when the user asks to download music, songs, albums, podcasts, or video from YouTube or similar platforms. Triggers on 'download song', 'get mp3', 'yt-dlp', 'youtube download', 'rip audio'.