remotion-dev/skills

remotion-interactivity

按用户要单独选择的图层组织 JSX,保留可编辑参数

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

remotion-interactivity 是什么?

remotion-interactivity 让 Remotion Studio 能回写图层、时序、文字、样式和关键帧。它要求先划分可独立选择、移动、裁切或设置样式的编辑单元,再使用 Interactive 元素、schema 和内联参数表达,避免画面虽然能播放却无法在 Studio 编辑。

中文说明由本站依据来源整理;英文原文保留在页面下方。

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 remotion-interactivity,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 remotion-interactivity

请在 Codex 的当前工作环境中安装并检查 remotion-interactivity 这个 Skill。

项目身份:remotion-dev/skills / remotion-interactivity
来源:https://github.com/remotion-dev/skills/blob/3e20ac75161bc34468845df714701cc9bf6075f4/skills/remotion-interactivity/SKILL.md
已定位的源文件:skills/remotion-interactivity/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 已有 Remotion 工程与目标 composition;开始前阅读相邻 timeline-structure.md。如果主要是素材剪辑,还要读取 markup 的 video-editing.md。

会得到什么

  • 能够在 Studio 中单独选择与修改的图层、实例参数和关键帧,以及实际编辑验证结果。

实际使用顺序

  1. 先确定哪些内容需要独立编辑;布局容器与装饰内部保持普通 HTML,文字/图形使用带明确 name 的 Interactive 元素。
  2. 固定且只用一次的文字直接写在元素内,样式使用实例内联对象。可编辑动画把 interpolate() 直接写在变化属性上,使用 scale/translate/rotate,避免 transform 字符串和任意外部变量。
  3. 自定义组件的 schema 每个字段设置 default 和 description;按需要加入 text/background/children 等片段。仅定义 prop 而没有 schema 不会自动出现编辑控件。
  4. composition 的 id、静态尺寸、fps、时长和 defaultProps 保持直接 JSX 字面量;动态部分才交给 calculateMetadata。改完同时检查父时间线与独立场景视图。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

教学示例:请用 remotion-interactivity 改造现有片头,让“秋季新品”标题可在 Studio 单独改文字、颜色和入场位置。先读 timeline-structure.md,把标题作为独立编辑单元,保持背景布局普通 HTML;动画与样式按来源内联,最后检查修改能否回写代码。
预期结果

预期标题在 Studio 有可用控件,固定文字与动画可回写;不能只看到画面就称可编辑。本站未执行。

使用前先看这些限制

使用条件与边界

  • 外部数据生成或逐帧计算的部分可以保留程序化,但要说明它们不可直接编辑;作者写的固定文字不属于外部数据。
  • schema 的 string、number、asset 等类型具有不同关键帧能力;不要假定数组或媒体源都能像数值一样插值。
  • 嵌套 markup 和计算 children 在这个版本仍只读。
针对这个 Skill 的疑问

常见问题

为什么提取成常量后 Studio 不能改了?

源文件要求可编辑值留在实例 JSX 内。普通外部常量、对象展开和任意数学表达式可能超出 Studio 的源码解析范围,应按内联样式与动画规则组织。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/remotion-interactivity/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Structures Remotion markup so layers, timing and styles are editable in Remotion Studio. Use when writing a new composition or restructuring existing markup.

查看源文件章节 / Source sections
  • 原文:Choose schema fields
  • 原文:Make an HTML element interactive using `Interactive`
  • 原文:Prefer inline text
  • 原文:Give interactive elements a descriptive name
  • 原文:Keep all CSS styles inline
  • 原文:Animate using `interpolate()`
  • 原文:Keep SVG paths editable with `Interactive.Path`
  • 原文:Morph paths using inline `interpolatePaths()`
  • 原文:Use `scale`, `translate`, `rotate` CSS properties
  • 原文:Keep composition metadata inline
  • 原文:Effects should be inline too
  • 原文:Making your own component interactive
  • 原文:Video editing
原文:正文开头

Make markup editable in Studio by default. Keep a part programmatic only if it is generated from external data or computed per frame, and tell the user it won't be editable. Text you write yourself is not external data. Studio edits the JSX nodes that create timeline items. Structure the code around what the user should be able to select, move, trim, or style independently. Keep editable values inline on each instance. Before writing a scene or refactoring its layers, read [editable timeline structure](timeline-structure.md). It covers editing units, tracks, shared timing, plain layout containers, and a complete component-to-root example. For a timeline built from footage, also read editable video timelines (`video-editing.md` in the `remotion-markup` skill). Use connected compositions (`connected-compositions.md` in the `remotion-markup` skill) when a scene or reusable group needs its own timeline. Validate both its standalone view and the full parent timeline; a connection alone does not guarantee fewer visible rows.

原文:Choose schema fields

Each key in the schema is a prop that Studio can read and edit at the call site. Props that are not in the schema still work, but are not editable in Studio. Keys may use dot notation, such as `style.color`. | Type | Use for | Keyframable | | ---------------------------------------------------------------------------- | ------------------------------------------------------------ | ------------- | | `string` | Strings, such as a title, prompt, or code snippet | No | | `number` | Numbers, with optional `min`, `max`, `step`, `integer` | Yes | | `boolean` | On/off switches | Yes (hold) | | `color` | CSS color strings | Yes | | `enum` | A choice between `variants`, each with its own nested schema | Opt-in (hold) | | `array` | Lists of numbers, colors, enums and more | No | | `asset` | Media sources, with optional `assetType` | No | | `font-family` | CSS font family | No | | `font-weight` | Font weight | Yes | | `translate`, `scale`, `rotation-css`, `rotation-degrees`, `transform-origin` | Transforms | Yes | | `uv-coordinate`

本段为节选,完整内容见源文件。

原文:Make an HTML element interactive using `Interactive`

Every HTML and SVG element (except `<Img>`, it already is interactive) such as `<div>` can be turned interactive using `Interactive`: ```tsx title="Interactive elements" <Interactive.Div name="Greeting card" style={{fontSize: 80, padding: 24}} > Hello </Interactive.Div> ``` Use this for text or graphics that need independent controls. Keep layout-only containers and decorative internals as plain HTML; an interactive component already provides controls for its root.

原文:Prefer inline text

If text is fixed and only used once, write it directly inside the interactive element instead of extracting it into a constant. ```tsx title="Inline text" // 👍 Fixed copy stays editable <Interactive.Div name="Title"> Remotion Best Practices </Interactive.Div> ``` Use a prop or variable only when the text is dynamic or reused.

原文:Give interactive elements a descriptive name

Add a `name` prop to elements to make them easily identifyable. Avoid computed names, hardcode them. ```tsx title="Interactive names" <> <Interactive.Div name="Hero title" style={{fontSize: 80}}> Launch day </Interactive.Div> <Img name="Avatar" src="https://remotion.media/image.jpeg" /> <Video name="Background" src="https://remotion.media/video.mp4" /> <Interactive.Div name="Title"> Launch day </Interactive.Div> </> ```

原文:Keep all CSS styles inline

The best way is to just pass a plain object to `style` - no referring to constants, no object spreading, no math. ```tsx title="Interactive example" <Interactive.Div style={{ fontSize: 80, color: 'red', }} > Hello World! </Interactive.Div> ``` ```tsx title="❌ Bad for interactivity" const baseStyle = useMemo(() => { return { fontSize: 12 // ❌ Non-inline styles are not supported } }, []); <Interactive.Div style={{ ...baseStyle, // ❌ Spreading is not supported color: RED, // ❌ Referring to constants is not supported scale: frame * 10 // ❌ Math is not supported }} > Hello World! </Interactive.Div> ```

文件 SHA256:83f7ccbdc104fca303f023ba25539dfbd6a92b4fcc781c2a02f11a009082fe06

仓库许可证记录:未提供;not-established,查看来源。

SKILL.md原文description · 2026-11-16T12:36:35.145Z

Structures Remotion markup so layers, timing and styles are editable in Remotion Studio. Use when writing a new composition or restructuring existing markup.

查看历史简介来源

历史收录数据

来源仓库remotion-dev/skills
Skill源路径skills/remotion-interactivity/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源