Логотип Motion2code

Motion2code

Сообщество
lovisdotio
motion2code

Rebuilds an AI-generated (or any) flat motion design video as clean, editable code: inline SVG shapes animated by one GSAP timeline, seekable frame by frame, looping seamlessly, checked side by side against the source; and optionally turns an interface recording into a real interactive website (GSAP ScrollTrigger, real clicks). Ships scripts to study the video (frames, cuts, contact sheet, exact palette), render the code to mp4/GIF through anim.seek, compare it with the source frame by frame and check the loop seam and page contract. Use when the user wants a video, GIF, Lottie-like clip, motion design shot, animated logo, UI screen recording or AI video "recreated in code", "converted to SVG/GSAP", "made into an HTML animation" or "made into a real site". Not for photographic footage, 3D rendering or video editing.

Обзор

Издательlovisdotio
Репозиторийmotion2code
Название навыкаmotion2code
Звёзды
280
Форки
26
Встроенные файлы
17
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Файл SKILL.md, который модель загружает по необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 17

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Опубликовано на GitHub: lovisdotio. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Motion2code в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/lovisdotio/motion2code/tree/main/skills/motion2code
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Новый навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lovisdotio/motion2code.git /tmp/motion2code
mkdir -p .claude/skills
cp -r /tmp/motion2code/skills/motion2code .claude/skills/motion2code
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Motion2code в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Motion2code, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Motion2code не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими API-ключами.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Motion2Code

The video is the spec, and you cannot watch it. Treat the job as reconstruction: turn the clip into images you can look at, write down what happens and when, build the shapes, drive them with one clock, then prove every moment against the source with images side by side. Never animate from a memory of the video.

Workflow

  1. Study the source. python3 scripts/study_video.py source.mp4 -o study/ saves a frame every 0.25 s, the frames around every cut, a contact sheet, the exact flat palette and whether the source already loops. Open the sheet, then the frames. Read the prompt file next to the video if there is one: it holds the exact words.
  2. Write the shot list. One line per beat: time range, what each shape does, how it eases, what it becomes next. Note the stage size (1920x1080 or 1080x1920) and the real duration (ffprobe, e.g. 15.10 s means a 15 s loop). See references/study-the-source.md.
  3. Build the stage from templates/index.html: one inline SVG at the source resolution, every shape drawn around its own origin, flat fills from the sampled palette, the closest Google Font subset to the exact letters.
  4. Animate on one GSAP timeline. Tweens for the shots, plus a pure draw(t) for procedural parts (particles, morphs, physics) called from the same clock. Match the timing of the frames, not your idea of it. See references/animation-architecture.md and references/motion-vocabulary.md.
  5. Close the loop in code. The last moment returns to the exact opening frame, even when the source does not. See references/seamless-loop.md.
  6. Verify, fix, repeat. python3 scripts/frame_diff.py source.mp4 index.html -o diff/ writes source|code pairs and a score per time; open the pairs, fix the worst first, then zoom on transitions with --every 1/24 --start a --end b. python3 scripts/check_anim.py index.html --runtime checks the contract, the loop seam, determinism, console errors and network. Ship only when both are clean. See references/verification.md.
  7. Deliver: index.html, compare.html (from templates/compare.html), and when asked the proof videos: python3 scripts/render_anim.py index.html -o anim.mp4 then python3 scripts/side_by_side.py source.mp4 anim.mp4 -o side_by_side.mp4 --html index.html.
  8. Optional real site. For an interface recording, after the faithful replay, build site.html from templates/site.html: scroll becomes ScrollTrigger, fake clicks become real buttons. See references/interfaces-and-sites.md.

Scripts need Python 3.9+, ffmpeg, and Playwright for anything that opens a browser (uv run --with playwright python scripts/..., or pip install playwright && python -m playwright install chromium). Run them from this skill's directory or with full paths.

The page contract

js
window.anim = { tl, duration, seek(t), play(from), pause() }   // seek(t) is a pure function of t
  • index.html?t=6.5 freezes at 6.5 s; ?external=1 does not autoplay (compare.html and the scripts drive it); with no parameter it plays by itself and loops forever.
  • <html data-ready="1"> once fonts are loaded and frame 0 is drawn. Renderers wait for it.
  • frame(duration) equals frame(0); frame(duration - 1/24) is one step away from it.
  • Self-contained: inline SVG, GSAP 3 from cdnjs, flubber from jsdelivr only when a morph needs it, Google Fonts. Nothing else is loaded.

Hard rules

  • Use only the given source video. Never regenerate it, never fetch "a better version", never trace a frame into the page. No <img>, <video>, SVG <image>, canvas drawImage or raster data URI in the animation.
  • Words exactly as in the source prompt (or the video if there is no prompt), even when the video misspells them. Invented gibberish words in UI recordings become flat bars or are removed.
  • Flat shapes as SVG. Solid fills, the sampled hex colors, no gradients, shadows or filters the source does not have. Strokes with stroke-linecap="round" for sticker outlines.
  • GSAP timeline is the single clock. No requestAnimationFrame loops, setTimeout choreography, CSS animations or Date.now() driving visuals. Randomness is seeded and precomputed.
  • The loop is done in code. If the source does not return to its opening frame, add a short clean transition back to it. The seam is checked numerically.
  • Every moment is checked against the source side by side, at least every 0.5 s and frame by frame around every transition and the loop seam. "Looks right" without a pair image is not a check.
  • Same timing as the source. Measure from the frames; do not compress, pad or reorder beats.

Reference routing

Read only what the task needs:

FileRead when
references/study-the-source.mdstarting: frames, cuts, palette, shot list, words, duration, aspect
references/animation-architecture.mdbuilding: stage, shape origins, timeline vs draw(t), keyframe helper, morphs, fonts, determinism
references/motion-vocabulary.mdmatching the feel: snaps, squash and stretch, smears, elastic settles, iris wipes, morph chains
references/seamless-loop.mdthe source does not loop, or the seam jumps
references/verification.mdchecking and proof videos: frame_diff, compare.html, check_anim, render, side by side
references/interfaces-and-sites.mdthe source is a website/app recording, or a real site.html is wanted

Templates: templates/index.html (the contract, a tiny looping example), templates/compare.html (video and code side by side, synced to the video clock, frame stepping, onion skin), templates/site.html (ScrollTrigger pin and scrub, menu, tabs, flip card, draggable slider, cart counter, keyboard, reduced motion).

Output expectations

  • Deliver index.html (+ compare.html, + site.html for interfaces) and say what was checked and how: frame_diff times, worst scores and what they were, check_anim.py --runtime result, page size.
  • List honestly what differs from the source (a simplified texture, a merged beat), never "pixel perfect".
  • Keep names readable: one group per character or object, ids that say what they are, the palette as constants, shots commented with their time range, so a designer can retime or recolor without reading everything.

Встроенные файлы

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Motion2code?

Rebuilds an AI-generated (or any) flat motion design video as clean, editable code: inline SVG shapes animated by one GSAP timeline, seekable frame by frame, looping seamlessly, checked side by side against the source; and optionally turns an interface recording into a real interactive website (GSAP ScrollTrigger, real clicks). Ships scripts to study the video (frames, cuts, contact sheet, exact palette), render the code to mp4/GIF through anim.seek, compare it with the source frame by frame and check the loop seam and page contract. Use when the user wants a video, GIF, Lottie-like clip, m...

Зачем использовать Motion2code в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Motion2code — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Motion2code в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/lovisdotio/motion2code/tree/main/skills/motion2code. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Motion2code?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Motion2code?

С любым количеством. Если модель поддерживает навыки, вы можете использовать с ней Motion2code: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama и другие — всё в TypingMind с вашими собственными ключами API.

Бесплатен ли навык ИИ Motion2code?

Да. Навык опубликован на GitHub автором lovisdotio по лицензии MIT. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это многоразовый набор инструкций, который объясняет модели ИИ, как выполнять конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты для вызова — код, который где-то выполняется и возвращает результат. Навык ИИ вместо этого даёт модели знания и порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇