⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
motion-prompt
Motion Prompt (showheyohtaki.github.io/motion-prompt) is a numbered library of names for motion-graphics moves, camera moves and transitions, UI components, landing-page and web effects, photo looks and lighting, art styles for image generation, and diagrams and charts for slides, each with a moving sample, a spec of its timings and easing, and dependency-free Canvas 2D code. The main use: open the gallery for the user with the pick command, let them tick what they want, receive their picks, then rebuild exactly those in the project (Canvas, Remotion, CSS/SVG/Lottie, After Effects) or turn them into prompts for video or image models. Use when the user wants to see or choose from the library, e.g. "open the motion-prompt library", "show me the list", "what moves are there?", "I don''t know the name, let me pick", "motion-prompt のライブラリ出して", "一覧見せて", "どんな演出がある?", "分からないから選びたい"; when they paste picks copied from the gallery; or when they give element numbers, e.g. "use #012 and #045", "今のタイトルを #005 に差し替えて".
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
Motion Prompt
English | 日本語
日本語の説明は README.ja.md にあります。 中文用户:所有名称一览都有简体中文和繁體中文版本,见
packs/。 En español: todas las listas de nombres están en español enpacks/. The name lists are in English, Japanese, Spanish, Simplified Chinese and Traditional Chinese (seepacks/); the gallery is in English and Japanese. For another language, givemake-your-own/prompts/en/01-translate.mdto a coding AI.
A library of names for the things you ask an AI to make. Each name comes with a moving sample, a one-line meaning and an example of how to ask for it. Ten sets are in it now, 24 names each and 240 in all: motion-graphics moves (motion), camera moves (camera), UI component names (ui), landing page and web effects (lp), photo looks, lighting and styles (photo), motion-graphics moves, part 2 (motion2), landing page and web effects, part 2 (lp2), camera moves and transitions, part 2 (camera2), art styles for image generation (artstyle), and diagrams and charts for slides (diagram). It also comes with the prompts to make the same kind of library for your own field, in your own language.
| Motion graphics | Camera moves |
|---|---|
![]() | ![]() |
- Gallery (every sample, moving): https://showheyohtaki.github.io/motion-prompt/
- Name lists you can read here on GitHub:
packs/ - Examples from other people who share names with samples (embeds and links to their posts on X): https://showheyohtaki.github.io/motion-prompt/found.html
Why I made this
I posted a few short videos that put names to motion-graphics moves and camera moves, and over the next few days a lot of comments came in. One of them said, in essence, that what had been holding them back was not a lack of imagination. It was not knowing what this kind of movement is called.
Reading that, I thought: if people who know their field, in many languages, laid out the "common language" you need to work well with AI as a library you can look through, it would be really useful. So I tried making that as a GitHub repository.
This is not one style to copy. It is a place where you can use the prompts and instructions here to make motion graphics like these, and to make the same kind of name samples for your own field, in your own language, with whatever look you like.
Another comment said: "this is how you become a creative director". Exactly. I think it would be a wonderful thing if there were more creative directors all over the world, doing great work together with AI.
Shohei Ohtaki
The names in here now
| Numbers | Pack | Names | Lists |
|---|---|---|---|
| 001–024 | motion: motion graphics moves | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
| 025–048 | camera: camera moves and transitions | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
| 049–072 | ui: UI component names | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
| 073–096 | lp: landing page and web effects | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
| 097–120 | photo: photo looks, lighting and styles | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
| 121–144 | motion2: motion graphics moves, part 2 | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
| 145–168 | lp2: landing page and web effects, part 2 | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
| 169–192 | camera2: camera moves and transitions, part 2 | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
| 193–216 | artstyle: art styles for image generation | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
| 217–240 | diagram: diagrams and charts for slides | 24 | English · 日本語 · Español · 简体中文 · 繁體中文 |
Each list gives the number, the name, what it means and an example of how to ask an AI for it, in English, Japanese, Spanish, Simplified Chinese and Traditional Chinese. The same names move in the gallery.
Each pack has its own look. The motion and motion2 packs are dark navy with four colors. The camera and camera2 packs are light gray with one blue. The ui pack is warm off-white with black and one blue, and a cursor sets each part moving. The lp and lp2 packs draw a white browser window on a pale gray desk, with a vermilion accent and blue for the pictures on the page. The photo pack has no shared palette: each card is painted in the colors of its own scene, and the effect fades in and back out so you can compare. The artstyle pack is the one pack with pictures instead of drawings: the same base sketch was given to an image model and redrawn in each style, and a diagonal wipe turns the sketch into the style. The diagram pack draws on pale gray in flat grays and three blues, and each card builds its diagram or chart piece by piece, holds it, and clears it again. That is on purpose. What a pack has to get right is the names, not a house style.
Three ways to use it
1. Open the library, pick, and send your picks to your AI
With the motion-prompt skill installed in Claude Code or Codex, asking is enough to open this gallery. You do not need to remember names or numbers. When you are not sure what something is called, have the library opened, the way you would look a word up in a dictionary.
npx skills add showheyohtaki/motion-prompt
- Ask your AI:
Open the motion-prompt library. - The gallery opens in your browser. Press "Pick" on the samples you want, as many as you like. The note field at the bottom of the screen takes a short line such as "for the opening title".
- Press "Send to AI" and your picks reach the AI. Go back to it and say what you want done:
Edit the opening of this video like this.
The agent uses only what you picked. It fetches their specs and reference code and builds them into your video or site the way your project works. Name a kind, as in "show me the camera moves", and the gallery opens filtered to that field's packs (part 1 and part 2 together where there is one).
For an AI without the skill, pick in the gallery, press "Copy picks" at the bottom of the screen and paste the text into the chat. It includes the demo and spec URLs.
When you know the numbers, you can skip the gallery and ask by number:
Use the motion-prompt skill with #012 and #045 to make this product video look professiona
// HOW IT'S BUILT
// FILES
4 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.
skills/motion-prompt/SKILL.md15 KB5bf116204d29upstream ↗
--- name: motion-prompt description: 'Motion Prompt (showheyohtaki.github.io/motion-prompt) is a numbered library of names for motion-graphics moves, camera moves and transitions, UI components, landing-page and web effects, photo looks and lighting, art styles for image generation, and diagrams and charts for slides, each with a moving sample, a spec of its timings and easing, and dependency-free Canvas 2D code. The main use: open the gallery for the user with the pick command, let them tick what they want, receive their picks, then rebuild exactly those in the project (Canvas, Remotion, CSS/SVG/Lottie, After Effects) or turn them into prompts for video or image models. Use when the user wants to see or choose from the library, e.g. "open the motion-prompt library", "show me the list", "what moves are there?", "I don''t know the name, let me pick", "motion-prompt のライブラリ出して", "一覧見せて", "どんな演出がある?", "分からないから選びたい"; when they paste picks copied from the gallery; or when they give element numbers, e.g. "use #012 and #045", "今のタイトルを #005 に差し替えて".' --- # Motion Prompt Motion Prompt is a library of names for the things people ask an AI to make (motion-graphics moves, camera moves and transitions, UI components, landing-page and web effects, photo looks and lighting, art styles for image generation, diagrams and charts for slides, and whatever packs are added later), numbered so that people and agents can refer to them precisely. Every element has a three-digit ID (`#012`), a name in English and usually in other languages too, a one-line meaning, and a live demo at `https://showheyohtaki.github.io/motion-prompt/#<id>`. - An element is one Canvas 2D drawing function, stored as `cells[i] = (ctx, w, h, u) => { … }`. `ctx` is a 2D context that the caller has cleared and wrapped in `save()`/`restore()`. `w, h` are the card size. `u` is the time in seconds, `0 <= u < cycle`. - It is a **pure function of `u`**: no clock, no randomness at draw time, no state between calls. The same code plays live and renders frame by frame, and it loops seamlessly at `u = cycle`. - It is not standalone. Constants (card size, cycle, the palette `C`, fonts) and helper functions live in the pack's **kit**. Fetch the kit once per pack you use. - Each element file states its own size and cycle. Read them from the header instead of assuming them. - New packs get added, so check the catalog with the CLI each time instead of relying on what you remember about it. Read the catalog with the script that ships next to this file (below, `<skill-dir>` means the directory holding this SKILL.md): ```sh node <skill-dir>/scripts/motion-prompt.mjs <command> ``` | Command | Use | |---|---| | `pick` | Opens the gallery in the user's browser and waits until they press 「AIに渡す」 / "Send to AI". Prints the picked elements in order (number, names, meaning, how to ask, spec, demo link) and the user's note, then exits. `--pack <pack>` opens it filtered to one pack, or to several joined by commas (`--pack camera,camera2`), `--lang ja` in Japanese, `--timeout <seconds>` (default 900), `--no-open` only prints the URL, `--local` serves the gallery from a full clone of the repository. See [Let the user pick](#let-the-user-pick). | | `search <words...>` | Ranks elements against a few words describing one scene's motion. English and Japanese both work: `search typewriter text`, `search 文字 登場`. Narrow with `--pack <pack>`; ask for more rows with `--limit 20`. | | `list` | An overview: each pack, its categories and how many elements they hold. With `--pack <pack>` it prints that pack's elements one per line (several packs joined by commas, `--pack camera,camera2`, are listed together). | | `get <id> [<id>...]` | Prints each element's spec followed by its code. One call takes at most 8 IDs. Accepts `12`, `012`, `#012` or a demo URL. | | `kit <pack>` | The shared constants and helpers that the pack's elements need. | | `prompt <id>` | The ready-made copy-paste prompt for one element. | | `info` | Where the data is being read from, how many elements it holds, its version and where the cache lives. Run it first when something looks wrong. | `--lang ja` gives Japanese names and text; the default is `--lang en`, and `search` switches to Japanese by itself when the words are Japanese (`pick` prints in the language the user browsed in, unless you pass `--lang`). `--out <dir>` writes files instead of printing them (`get`, `kit`, `prompt`). `--refresh` skips the disk cache. ## Let the user pick This is the main way to use the library. People often do not know what a move is called, and they should not have to. Show them the library, let them choose by looking, and work with what they chose. 1. **When to run it.** The user says something like 「motion-prompt のライブラリ出して」「一覧見せて」「どんな演出がある?」「分からないから選びたい」, "open the library", "show me the list", or describes a change without knowing which moves they want. Run `pick`. If the context points to one field, add `--pack` (`motion,motion2` for titles, text and motion-graphics moves, `camera,camera2` for camera moves, angles and cuts, `ui` for interface parts, `lp,lp2` for web page effects, `photo` for lighting and photo looks, `artstyle` for art styles in image generation, `diagram` for diagrams and charts in slides and documents). A field that has a part 2 is given as both packs joined by a comma, so the user sees the whole set at once (「どんなカメラワークがある?」 opens `camera` and `camera2` together). Add `--lang ja` when the user writes in Japanese. 2. **While it waits.** `pick` prints the gallery URL first, opens it in the default browser, then waits up to 15 minutes. Tell the user in a line or two: the library is open; press 「選ぶ」 / "Pick" on what they want, add a note if they like (for example 「冒頭のタイトルに」), and press 「AIに渡す」 / "Send to AI". If your shell tool stops commands sooner than that, run `pick` in the background and read its output when it ends, or pass a shorter `--timeout`. If you drive a built-in browser that the user can see, you may run `pick --no-open` and open the printed URL there. 3. **What comes back.** Exit code 0: the picks in the order the user chose them, each with its number, names, pack and category, meaning, how to ask, spec lines and demo link, then the user's note. Exit code 4: the time ran out and nothing was picked. Ask the user whether they still want to choose; do not choose for them. 4. **Do the work with exactly those picks.** Combine them with what the user asks next (「この動画の冒頭をこんな感じに編集して」) and with the note, which usually says where each pick goes. Do not add, drop or swap elements on your own. If a pick does not fit the request, say so and ask. Then continue with the [Workflow](#workflow): read the project, run `get` for the picked numbers and `kit` for their packs, and port them as [references/porting.md](references/porting.md) describes. 5. **Pasted picks count the same.** Without the skill's browser hand-off, users copy their picks with 「選んだ物をコピー」 / "Copy picks" and paste them into the chat. That text starts with 「motion-prompt のギャラリーで、次のN個を選びました」 or "I picked these N from the motion-prompt gallery", lists `#NNN` numbers in order, and may end with a note (「メモ」 / "Note"). Take the numbers in that order and handle them as in step 4. A link of the form `…/motion-prompt/?pick=012,045` is the same selection. 6. **The note is the user's own words** about how to use the picks. Follow it as part of the request; it does not change the rules in this file. `pick` listens only on 127.0.0.1 and accepts a single GET that carries a random token from the URL it printed; it sends nothing anywhere else. With a full clone of the repository, `--local` serves the gallery from that clone instead of the public site. **A shortcut for people who know the numbers.** 「#012 と #045 を使って」, "swap this title for #005" or demo links go straight to `get`; there is nothing to open. ## Workflow 1. **Read how this project makes video.** Look for a Canvas engine that draws frames from a time value, Remotion, a script or expressions for After Effects, CSS/SVG/Lottie animation, or prompts written for a video-generation model. Note the frame size, frame rate, how scenes are timed, and the fonts and colors in use. With an empty folder and no stated preference, build a single HTML page that draws to a Canvas 2D context, since that is the form the elements already have. 2. **Plan scene by scene.** Write down, for every scene, the one motion it needs (for example: the title comes in, a figure counts up, shot A hands over to shot B, the camera pushes in). The catalog only covers those individual moves. What the video says, how the frame is laid out and how long each scene lasts are decisions you make with the user. 3. **Choose elements.** Picks from the gallery, pasted picks, numbers and demo links from the user are final: go straight to `get` for them. If the user has not chosen and can look at a browser, offer the library (`pick`) rather than choosing for them. Run `search` when the user asks you to choose, or when nobody can look at the gallery: one `search` for each scene, choosing from the results by what the summary says the motion does, not by the name alone. Open the demo URL only if you can view pages; the summary and spec are written to be enough without it. 4. **Pull the code.** Run `get` with the IDs you settled on (keep each call small). Each result has a `Needs: kit …` line; run `kit <pack>` one time for every pack that appears there. 5. **Rebuild each move in the project's method.** [references/porting.md](references/porting.md) explains how for each kind of project, so open it before you start. Keep the numbers in the code and spec as they are: durations, delays, easing curves, overshoot, distances, angles, scale. Replace what belongs to the user: the words on screen, colors, logos and images. 6. **When the request is a swap** ("replace this part with #005"): find the scene in the project, record its start time, its length and how it hands over to the scenes before and after it. Replace only the motion. Keep the scene's length, its content and those hand-overs. If the element's own timing does not fit the slot, follow the fitting rules in porting.md rather than stretching every value. 7. **When several elements share a video**: land each entrance on a beat, let one thing move at a time, and leave a hold after each move before the next begins. Use one easing family per video unless the user asks for contrast. Two elements that both animate the whole frame should not overlap. 8. **Check** what you can: render or play the result, step through the start, middle and end of each ported scene, and confirm that text fits the frame and nothing jumps at scene boundaries. 9. **Report.** Close your reply with the elements that ended up in the video. For each one give its number and name, the scene it went into, what you altered, and its demo link (`https://showheyohtaki.github.io/motion-prompt/#ID`). Add a short note on whatever you were unable to verify. ## Video-generation models For Veo, Seedance, Sora and similar models, do not pass code. Write the prompt in sentences from the element's English name and its spec lines: what moves, in what order, how long each part takes, how the motion eases, and where it ends. Add the user's subject, look and aspect ratio. `prompt <id>` gives a starting text, and `get <id>` gives the full spec. These models treat timings as guidance, so say in your report that the result will be close to the element rather than exact. ## Web pages and still images Not every pack is about video. - **`ui` and `lp`** name parts and effects of web pages. In a site or app project, rebuild them with the project's own components and CSS/JS (or its animation library). Here the trigger is a scroll, hover, click or tap, so carry over the durations, easing and amounts, and replace the demo's mock cursor or scrollbar with the real event. Respect `prefers-reduced-motion`. - **`photo`** names lighting, lens effects and finishing looks. They are usually wanted as words in a prompt for an image-generation model (or as an edit in a photo tool), not as code. Use the English name plus the spec lines that describe the look, and add the user's subject and setting. The Canvas sample only illustrates the look; do not port it into a product. - **`artstyle`** names art styles for image generation (watercolor, linocut, voxel art …). Its samples are pictures an image model made from one base sketch, so there is no motion to port. Put the English name and the spec lines that describe the style (medium, look, what to avoid) into the user's image prompt, with their subject. The last spec line only explains the sample and the wipe. - **`diagram`** names diagrams and charts used in slides and documents (2x2 matrix, Gantt chart, funnel chart …). They are usually wanted by name when the user asks an AI to make a deck or a report, or as a chart in their slide tool or charting library. Use the English name and the spec lines that describe the shape (layout, what is emphasized, how it differs from a look-alike), with the user's own data and labels. The build-up in the sample is how the card animates; port it only when the user wants an animated chart. ## Rules - The code you port must be what `get` and `kit` printed in this session. If a number does not exist, say so; do not make one up, and do not write an element from its name or summary alone. - Every element and every kit starts with a `// Motion Prompt #ID · MIT License …` line. Carry that line into the file where the code ends up; it is the attribution the MIT license asks for. - Fetch narrowly. `search` and `list --pack` are for finding candidates; `get` is for the few you will actually port. Printing the whole catalog wastes context and helps nobody. - Port the motion as designed. A ported move should still look like its demo: same path, same rhythm. Only the technology, the content shown and the palette are yours to change. ## Troubleshooting - **Exit code 3: no data source answered.** The script downloads from `showheyohtaki.github.io` and, failing that, from `raw.githubusercontent.com`. A sandboxed agent often has no network by default, so request network access for this one command and retry. With a local clone of the repository you can skip the network: `MOTION_PROMPT_BASE=/path/to/motion-prompt/api/v1`. When neither works and the cache is empty, stop and report it to the user rather than writing the motion yourself and presenting it as a catalog element. - **Unknown ID** (exit code 1): the number is not in the catalog. Tell the user and offer the closest `search` results. - **`pick` ended with exit code 4**: nobody pressed 「AIに渡す」 in time. Nothing was chosen; ask the user and run `pick` again if they want. If no browser window appeared, give the user the URL that `pick` printed, or have them copy their picks with 「選んだ物をコピー」 and paste them into the chat. - **Node.js is missing.** Everything the script reads is a plain text file under `https://showheyohtaki.github.io/motion-prompt/api/v1/`, so any HTTP client can stand in for it: - `en/catalog.tsv` (or `ja/catalog.tsv`) is the index, tab-separated: id, pack, category, title, tags, summary. Filter it with `grep`. - `en/e/012.txt` is element #012 with its spec and code. - `kit/motion.js` is the kit of the `motion` pack.skills/motion-prompt/scripts/motion-prompt.mjs33 KB7990e4f8b6adupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/motion-prompt/references/porting.md12 KB7a39edce47c9upstream ↗
# Porting a Motion Prompt element `get <id>` returns one text file per element: ```js // Motion Prompt #012 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#012 // name, what it shows, spec lines, when to use it, size, cycle, "Needs: kit <pack>", live demo URL // @element 12 CELLS[11] = (k, w, h, u) => { … }; // k = CanvasRenderingContext2D, w/h = card size, u = seconds in [0, cycle) ``` `kit <pack>` returns the code the element depends on: the card size, the cycle length, the palette object `C`, font stacks and helper functions (easing, text, shapes). The kit's own header shows how to run one element by itself. Read it; it is the reference for how the pack expects to be called. Before porting, read the element's **spec** lines. They state the order of the motion and every number that matters. The code is the source of truth; the spec is the same information in words. Decide first which of two kinds of port this is: - **Run the code** (sections 1 and 2): the project can draw on a Canvas 2D context. The element's function runs unchanged and you only supply `u`, a size and a place. - **Move the numbers** (sections 3 and 4): the project animates some other way. You rebuild the move there and carry over the timings, easing and amounts. ## Time: loop or play once Every element is written as a loop of `cycle` seconds. Most contain an entrance, a hold and an exit or reset so that the loop closes. - **Looping use** (backgrounds, indicators, a gallery): `u = t % cycle`, where `t` is the time since the scene started. - **Play once and stay** (a title or caption that enters and remains): `u = Math.min(t, uHold)`, where `uHold` is a time inside the hold, after the entrance has finished. Find it from the spec lines or from the phase boundaries in the code. Do not let `u` run on into the exit. - **Play once with an exit**: drive `u` through the entrance, keep it at `uHold` for as long as the scene needs, then continue from the start of the exit when the scene ends. This keeps the entrance and exit at their designed speed whatever the scene's length. - **Fitting a fixed slot** (a swap into an existing scene): lengthen or shorten the hold, not the motion. Only if the slot is shorter than the entrance plus the exit, scale time evenly (`u = t * k`) and say so in your report. - Never pass `u` outside `[0, cycle)`. Start a scene at whatever `u` gives a clean first frame; that is usually `0`, but check the element. ## 1. A plain Canvas engine (a function of time that draws a frame) Set the code up once per pack, in one scope: 1. the kit (keep its first line), 2. the element blocks you fetched (keep each first line), 3. references to the cells you use, for example `const morph = CELLS[11];`. If the project is a module, put these in one file and export the cells. Do not copy helpers into each element; they share the kit. **Two packs never share a scope.** Every kit declares the same top-level names (`CW`, `CH`, `CYC`, `C`, `CELLS` and its own helpers), so pasting two kits into one script or module is a syntax error. Give each pack its own module or its own function scope, and export what you need under names that say which pack they come from: ```js // motion-prompt-motion.js (kit "motion" + elements #012 …) export const morph = CELLS[11]; export const MOTION = { w: CW, h: CH, cycle: CYC }; // motion-prompt-camera.js (kit "camera" + elements #045 …) export const wipe = CELLS[20]; export const CAMERA = { w: CW, h: CH, cycle: 9.4 }; // use the Cycle value in the element header; in this kit CYC is half of it ``` Packs can differ in card size and cycle, so always pass each cell the size and cycle of its own pack. **Placing a card in a 1920×1080 frame.** Elements draw in card coordinates (`w` × `h` from the header). Scale the context, not the numbers: ```js function drawElement(ctx, cell, u, x, y, scale, W, H) { // W, H = the card size from the header ctx.save(); ctx.translate(x, y); ctx.scale(scale, scale); ctx.beginPath(); ctx.rect(0, 0, W, H); ctx.clip(); // elements may draw past their card cell(ctx, W, H, u); ctx.restore(); } // full width of a 1920 frame, centered vertically: const s = 1920 / W; drawElement(ctx, typewriter, u, 0, (1080 - H * s) / 2, s, W, H); ``` - Always pass the card's own `w, h`. Passing `1920, 1080` changes the layout, because sizes inside an element are written for the card. - The card's aspect ratio is not 16:9. Either place the card as a band or panel inside your layout, or scale it to cover the frame and accept the crop. Check that the important part stays in view. - Many elements paint their own card background, often through a kit helper called on the element's first line. To place one over footage or another layer, find that call or fill, and remove or replace it. Report that change. - Text sharpness: scaling the context keeps text and shapes as vectors, so no extra step is needed. Draw on a canvas whose pixel size is the final frame size. **Several elements in one frame.** Call them in back-to-front order, each inside its own `save()`/`restore()` as above, each with its own `u` computed from its own start time: `u = sceneClock(t - start)`. Reset `globalAlpha`, `filter` and `globalCompositeOperation` between cells if your engine does not already do so. **Elements that use an offscreen canvas.** Some elements create a canvas with `document.createElement('canvas')` for masks, blur or compositing. - In a browser this works as written. - In Node (node-canvas, skia-canvas, @napi-rs/canvas) there is no `document`. Provide the one call they need before the kit runs, for example `globalThis.document = { createElement: () => createCanvas(1, 1) }`, using your library's `createCanvas`. - An offscreen canvas is sized in card pixels. When the card is scaled up a lot, its content is upscaled and softens. If that shows, render the element at a larger card scale by scaling inside the offscreen canvas as well, and compare a frame against the demo. - `ctx.filter` is not available in every canvas library. If an element uses it, test a frame early. **Fonts.** Kits use system font stacks. A renderer without those fonts falls back silently and the layout shifts. Either register the project's font and change the font constants in the kit, or confirm that the stack resolves on the rendering machine. If a pack declares font files, load them before drawing the first frame. ## 2. Remotion Draw on a `<canvas>` from the current frame. The element stays a pure function, so every frame renders the same way in preview and in export. ```tsx import { useCurrentFrame, useVideoConfig } from 'remotion'; import { useEffect, useRef } from 'react'; import { typewriter, CARD_W, CARD_H, CYCLE } from './motion-prompt-motion'; // one module per pack: kit + its elements, license lines kept export const Typewriter: React.FC<{ hold?: number }> = ({ hold }) => { const frame = useCurrentFrame(); const { fps } = useVideoConfig(); const ref = useRef<HTMLCanvasElement>(null); const t = frame / fps; const u = hold === undefined ? t % CYCLE : Math.min(t, hold); // loop, or play once and stay useEffect(() => { const ctx = ref.current!.getContext('2d')!; ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.clearRect(0, 0, CARD_W, CARD_H); ctx.save(); typewriter(ctx, CARD_W, CARD_H, u); ctx.restore(); }, [u]); return <canvas ref={ref} width={CARD_W} height={CARD_H} style={{ width: '100%' }} />; }; ``` - `useCurrentFrame()` inside a `<Sequence>` starts at 0, so `t` is already the scene's own time. - For a sharp result, give the canvas the pixel size it has on screen: set `width`/`height` to the card size times your scale and call `ctx.scale(scale, scale)` before the cell. - Do not use `requestAnimationFrame`, `Date.now()` or `performance.now()`. Time comes from the frame only. - If the pack loads font files, wait for them with `delayRender()` / `continueRender()`. ## 3. Moving the numbers to CSS, SVG, Lottie or After Effects Here you do not run the code. You rebuild the move with the target's own tools and copy its values. 1. From the code and spec, write a small table per animated property: start time, end time, start value, end value, easing. Take every number from the source. Convert distances with the same factor you use for the card (for example `1920 / W`); angles, scale factors and durations carry over unchanged. 2. Map the easing. Find the easing helper in the kit and translate it: - a cubic-bezier → `cubic-bezier(a, b, c, d)` in CSS, `keySplines` in SVG, the same four numbers as bezier handles in Lottie and After Effects keyframes; - a power or exponential ease → the closest standard bezier; state which one you chose; - a spring or overshoot → keyframes at the peak and the settle points with the element's own values (for example scale `0 → 1.12 → 1.0` at the stated times). A CSS `linear()` easing or sampled keyframes also work. Do not replace it with a plain ease-out. 3. Rebuild the shapes with the target's primitives and the element's proportions. 4. Staggers: keep the per-item delay and the order. Target notes: - **CSS**: one `@keyframes` per property group, `animation-duration` equal to the cycle (or to the entrance when it plays once, with `animation-fill-mode: both`). Percentages are `time / duration`. - **SVG**: stroke drawing maps to `stroke-dasharray`/`stroke-dashoffset`; masks map to `clipPath` or `mask`. - **Lottie**: keyframe times are frames, `time * fps`. Keep the frame rate of the project. - **After Effects**: set keyframes with the values above, or write an expression on the property using `time - inPoint` as `u`. Expressions are JavaScript, so an easing function from the kit can be pasted into the expression and applied to the same values. Include the license line as a comment in a script file; for values typed into keyframes, name the element in the layer or comp comment. Per-pixel effects (blur, glow, grain, compositing with an offscreen canvas) often have no direct equivalent. Use the target's nearest effect, compare against the demo and report the difference. ## 4. Prompts for video-generation models Write sentences, not code. Use the element's English name and spec: - what is on screen and what moves, - the order of the motion and the duration of each part in seconds, - how it eases (starts fast and settles, overshoots slightly and returns, constant speed), - where it comes to rest and how long it holds, - for camera elements: the move, its direction, its speed and the framing at the start and end. Then add the user's subject, visual style, aspect ratio and clip length. Keep one move per shot; these models handle a single clear move better than a list. For text on screen, state the exact words and expect to check them, since generated text is often wrong. Describe the result in the report as "based on #ID", not as a port. ## Colors Elements take colors from the palette object `C` in the kit. Read the kit to see which key plays which role (background, text, accents); the key names differ between packs. To re-theme, change the values in `C` once. Do not edit color literals inside elements unless an element defines its own. Keep the contrast relationships: text that was light on a dark ground stays readable, and each accent keeps its role. If the project has brand colors, map them to the palette roles and list the mapping in the report. ## Content The words, numbers and names inside an element are sample content. Replace them with the user's. Text is measured and laid out for the sample's length, so check long replacements: reduce the font size constant or split lines rather than letting text leave the card. Japanese and Latin text have different widths at the same size; check both if the video is bilingual. ## License line Keep each element's first line, `// Motion Prompt #ID · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#ID`, above the code made from it, and the kit's first line above the kit. When only numbers were carried over (section 3), put the same line as a comment where the target format allows comments. ## Check before reporting - the first frame, a frame in mid-motion and the resting frame of each ported scene, compared with the demo when you can view it - the loop point, if the element loops: the last frame and the first frame match - scene boundaries: nothing pops in or out when a scene starts or ends - replaced text fits, and the fonts are the intended ones on the rendering machine - the output frame size and frame rate are the project's, not the card'sREADME.mdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
Plain-text copy, no login: /skill-bundles/showheyohtaki-motion-prompt-skills-motion-prompt.md

