Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

motion-canvas运动画布

Agent Skill

用于辅助视频生成、动画合成、脚本化剪辑或 Remotion 等视频项目开发。它适合让 Agent 组织镜头、生成素材说明、维护合成代码或排查渲染问题。使用时需要确认分辨率、时长、素材路径和导出格式;涉及外部素材、人物肖像或商业发布时,应先核对版权授权和内容审核要求。

总安装

768

周安装

33

GitHub Stars

44

下载量

269
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:motion-canvas(运动画布)
来源仓库:https://github.com/videozero/skills
仓库路径:skills/motion-canvas
安装命令:
npx skills add https://github.com/videozero/skills --skill motion-canvas
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/videozero/skills --skill motion-canvas

简介

用于运动画布相关的技能支持。motion-canvas 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合在视频项目中快速定位候选结果或素材。
  • 使用时需结合关键词、任务场景或来源线索进行筛选。
  • 安装前建议确认权限范围和维护状态,避免触发不必要的联网或文件读写。
  • 安装方式:通过 GitHub 仓库添加,支持 Codex、Claude 等宿主环境。

SKILL.md

Motion Canvas

Base Scene Template

import {makeScene2D} from '@motion-canvas/2d';

export default makeScene2D(function* (view) {

});

Generator Functions & Animation Flow

  • function* defines a generator function
  • yield pauses until next frame
  • yield* delegates to another generator (composition)
export default makeScene2D(function* (view) {
  const circle = createRef<Circle>();
  view.add(<Circle ref={circle} width={100} height={100} fill={'red'} />);

  yield* circle().position.x(300, 1);
  yield* circle().position.x(-300, 1);
});

Reusable animation pattern:

function* flicker(circle: Circle, duration: number): ThreadGenerator {
  const colors = ['#e13238', '#e6a700', '#99C47A'];
  for (const color of colors) {
    circle.fill(color);
    yield* waitFor(duration);
  }
}
yield* flicker(myCircle(), 0.5);

Signals System

import {createSignal} from '@motion-canvas/core';

const radius = createSignal(3);

radius();            // Get → 3
radius(5);           // Set → 5
yield* radius(4, 2); // Tween to 4 over 2 seconds

Computed signals:

const area = createSignal(() => Math.PI * radius() * radius());

Signals in JSX:

<Circle width={() => radius() * 2} height={() => radius() * 2} />
yield* radius(200, 1); // Circle updates automatically

Vector signals:

const position = Vector2.createSignal(Vector2.up);
yield* position(Vector2.zero, 1);

Reset to default:

import {DEFAULT} from '@motion-canvas/core';
signal(DEFAULT);             // Instant reset
yield* signal(DEFAULT, 2);   // Tween to default

References (Refs)

createRef (single node):

const circle = createRef<Circle>();
<Circle ref={circle} width={100} height={100} fill={'red'} />
yield* circle().scale(2, 0.3);

makeRef (arrays):

const circles: Circle[] = [];
{range(10).map(index => (
  <Circle ref={makeRef(circles, index)} x={index * 50} width={40} height={40} />
))}
yield* all(...circles.map(c => c.scale(1.5, 0.5)));

createRefMap (keyed):

const labels = createRefMap<Txt>();
<Txt ref={labels.a} text="Label A" />
<Txt ref={labels.b} text="Label B" />
yield* labels.a().text('Updated A', 0.3);

Scene Hierarchy

view.add(<Circle />);               // Add to view
container().add(<Circle />);         // Add to node
container().insert(<Circle />, 0);   // Insert at index
circle().remove();                   // Remove
container().removeChildren();        // Remove all children
circle().reparent(newParent());      // Move to new parent

Z-order: moveUp(), moveDown(), moveToTop(), moveToBottom(), moveTo(2)

Querying:

import {is} from '@motion-canvas/2d';
const textNodes = view.findAll(is(Txt));
const firstCircle = view.findFirst(is(Circle));

Save / Restore State

yield* circle().save();
yield* all(circle().position.x(300, 1), circle().scale(2, 1));
yield* circle().restore(1); // Animate back to saved state

Time Events & Waiting

import {waitFor, waitUntil, useDuration} from '@motion-canvas/core';

yield* waitFor(2);                    // Wait 2 seconds
yield* waitUntil('voice-line-2');     // Wait for named event
const dur = useDuration('segment');   // Get event duration

Utilities

Random: useRandom(42).nextInt(10, 100), .nextFloat(0, 1) Logging: useLogger().debug(), .info(), .warn(), .error(); also debug('msg') Hooks: useScene().getSize(); useTime() Range: range(5)[0,1,2,3,4]; range(2,5)[2,3,4] Threads:

// Spawn a background thread (do NOT yield — spawn starts it automatically)
const task = spawn(function* () {
  yield* loop(Infinity, function* () {
    yield* circle().rotation(360, 2);
    circle().rotation(0);
  });
});

// Cancel a running thread
cancel(task);

// Wait for a thread to finish
yield* join(task);

Shape Components

Circle:

<Circle width={200} height={200} fill={'#e13238'} stroke={'#fff'} lineWidth={4}
  startAngle={0} endAngle={270} closed={false} />

Rect:

<Rect width={300} height={200} fill={'#68ABDF'} radius={10} smoothCorners cornerSharpness={0.6} />

Line:

<Line points={[[0,0],[100,100],[200,50]]} stroke={'#fff'} lineWidth={4}
  lineDash={[20,10]} lineCap={'round'} lineJoin={'round'} startArrow endArrow arrowSize={12} />

Polygon:

<Polygon sides={6} size={200} fill={'#99C47A'} />

Grid:

import {Grid} from '@motion-canvas/2d';

<Grid width={'100%'} height={'100%'} stroke={'#333'} lineWidth={1} spacing={80} start={0} end={1} />

Animate with start/end (0-1) for drawing/erasing effects.

Path (SVG path data):

import {Path} from '@motion-canvas/2d';

<Path data={'M 0 -100 L 29 -40 L 95 -31 Z'} stroke={'#e6a700'} lineWidth={3} />

Supports morphing: yield* path().data(newPathData, 1);

Filters

import {blur, brightness, grayscale, sepia, contrast, saturate, hue, invert} from '@motion-canvas/2d';

<Rect filters={[blur(5), brightness(1.5)]} />
yield* rect().filters([blur(0), grayscale(1)], 1); // Animated

See Filters for full details.

Gradients

import {Gradient} from '@motion-canvas/2d';

const grad = new Gradient({
  type: 'linear',
  from: [-100, 0], to: [100, 0],
  stops: [{offset: 0, color: '#e13238'}, {offset: 1, color: '#68ABDF'}],
});
<Rect fill={grad} />

See Gradients for radial and conic types.

Path Components

Ray: <Ray from={[0,0]} to={[300,200]} endArrow /> — animate with start(1,1) / end(0,1) CubicBezier: <CubicBezier p0={..} p1={..} p2={..} p3={..} /> QuadBezier: <QuadBezier p0={..} p1={..} p2={..} /> Spline: <Spline points={[..]} /> — smooth curves Knot: new Knot([x,y], sharpness) — adjust curve sharpness within Spline

Text Rendering

See Txt for full details.

<Txt text={'Hello World'} fontSize={64} fontFamily={'Inter'} fill={'#ffffff'} wrap={true} />

Custom Components

export class Switch extends Node {
  @initial(false) @signal()
  public declare readonly initialState: SimpleSignal<boolean, this>;

  public constructor(props?: SwitchProps) {
    super({...props});
  }

  public *toggle(duration: number) { /* animation logic */ }
}

Decorators (import from @motion-canvas/2d): @signal(), @initial(value), @colorSignal(), @vector2Signal()

import {Node, NodeProps, initial, signal} from '@motion-canvas/2d';

Scene Transitions

import {slideTransition, fadeTransition, Direction} from '@motion-canvas/core';
yield* slideTransition(Direction.Left);

All transitions (from @motion-canvas/core):

  • slideTransition(Direction.Left) — slide in from direction
  • fadeTransition(duration?) — cross-fade
  • zoomInTransition(area, duration?) — zoom into a BBox area
  • zoomOutTransition(area, duration?) — zoom out from a BBox area
  • waitTransition(duration?) — wait without visual transition

Directions: Top, Bottom, Left, Right, TopLeft, TopRight, BottomLeft, BottomRight

Custom:

import {useTransition} from '@motion-canvas/core';
const transition = useTransition(ctx => { /* current */ }, ctx => { /* previous */ });
yield* transition(1);

Advanced Patterns

Conditional: if (cond()) yield* a(); else yield* b(); Reactive: <Circle fill={() => val() > 150? 'red': 'blue'} /> State machines: while/switch pattern with enum states

References

  • Setup — Project creation, installation, troubleshooting
  • Flow Control — all, any, chain, delay, sequence, loop
  • Tweening — Property tweens, easing, interpolation
  • Springs — Physics-based spring animations
  • Transforms — Coordinates, positioning, matrix operations
  • Presentation Mode — Slide-based playback
  • Txt — Text rendering, dynamic text, multi-line
  • Layout — Flexbox, cardinal directions, offset
  • LaTeX — Mathematical equations
  • Media — Images, icons, video
  • SVG — Animatable SVG component
  • Icons — Iconify icon usage and catalog
  • Camera — Pan, zoom, follow
  • Filters — blur, brightness, contrast, grayscale, sepia, hue, saturate, invert
  • Gradients — Linear, radial, conic gradient fills
  • Effects — createEffect, createDeferredEffect
  • Rendering — Rendering settings and output configuration
  • Sounds — Programmable sound playback (@alpha)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.58%
按下载量换算96

Claude

31.5%
按下载量换算85

Cursor

19.5%
按下载量换算52

Gemini CLI

10.23%
按下载量换算28

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/videozero/skills --skill motion-canvas 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills