Motion Scene 标志

Motion Scene

社区
Sagargupta16
motion-scene

为 Web 应用设计并构建 React 和 Motion(motion/react)动画场景,例如项目封面图、服务卡片插画、主视觉,以及能直观展示事物实际用途的架构图或机制示意图。支持三种模式:research(研究主题并整理成分镜简报)、build(使用可直接复制的 TypeScript 工具包实现)和 verify(在浏览器中检查并通过验收)。当用户要求制作“动画插画”“封面场景”“主视觉动画”“React 图表动画”“卡片的 Motion 动画”、带动画的项目或服务卡片、循环播放的机制场景,或运行 /motion-scene [research|build|verify] 时使用。独立的 .svg 文件应交给 animated-svg 处理;现有插画的评审应交给 svg-audit。

Add to TypingMind

概览

发布者Sagargupta16
代码仓库svg-forge
技能名称motion-scene
星标数
3
复刻数
0
附带文件
12
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 12 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 Sagargupta16 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Motion Scene AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/Sagargupta16/svg-forge/tree/main/skills/motion-scene
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Sagargupta16/svg-forge.git /tmp/svg-forge
mkdir -p .claude/skills
cp -r /tmp/svg-forge/skills/motion-scene .claude/skills/motion-scene
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Motion Scene,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Motion Scene。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Motion Scene 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

motion-scene

A scene is a looping, decorative React component that shows a mechanism (input -> processing -> output) inside a fixed slot of a web app: the media area of a project card, the art column of a service card, a hero panel, a diagram in a docs page. The bar is accuracy. Someone who knows the subject should recognise its mechanism in one glance at card size. A generic "dashboard with bars" is a failure even when it looks good.

Delivery target is scene (a React + Motion component). Timing presets use the shared names micro, short, medium (default), long and ambient.

Which skill

NeedSkill
Animated component rendered inside a React app (card art, hero, diagram, illustration)motion-scene
One self-contained .svg for a README, docs site or <img> (no script, SMIL and CSS only)animated-svg
Review or fix an existing SVG file or scene componentsvg-audit

If the app is not React, or the art must also work as a plain image, use animated-svg. If the user only wants a quick hover or press effect on existing UI, that is a micro interaction, not a scene; apply the spring rules in references/motion.md directly.

Settle these first

Infer from the codebase; ask only what cannot be inferred.

  • Slot: where it renders, its ratio, its smallest and largest rendered width (phone and desktop), and any overlay the host draws on it (bottom fade, badge, title).
  • Tint: the one accent the host passes in (category color, brand accent). Everything else is neutral.
  • Scheme: dark or light canvas.
  • Count: how many instances can be on screen (a grid of 40 cards changes the budget and needs near-viewport mounting).
  • Motion setting: does the app have its own motion control (an in-app Full/Reduced toggle, a settings flag)? Scenes follow it. Never add a reduced-motion gate to an app that has its own motion control. If the app has none, keep motion on and ask before adding one.

Modes

research writes a brief, build implements a brief, verify proves it in the browser. A bare invocation infers the mode from the ask. Always research before building; never build from a README blurb alone.

research

Read, in order: the README, the package manifest (package.json, pyproject.toml, *.tf, *.csproj ...), the entry point, the UI components or CLI command definitions, any screenshots or asset folder. Prefer code over README claims. For a service card with no repo, the truth is what is actually delivered under that heading; depict the deliverable, not the buzzword. For an architecture diagram, read the infrastructure source (IaC, compose files, service definitions), not a slide. For a deployed app, open the live UI (or a screenshot of it) and echo its layout: the scene replaces the screenshot, so a visitor who knows the app should recognise the panel and the one control that matters.

Write the brief before touching code:

markdown
## Brief: <subject>
- What it does: one or two sentences, from the code.
- Mechanism: <input> -> <processing> -> <output>, in the subject's own nouns.
- Vocabulary: 6 to 10 terms that appear verbatim in the source (commands,
  files, tables, models, UI labels). Labels come only from this list.
- Visual identity: what the real UI, CLI or pipeline looks like.
- Current art: none | accurate | generic-but-fitting | partly-wrong | misleading,
  with what it gets right and wrong.
- Strategy: keep | retune-labels | new-variant | new-scene
  (new-scene only when the current art misrepresents the subject).
- Slot: ratio, smallest and largest width, overlays, tint, scheme, count,
  motion setting.
- Preset: medium (3 to 6 s loop) unless the story needs long (8 to 20 s).
- Storyboard, 3 to 6 beats on one clock, as cycle fractions:
  1. 0.04 to 0.22  <what moves, from where to where, which pip or label>
  2. ...
- Budget: <n> animated nodes, <m> labels (see composition budgets).
- Evidence: file and line for every claim above.

Each beat must be buildable with absolutely positioned SVG and HTML at the smallest slot width. If a beat only reads at hero size, cut it or move it to a long storyboard.

build

  1. Copy the kit into the app (for example src/scenes/kit/): tokens.ts, timing.ts, routes.ts, primitives.tsx, useNearViewport.ts, useFreezeAnimations.ts. It needs React 19 and motion. If the slot is not 16:10, change STAGE_W and STAGE_H in tokens.ts together. Read references/primitives.md for what each part does.
  2. Start from the storyboard, not from another scene's shapes. Place parts in stage units (320 x 200 for 16:10). SVG geometry uses the stage viewBox; HTML packets, pips and labels sit at stage percentages with fixed px sizes. See references/composition.md.
  3. One clock. const beat = clock(PRESET.medium) and every loop goes through beat(...). Times are cycle fractions. Derive event times (passAt) instead of hand-tuning them. Choose the loop shape: build up to one END/GONE exit, or open on the finished state and clear in the first 4 to 8 percent. Write the beat table as a comment at the top of the file. See references/motion.md.
  4. Compose from the primitives: Shell (root, palette, texture, tint wash, stage), Panel and Wire in the SVG layer, Trace for animated strokes, Packet with ride and comet for data in flight, Pip for status, Label for the 3 or 4 words, FadeLayer to fade a group as one node. Custom motion elements inside a Shell take useLoop(loop) so they freeze with the rest.
  5. Variants, not forks. Subjects that share a mechanism get one scene family with a variant prop, dispatched through a Record with a real fallback. A variant must change a moving element, not only label text.
  6. Mount through a host slot: a fixed-ratio box, the scene lazy-loaded, mounted only near the viewport (useNearViewport), a placeholder painted with palette.base otherwise, frozen wired to the app's motion setting, useFreezeAnimations as the backstop, and the scene keyed on the setting. SceneSlot in ExampleScene.tsx is the pattern.
  7. Keep it lint-clean by construction (readonly props, no nested ternaries, no nested template literals, hoisted repeated literals, small sub-components). One default export per scene file; split past about 450 lines. See references/gotchas.md.
  8. Run the app's own gates (lint, type-check, format, tests, build), then verify.

ExampleScene.tsx is a complete 6 s read-through cache loop built only from the kit: 8 animated nodes, 3 labels, two packets on one route, derived miss, fill and hit beats.

Scene contract:

  • Props Readonly<{ tint: string; frozen?: boolean }>, plus variant?: string only in a family that reads it.
  • Root is Shell: absolute, inset 0, clipped, aria-hidden="true". The host card's title and text carry the meaning.
  • Default export, lazy-loaded by the host so scenes stay out of the entry chunk.

verify

Run the app, open the page in a focused tab after a hard reload, and work through references/verify.md. The short version:

  • Screenshot at the smallest and largest real slot widths; the mechanism reads at both.
  • Animated node count within budget; running animations in view under about 70.
  • Easing scan returns 0; every loop shares one duration.
  • Two full cycles watched: no seam jump. Transforms sampled twice 700 ms apart differ.
  • No horizontal overflow at 375 px; paint flashing shows the card body is not repainting.
  • Root is aria-hidden; no decoration sits over text or controls.
  • With the app's reduced setting on, an 800 ms computed-style diff shows 0 changes and the artwork is still visible.
  • The app's gates pass. One scene family per commit.

Report each check with its measured value, not "looks fine".

Hard rules

  1. Mechanism, not category. Input -> processing -> output in the subject's own nouns. Changing label text does not make a scene accurate. composition
  2. Labels: at most 4 (2 on icon-size cards), uppercase mono, 7 to 9 px, 12 characters or fewer, no dashes, real vocabulary only, rendered as HTML so they keep their px size. No prose and no numbers that read as claims. composition
  3. Palette is the tint plus neutrals. Alpha ladders of one tint and one neutral; ok green only for live or success, warn amber only for warnings. No new hue, gradient text, glow halo or blur filter. composition
  4. One stage at the slot ratio: uniform viewBox, HTML at stage percentages with fixed px sizes, letterboxed by a container-query stage. Never stretch with preserveAspectRatio="none" unless the viewBox matches the slot exactly. composition
  5. Budgets: 12 or fewer animated nodes per cover, 8 or fewer per icon-size card, 3 to 6 beats, under about 70 running animations in view; mount loops only near the viewport. composition
  6. Transform and opacity only (plus SVG pathLength and pathOffset for stroke draws). Never animate width, height, top, left, filter or box-shadow. motion
  7. One clock per scene. One duration for every loop, events as cycle fractions; ambient backdrops may run slower on their own speed. motion
  8. Per-segment easing whenever times is set: ease: perSegment(times). A single ease string drifts WAAPI tracks off the storyboard. motion
  9. Seamless loops: last keyframe equals the first, or the reset happens while the element is invisible; one END/GONE exit per scene, or open on the finished state with a clear window. motion
  10. Never put pathLength or pathOffset on a path with vector-effect="non-scaling-stroke". Static hairlines (Wire) and animated draws (Trace) are separate elements. gotchas
  11. Decoration only: root aria-hidden, nothing focusable inside, never over text or controls. verify
  12. Follow the app's motion setting. Freeze through Shell frozen and useFreezeAnimations; never add an OS-level gate to an app that has its own control. Motion stays visible by default. gotchas
  13. Never start from scale(0); start at 0.9 to 0.97 (0.25 for icons). Exits run faster than entrances. motion

Kit files

FileWhat it holds
tokens.tsStage size, pctX/pctY, createPalette (tint, alpha ladders, base, solid), textures, dotAt
timing.tsPRESET, clock, perSegment, loopProps, shown, windowTimes/windowKeys, ambient
routes.tsroute, sCurve, line, ride, comet, lit, passAt
primitives.tsxShell, Stage, Panel, Wire, Trace, Packet, Pip, Label, FadeLayer, useLoop, useScene
useNearViewport.tsMount a scene only within 300 px of the viewport
useFreezeAnimations.tsPause every WAAPI animation in a subtree at time 0
ExampleScene.tsxComplete 6 s mechanism loop plus the SceneSlot host pattern

The kit type-checks under strict, noUncheckedIndexedAccess and exactOptionalPropertyTypes with React 19 and Motion 14.

References

  • references/composition.md: mechanism over category, labels, palette, depth layers, stage units and responsive layout, budgets, variants.
  • references/motion.md: presets mapped to scene use, one clock, cycle fractions, per-segment easing and the WAAPI drift, seamless loops, stagger, springs vs tweens, enter and exit.
  • references/gotchas.md: every known failure as symptom, cause, fix.
  • references/primitives.md: each kit part, when to use it, short snippets.
  • references/verify.md: screenshot sizes, budgets, scan snippets, seam check, paint flashing, accessibility, reduced mode, gates.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Motion Scene AI 技能有什么作用?

为 Web 应用设计并构建 React 和 Motion(motion/react)动画场景,例如项目封面图、服务卡片插画、主视觉,以及能直观展示事物实际用途的架构图或机制示意图。支持三种模式:research(研究主题并整理成分镜简报)、build(使用可直接复制的 TypeScript 工具包实现)和 verify(在浏览器中检查并通过验收)。当用户要求制作“动画插画”“封面场景”“主视觉动画”“React 图表动画”“卡片的 Motion 动画”、带动画的项目或服务卡片、循环播放的机制场景,或运行 /motion-scene [research|build|verify] 时使用。独立的 .svg 文件应交给 animated-svg 处理;现有插画的评审应交给 svg-audit。

为什么在 TypingMind 中使用 Motion Scene?

因为您只需安装一次,就能搭配任何模型使用。Motion Scene 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Motion Scene?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/Sagargupta16/svg-forge/tree/main/skills/motion-scene。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Motion Scene?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Motion Scene 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Motion Scene 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Motion Scene AI 技能免费吗?

是的。Sagargupta16 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇