fixing-motion-performance

ibelick/ui-skills · Agent Skill

進行動畫效能的審核和修正,包括佈局抖動、合成器屬性、滾動相關動作和模糊效果,當動畫卡頓、過渡效果抖動或檢查CSS/JS動畫效能時使用。

前往安裝 ↓

總覽

發布者ibelick社群
儲存庫ibelick/ui-skills ↗
技能資料夾fixing-motion-performance
星10,213
分支478
附帶檔案1
授權MIT
最近更新2026年10月25日
連結技能原始碼 ↗ · 儲存庫 ↗

Mozgi 檢查

我們在技能檔案中發現的內容。詳細資訊需訂閱。

安全性
低風險 · 未發現明顯風險 — 完整報告會顯示細節
相容性
僅含說明 — 適用於多數代理
相似技能
找到 58 個相似技能
訂閱另含

安裝

技能就是一個含 SKILL.md 的資料夾。選擇你的代理,在專案根目錄的終端機(macOS、Linux 或 Windows 的 Git Bash)執行指令。

把提示貼到 Claude、Codex 或其他助理:它會自行檢查並安裝技能。

Install the “fixing-motion-performance” skill from mozgi.io (https://mozgi.io/skills/ibelick-fixing-motion-performance/) for me.

1. Download the archive: https://mozgi.io/skills/ibelick-fixing-motion-performance/download
   If it fails, take the skill folder from the source: https://github.com/ibelick/ui-skills/tree/main/skills/fixing-motion-performance
2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me.
3. Put the “fixing-motion-performance” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.).
4. Make sure <skills folder>/fixing-motion-performance/SKILL.md exists.
5. Briefly tell me what this skill does and offer to try it on my task.

If you cannot do a step yourself, tell me what to click or type.

技能檔案

1 個檔案 下載 ZIP

安裝前請先檢視 SKILL.md 與相關檔案。點擊檔案即可預覽。

SKILL.md 內容

作者原文 · 唯讀

fixing-motion-performance

Fix animation performance issues.

how to use

  • /fixing-motion-performance

Apply these constraints to any UI animation work in this conversation.

  • /fixing-motion-performance <file>

Review the file against all rules below and report:

  • violations (quote the exact line or snippet)
  • why it matters (one short sentence)
  • a concrete fix (code-level suggestion)

Do not migrate animation libraries unless explicitly requested. Apply rules within the existing stack.

when to apply

Reference these guidelines when:

  • adding or changing UI animations (CSS, WAAPI, Motion, rAF, GSAP)
  • refactoring janky interactions or transitions
  • implementing scroll-linked motion or reveal-on-scroll
  • animating layout, filters, masks, gradients, or CSS variables
  • reviewing components that use will-change, transforms, or measurement

rendering steps glossary

  • composite: transform, opacity
  • paint: color, borders, gradients, masks, images, filters
  • layout: size, position, flow, grid, flex

rule categories by priority

| priority | category | impact |

|----------|----------|--------|

| 1 | never patterns | critical |

| 2 | choose the mechanism | critical |

| 3 | measurement | high |

| 4 | scroll | high |

| 5 | paint | medium-high |

| 6 | layers | medium |

| 7 | blur and filters | medium |

| 8 | view transitions | low |

| 9 | tool boundaries | critical |

quick reference

1. never patterns (critical)

  • do not interleave layout reads and writes in the same frame
  • do not animate layout continuously on large or meaningful surfaces
  • do not drive animation from scrollTop, scrollY, or scroll events
  • no requestAnimationFrame loops without a stop condition
  • do not mix multiple animation systems that each measure or mutate layout

2. choose the mechanism (critical)

  • default to transform and opacity for motion
  • use JS-driven animation only when interaction requires it
  • paint or layout animation is acceptable only on small, isolated surfaces
  • one-shot effects are acceptable more often than continuous motion
  • prefer downgrading technique over removing motion entirely

3. measurement (high)

  • measure once, then animate via transform or opacity
  • batch all DOM reads before writes
  • do not read layout repeatedly during an animation
  • prefer FLIP-style transitions for layout-like effects
  • prefer approaches that batch measurement and writes

4. scroll (high)

  • prefer Scroll or View Timelines for scroll-linked motion when available
  • use IntersectionObserver for visibility and pausing
  • do not poll scroll position for animation
  • pause or stop animations when off-screen
  • scroll-linked motion must not trigger continuous layout or paint on large surfaces

5. paint (medium-high)

  • paint-triggering animation is allowed only on small, isolated elements
  • do not animate paint-heavy properties on large containers
  • do not animate CSS variables for transform, opacity, or position
  • do not animate inherited CSS variables
  • scope animated CSS variables locally and avoid inheritance

6. layers (medium)

  • compositor motion requires layer promotion, never assume it
  • use will-change temporarily and surgically
  • avoid many or large promoted layers
  • validate layer behavior with tooling when performance matters

7. blur and filters (medium)

  • keep blur animation small (<=8px)
  • use blur only for short, one-time effects
  • never animate blur continuously
  • never animate blur on large surfaces
  • prefer opacity and translate before blur

8. view transitions (low)

  • use view transitions only for navigation-level changes
  • avoid view transitions for interaction-heavy UI
  • avoid view transitions when interruption or cancellation is required
  • treat size changes as potentially layout-triggering

9. tool boundaries (critical)

  • do not migrate or rewrite animation libraries unless explicitly requested
  • apply these rules within the existing animation system
  • never partially migrate APIs or mix styles within the same component

common fixes

/* layout thrashing: animate transform instead of width */
/* before */ .panel { transition: width 0.3s; }
/* after */  .panel { transition: transform 0.3s; }

/* scroll-linked: use scroll-timeline instead of JS */
/* before */ window.addEventListener('scroll', () => el.style.opacity = scrollY / 500)
/* after */  .reveal { animation: fade-in linear; animation-timeline: view(); }
// measurement: batch reads before writes (FLIP)
// before — layout thrash
el.style.left = el.getBoundingClientRect().left + 10 + 'px';
// after — measure once, animate via transform
const first = el.getBoundingClientRect();
el.classList.add('moved');
const last = el.getBoundingClientRect();
el.style.transform = `translateX(${first.left - last.left}px)`;
requestAnimationFrame(() => { el.style.transition = 'transform 0.3s'; el.style.transform = ''; });

review guidance

  • enforce critical rules first (never patterns, tool boundaries)
  • choose the least expensive rendering work that matches the intent
  • for any non-default choice, state the constraint that justifies it (surface size, duration, or interaction requirement)
  • when reviewing, prefer actionable notes and concrete alternatives over theory

常見問題

fixing-motion-performance 技能有什麼用途?

進行動畫效能的審核和修正,包括佈局抖動、合成器屬性、滾動相關動作和模糊效果,當動畫卡頓、過渡效果抖動或檢查CSS/JS動畫效能時使用。

如何安裝 fixing-motion-performance?

打開本頁的「安裝」區塊並選擇你的代理 — Claude Code、Codex、Cursor 或 Gemini CLI:那裡有把技能資料夾複製到正確位置的現成指令。也可以複製「透過助理」分頁中的提示,讓助理自行檢查並安裝技能。

fixing-motion-performance 適用哪些 AI 模型?

技能是純 Markdown 指示(Agent Skills 格式),因此 fixing-motion-performance 適用任何讀取 SKILL.md 的代理:Claude Code、Codex、Cursor、Gemini CLI、GitHub Copilot、OpenCode 等。只有在任務符合技能描述時,模型才會載入指示。

fixing-motion-performance 是免費的嗎?

此技能由 ibelick 公開發布,採用 MIT 授權。技能本身免費 — 你只需向 AI 供應商支付實際使用的 token 費用。

安裝技能安全嗎?

技能是代理會遵循的指示,安裝前請閱讀 SKILL.md 及相關檔案。技能資料夾中的腳本只有在代理執行時才會運行 — 留意它的動作,不要授予多餘權限。

技能和 MCP 伺服器或外掛有何不同?

MCP 伺服器或外掛為模型提供新工具 — 會執行並回傳結果的程式碼。技能提供的是知識與流程:如何處理任務、要遵循哪些步驟、好的成果長什麼樣子。它不需要伺服器或 API 金鑰。

相關技能

所有技能 →
review-animations 檢查動畫的品質、時間和運動的連貫性,從批判性的生產角度來看。 emilkowalski49.9k improve-animations 作為高階動作顧問,審查動畫程式碼庫和動作程式碼,然後建立優先順序的審計和自成體系的實施計劃。僅供閱讀原始程式碼 - 它計劃改進,但不會實施它們。使用時,當使用者請求改進動畫,進行動作審計,讓應用程式更好或想要動畫修復的路線圖,而不是審查單個差異。 emilkowalski49.9k find-animation-opportunities 尋找令人信服的動態介面機會,同時拒絕增加雜亂或減慢使用者速度的動畫。 emilkowalski49.9k animate 從頭開始建立動畫,按照正確的順序做出決定 — 它是否應該被動畫化,目的是什麼,使用什麼工具,哪些屬性,哪種曲線和持續時間,它如何中斷,它如何退出。 寫下實現。 當被要求動畫化某些東西,新增動作,使元件活起來或構建過渡時使用。 對於現有動作的批評,使用review-animations;對於整個程式碼的審核,使用improve-animations。 emilkowalski49.9k animation-vocabulary 精簡動畫語言,以使選擇動畫看起來故意且一致。 emilkowalski49.9k apple-design Apple 對於介面設計和順暢的物理動畫的方法,為網頁設計師提供了一種新的思路,讓他們在建構或測試手勢介面、彈簧動畫、拖拽、滑動、捲動等互動動作、動量和可中斷的轉場、半透明材質和深度、字型(光學尺寸、追蹤、間距)以及減少動作或基本設計原則(回應、空間順序、剋制)等方面,打造出類似 Apple 風格的介面。 emilkowalski49.9k