Communitygithub.com

Devin-AXIS/iPolloWork

為 `use_figma` MCP 工具提供動畫/動態上下文 — 透過手動關鍵影格、動畫樣式、緩動函數和時間軸時長來為 Figma 節點添加動畫。當任務涉及在節點上新增、編輯或檢查動畫時,請與 figma-use 一起載入。

iPolloWork 是什麼?

此技能為 `use_figma` MCP 工具提供 Motion(動態)上下文。它擴展了基礎的 [figma-use](../figma-use/SKILL.md) 技能,專門處理 Figma 節點動畫的時間維度,包括添加、編輯或移除手動關鍵影格軌道、使用動畫樣式、調整時間軸時長以及設定動畫緩動效果。靜態設計工作不需要此技能。 Motion API 透過 `metronome` 使用者功能旗標進行門控。如果使用者沒有此旗標,所有動作屬性都會拋出錯誤,此時應立即停止並告知使用者。動畫可透過 `export_video` 進行驗證,該方法會回傳一個 `jobId` 進行輪詢,然後使用 `ffmpeg` 提取影格。由於渲染成本很高(與像素 × 影格成正比),建議事先規劃,先選定關鍵時間點、縮小尺寸、使用較低的 fps(影格率),並在每次渲染前進行批次修正。 此技能支援多個平台,並提供詳細的預飛檢查清單,以確保使用正確的公開 API 名稱(例如 `EASE_OUT`、`EASE_IN_AND_OUT`、`TRANSLATION_X`),避免使用內部場景圖名稱(例如 `OUT_CUBIC`、`EASE_IN_OUT`、`MOTION_*`),並確保動畫節點不是頂層影格。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Devin-AXIS/iPolloWork/tree/HEAD/examples/plugin-packages/figma/skills/figma-use-motion

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

use_figma — 用於 Motion 的 Figma Plugin API 技能

為 use_figma MCP 工具提供的 Motion(動態)上下文。figma-use 涵蓋了基礎的 Plugin API 規則 — 請將兩者一起載入。

當為動態工作呼叫 use_figma 時,始終傳遞 skillNames: "figma-use-motion"(與 figma-use 一起以逗號分隔)。 僅記錄。

執行時期門控

Motion API 受到 metronome 使用者功能旗標的門控。當呼叫的使用者沒有此旗標時,此技能中引用的每個 motion 屬性和輔助方法都會拋出 "<name>" is not a supported API 錯誤。

遇到該錯誤時請快速中止。 不要重試;告知使用者 motion 未為其啟用並停止。否則會浪費呼叫次數,並因重複的相同失敗而讓使用者感到困惑。

何時使用此技能

每當 use_figma 任務涉及以下內容時,請載入此技能:

  • 在節點上新增、編輯或移除關鍵影格(manualKeyframeTracks、applyManualKeyframeTrack、removeManualKeyframeTrack)。
  • 隨著時間動畫化填色或筆畫顏色。
  • 應用、編輯或移除動畫樣式(applyAnimationStyle、removeAnimationStyle、animationStyles)。
  • 透過 node.timelines / node.setTimelineDuration(id, seconds) 讀取或寫入時間軸時長。
  • 為上述任何操作選擇緩動效果。

靜態設計工作(建立形狀、元件、變數、佈局)只需透過 figma-use 進行 — 此技能僅用於時間維度。

開放的 Motion API 介面

  • node.manualKeyframeTracks — 讀取/寫入手動關鍵影格(包括填色、筆畫和效果軌道)。
  • node.applyManualKeyframeTrack(field, track) / node.removeManualKeyframeTrack(field) — 新增、取代或移除一個手動關鍵影格軌道,無需重寫整個物件。
  • node.animationStyles — 讀取/寫入應用於節點的動畫樣式中繼資料。
  • node.applyAnimationStyle(styleId, presetData?) / node.removeAnimationStyle(id) — 應用一個發現的樣式,並透過其回傳/回讀的 id 移除一個已應用的樣式實例。
  • node.timelines — 包含頂層影格的唯讀時間軸列表,時長以秒為單位。
  • node.setTimelineDuration(id, durationSeconds) — 寫入包含頂層影格的時間軸時長。
  • node.animations — 唯讀的已解析關鍵影格資料(目前僅限手動軌道 — 請參閱 motion-patterns.md)。
  • figma.motion.figmaAnimationStyles() — Figma 第一方動畫樣式的唯讀列表。

編寫自訂的 "figma:motion" 預設模組原始碼超出範圍。如果使用者想要一個全新的動畫樣式,請如此告知並停止;不要憑空捏造一個。

參考文件

根據任務需求載入以下文件:

文件何時載入涵蓋內容
motion-patterns.md新增/編輯動畫手動關鍵影格、動畫化填色/筆畫、應用動畫樣式、時間軸時長
motion-easing.md設定動畫緩動關鍵影格緩動物件、自訂 cubic/spring、HOLD、在動畫樣式內應用緩動

驗證動畫

get_screenshot 僅顯示時間軸的靜止狀態,絕不顯示動態。要檢查動態,請使用 export_video 並取樣影格 — 但它會在伺服器端渲染且速度慢且昂貴(約 10 秒到數分鐘),因此請確保每次渲染都有用。

在渲染前做好規劃 — 成本與像素 × 影格成正比,因此兩者都不要超過所需範圍:

  1. 先選定時刻。 每個階段(例如每個錯開步驟,或開始/中間/穩定階段)只需要一個影格,而不是流暢的播放 — 通常 4–6 個。此數量會設定您的 fps。
  2. 大小以能看清楚為準。 從較小的設定開始 — constraint: { type: 'WIDTH', value: 320 }、quality: "low" — 但文字和小元素在此設定下會模糊,因此在需要判斷精細細節時提高 WIDTH(768+)。省略 constraint = 全尺寸(1x;伺服器會限制為 10x / 4096px)。
  3. 將 fps 設定得剛好足以捕捉這些影格: fps: 5 可涵蓋少量影格;10 是上限。更高只會使渲染變得更龐大。

機制: export_video 僅適用於其子節點包含動畫的頂層影格(請傳遞該影格,而非您設定關鍵影格的子節點)。它會回傳一個帶有 status: "processing" 的 jobId — 使用 { fileKey, jobId } 重新呼叫以進行輪詢。然後使用 ffmpeg -ss <t> -i anim.mp4 -frames:v 1 frame_<t>.png 在本機提取影格 — 提取是免費的,因此一旦您為渲染付費,就請充分挖掘每個能提供資訊的影格,而不是重新導出。如果沒有像 ffmpeg 這樣的影格提取器,請跳過導出並直接推理關鍵影格。

反覆迭代直到正確為止。 導出是一種診斷方法,而非最終確認:如果影格錯誤(順序不對、時機不對、缺少元素、遮罩遮蔽了合成畫面),請修正關鍵影格/樣式並重新導出。讀取所有影格,並將所有修正批次處理到一次傳遞中,然後再重新渲染 — 每次渲染都伴隨著實際開銷,因此請確保每次渲染都有意義,而不是在每次微小變更後都重新導出。

對於微不足道或顯而易見的變更,請完全跳過導出。

預飛檢查清單

除了 figma-use 預飛檢查清單 之外,還請驗證:

  • 緩動使用公開的 { type: 'EASE_OUT', easingFunctionCubicBezier?: …, easingFunctionSpring?: … } 形狀 — 而非像 OUT_CUBIC 這樣的內部場景圖名稱。
  • Ease-in-out 使用精確的公開列舉 EASE_IN_AND_OUT(或 EASE_IN_AND_OUT_BACK);切勿使用無效的別名 EASE_IN_OUT。
  • 正在動畫化的節點不是頂層影格(頁面的直接子節點)。請改為對其子節點進行動畫化。
  • 時間軸值在公開 Plugin API 中以秒為單位。使用 setTimelineDuration 來延長;除非使用者要求,否則切勿縮短。
  • 變換關鍵影格欄位使用公開名稱(TRANSLATION_X、TRANSLATION_Y、ROTATION、SCALE_X、SCALE_Y、SCALE_XY),而非內部 MOTION_* 場景圖名稱。
  • 手動關鍵影格欄位來自 motion-patterns.md 中的公開允許清單;生成的/內部的場景圖欄位故意會拋出錯誤。
  • 被修改的節點 ID 已回傳(根據 figma-use 規則 15)。
  • 當運動正確性並非顯而易見,且影格提取器(ffmpeg)可用時,請透過 export_video + 影格取樣進行驗證 — 以小尺寸、低 fps 渲染,反覆迭代直到正確(請參閱上面的驗證動畫章節)。get_screenshot 僅顯示靜止狀態。

Individual skills in this repo

This repo contains 17 individual skills — each has its own dedicated page.

Devin-AXIS/iPolloWork

Create deterministic animation and transitions for the active iPollo Video project.

Devin-AXIS/iPolloWork

Inspect, validate, preview, and render the active iPollo Video project with its bundled HyperFrames CLI.

Devin-AXIS/iPolloWork

Apply the core composition, timing, media, and determinism contract used by iPollo Video.

Devin-AXIS/iPolloWork

Plan visual direction, typography, pacing, audio, and composition for iPollo Video projects.

Devin-AXIS/iPolloWork

Build seek-safe keyframe animation for the active iPollo Video timeline.

Devin-AXIS/iPolloWork

Reuse approved HyperFrames blocks and components inside the active iPollo Video project.

Devin-AXIS/iPolloWork

Route video creation and editing through the active iPollo Video project and its built-in HyperFrames runtime.

Devin-AXIS/iPolloWork

Create or edit the active iPolloWork video's visual assets, installed recipes, editable composition and seek-safe motion; use for assembly or local picture/text/theme changes.

Devin-AXIS/iPolloWork

Add or revise music, sound effects and their mix in the active iPolloWork video, using authorized sources, real editable tracks and measured event cues.

Devin-AXIS/iPolloWork

Write or revise the active iPolloWork video's native STORYBOARD.md, with source coverage, content-led sequence and provisional timing; use for script-only work.

Devin-AXIS/iPolloWork

Route the active iPolloWork video request to its current storyboard, compose, voiceover or soundtrack work, preserving the client-owned delivery flow.

Devin-AXIS/iPolloWork

Add or revise scene-bound narration or speech-linked captions in the active iPolloWork video using actual voice settings, measured audio and alignment.

Devin-AXIS/iPolloWork

Create product launch and promotional videos through the active iPollo Video workflow.

Devin-AXIS/iPolloWork

Develop or update reusable visual components for iPolloWork Video, including maps, charts, rankings, diagrams, openings and endings. Use for component authoring rules, manifests, editable variables, shared data forms, inherited design themes, AI editing slots and seekable HyperFrames timelines. Not for producing a whole video, authoring a full-project template, or packaging a DeepSeek host plugin.

Devin-AXIS/iPolloWork

Translates Figma motion and animations into production-ready application code. Use when implementing animation/motion from a Figma design — user mentions "implement this motion", "add animation from Figma", "animate this component", provides a Figma URL whose node is animated, or when `get_design_context` returns motion data or instructs you to call `get_motion_context`.

Devin-AXIS/iPolloWork

Plan and create short videos using the installed short-video-studio workspace app. Manage its creative canvas, scripts, storyboards, characters and local assets, generate images or video through connected Work channels, and hand off editable tracks to Work Video Studio.

Devin-AXIS/iPolloWork

Find, generate, process, and reuse media through the active iPollo Video session's media services.

相關技能