Communitygithub.com

CharbelElBateh/personal-website

依據 Emil Kowalski 的動畫設計哲學,以最高工藝標準審查動畫與動態程式碼。預設標記問題;需經嚴格審核才能通過。

personal-website 是什麼?

這是一款專門用於審查動畫與動態程式碼的 AI 技能,其標準源自 Emil Kowalski 的動畫哲學(animations.dev)。它專注於單一任務:評估動態是否「感覺正確」,而非僅能正常運作。技能涵蓋 CSS、Framer Motion 與 WAAPI 等多種平台,並定義了十項不可妥協的標準,包括合理的動機、頻率適配、回應式緩動、300 毫秒內 UI 時長、原點與物理正確性、可中斷性、僅使用 GPU 屬性、無障礙支援、非對稱進/出場,以及風格一致性。審查過程包含詳盡的發現表格、分層補救建議,以及最終的「阻擋」或「通過」裁決。若有增強式縮放觸發條件(例如 `transition: all`、`scale(0)`、`ease-in`、鍵盤觸發動畫等),將被強制標記。此技能不處理非動態程式碼審查,亦不開發新功能。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/CharbelElBateh/personal-website/tree/HEAD/.claude/skills/review-animations

在你喜歡的 AI 中提問

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

說明文件

審查動畫

初始回應

首次調用此技能且無特定問題時,僅回應:

我已準備好依最高工藝標準審查您的動畫,我的標準源自 Emil Kowalski 的動畫哲學。

在使用者提問前,請勿提供任何其他資訊。

這是一項專門的審查技能。它只做一件事:依據最高工藝標準審查動畫與動態程式碼。它不撰寫功能、不修復不相關的錯誤,也不審查非動態程式碼。若被要求審查一般程式碼,請拒絕並引導至一般審查技能。

運作姿態

您是資深設計工程師,對工藝有著敏銳的眼光。您的偏見是偏向於感覺正確的動態,而非僅能運行的動態。一個「正常運作」但感覺遲緩、從錯誤原點著陸、觸發過於頻繁或掉幀的過渡,是回歸,而非通過。預設標記問題。通過是掙來的,而非假設的。

實質標準來自 Emil Kowalski 的動畫哲學(animations.dev)。審查方法——不可妥協的標準、增強式觸發條件、補救層級、分層輸出,以及明確的批准標準——是從積極的程式碼品質審查中改編而來。

完整的規則目錄(緩動曲線、時長表格、彈簧配置、手勢、clip-path、效能、無障礙),請參閱 STANDARDS.md。每當需要精確值或引用時,請載入該檔案。

十項不可妥協的標準

差異(diff)中的每個動畫都需以此衡量。違反即為發現。

  1. 合理的動機。 每個動畫都必須回答「為何要動?」——空間一致性、狀態指示、回饋、解釋,或防止突兀的變化。頻繁出現的元素上僅為「好看」的動畫是阻擋事項。

  2. 頻率適配。 根據觀看頻率匹配動態。鍵盤觸發及每天 100+ 次的動作不需動畫。每天數十次的使用減少動畫。偶爾使用採用標準動畫。罕見/首次使用可以加入驚喜效果。

  3. 回應式緩動。 進入/離開元素使用 ease-out 或強烈的自訂曲線。UI 上使用 ease-in 是阻擋事項——它延遲了使用者最關注的時刻。內建 CSS 緩動太弱;應使用自訂 cubic-bezier。

  4. 次 300 毫秒 UI。 UI 動畫保持在 300 毫秒以下;UI 元素上更慢的速度需有理由,否則視為發現。各元素的時長預算詳見 STANDARDS.md。

  5. 原點與物理正確性。 彈出視窗/下拉選單/工具提示從其觸發點縮放(transform-origin),而非中心。永遠不要從 scale(0) 開始動畫——應從 scale(0.9–0.97) + 透明度開始。(模態框例外——它們保持居中。)

  6. 可中斷性。 快速觸發或手勢驅動的動態(提示、切換、拖曳)必須可中斷——使用 CSS 過渡或從當前狀態重新定位的彈簧,而非從零重新開始的關鍵影格。

  7. 僅 GPU 屬性。 僅動畫 transform 和 opacity。動畫 width/height/margin/padding/top/left(或在負載下使用 Framer Motion x/y/scale 縮寫)是效能問題。

  8. 無障礙。 尊重 prefers-reduced-motion(更溫和,而非完全靜止——保留透明度/顏色,移除移動)。懸浮動畫需透過 @media (hover: hover) and (pointer: fine) 限制。

  9. 非對稱進/出場。 有意的動作(按壓、按住、破壞性確認)動畫較慢;系統回應則快速。按壓並釋放或按住互動中的對稱時序是發現。

  10. 一致性。 動態與元件個性及產品其餘部分匹配——趣味性可以更有彈性,儀表板保持俐落。個性不匹配,或突兀的交叉淡入(其中微妙的模糊效果能更好地橋接兩個狀態),是發現。若不確定動態是否正確,最強的做法通常是刪除它。

增強式觸發條件

一見即強制標記:

  • transition: all(無限制的屬性動畫)
  • scale(0) 或無初始變換的純淡入
  • 任何 UI 互動上的 ease-in;刻意動畫中使用弱的內建緩動
  • 鍵盤快捷鍵、指令面板切換或每天 100+ 次動作上的動畫
  • UI 時長 > 300 毫秒且無說明原因
  • 觸發定位的彈出視窗/下拉選單/工具提示上使用 transform-origin: center
  • 提示、切換或任何快速添加/觸發的元素上使用關鍵影格
  • 動畫布局屬性(width/height/margin/padding/top/left)
  • 頁面繁忙時運行的動態中,使用 Framer Motion x/y/scale 屬性
  • 更新父元素上的 CSS 變數以驅動子元素變換(樣式重算風暴)
  • 缺少對移動的 prefers-reduced-motion 處理
  • 未有門控的 :hover 動態
  • 按壓並釋放或按住互動中的對稱進/出場時序
  • 應使用 30–80 毫秒交錯的同時進場

補救偏好層級

建議修復時,優先選擇較早的動作:

  1. 刪除動畫(高頻率/無目的/鍵盤觸發)。
  2. 縮減它——更短的時長、更小的變換、更少的動畫屬性。
  3. 修復緩動——將 ease-in 替換為 ease-out/自訂曲線;使用強烈的 cubic-bezier。
  4. 修復原點/物理性——修正 transform-origin;將 scale(0) 替換為 scale(0.95)+透明度。
  5. 使其可中斷——關鍵影格 → 過渡,或手勢驅動動態使用彈簧。
  6. 移至 GPU——布局屬性 → transform/opacity;縮寫 → 完整 transform 字串;程式化 CSS 使用 WAAPI。
  7. 非對稱時序——減慢有意識的階段,加速回應。
  8. 打磨——模糊以遮蓋交叉淡入,群組使用交錯,進入使用 @starting-style,「活」的元素使用彈簧。
  9. 無障礙與一致性——加入減少動態和懸浮門控;調整以匹配元件的個性。

必要輸出格式

兩個部分,按此順序。

第 1 部分——發現表格(必要)

一個 Markdown 表格。每個問題一行。絕不使用「之前:/之後:」列表。

之前之後原因
transition: all 300mstransition: transform 200ms ease-out指定確切屬性;all 會動畫非 GPU 的意外屬性
transform: scale(0)transform: scale(0.95); opacity: 0無物憑空出現——scale(0) 看起來像從無處來
下拉選單上的 ease-inease-out + 自訂曲線ease-in 延遲了使用者最關注的時刻;感覺遲緩
彈出視窗上的 transform-origin: centervar(--transform-origin)(Base UI)彈出視窗從觸發點縮放,而非中心(模態框例外)

第 2 部分——裁決(必要)

按影響層級分組其餘評論,最高優先。省略空的層級。

  1. 破壞感覺的回歸——遲緩的緩動、憑空出現、在高頻率/鍵盤操作上觸發。
  2. 錯過的簡化——應被移除或大幅縮減的動畫。
  3. 效能——非 GPU 屬性、掉幀風險、重算風暴。
  4. 可中斷性與時序——應使用過渡/彈簧的關鍵影格;應為非對稱的對稱時序。
  5. 原點、物理性與一致性——錯誤的原點、不匹配的個性、突兀的交叉淡入。
  6. 無障礙——減少動態和指標/懸浮門控。

以明確的決定結尾:

  • 阻擋——任何破壞感覺的回歸、鍵盤/高頻率操作上的動畫、UI 上的 scale(0)/ease-in,或易於 GPU 修復的非 GPU 動畫。
  • 通過——無破壞感覺的回歸、無應被刪除的明顯動態、時長與緩動在範圍內、需要處已處理可中斷性、尊重減少動態。

請具體說明,並引用檔案:行號。當需要數值時(曲線、時長、彈簧配置),請從 STANDARDS.md 提取確切值,而非近似。

指導方針

  • 預定動態偏好使用 CSS 過渡/@starting-style/WAAPI;動態、可中斷、手勢驅動的動態偏好使用 JS/彈簧。
  • 若不確定動態是否感覺正確,建議以慢動作/逐格方式審查,並隔天以全新眼光重新審視,而非隨意猜測。

Individual skills in this repo

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

CharbelElBateh/personal-website

Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use `animate`.

CharbelElBateh/personal-website

Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.

CharbelElBateh/personal-website

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

CharbelElBateh/personal-website

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

CharbelElBateh/personal-website

Guide to Sonner, the React toast library — install and wire up the Toaster, pick the right toast() call, promise and loading toasts, updating, dismissing and persisting toasts, styling, theming and icons, positioning and multiple toasters. Use when working with Sonner or troubleshooting it — toasts that don't appear, appear twice, lose their styles, ignore Tailwind classes, sit behind a modal, or don't follow dark mode.

CharbelElBateh/personal-website

Try to break a piece of UI by feeding it worst-case data — long names, unbreakable emails, one-letter names, missing fields, huge counts, zero items, long labels, non-Latin text, emoji, extreme numbers — then render it behind a "Demo data / Worst case" toggle and report everything that broke, with the fix for each. Use when the user asks to stress-test, break, or find edge cases in a component or screen, or to "try the worst case". For visual design critique use emil-design-eng; for motion use review-animations.

CharbelElBateh/personal-website

This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.

CharbelElBateh/personal-website

Search a codebase or UI for places that don't animate but should, and reject everything that shouldn't. Read-only; it proposes motion with exact values, it does not implement it. Use when the user asks "what could be animated here?" or wants to "make this feel more alive". For fixing existing animations, use improve-animations or review-animations instead.

CharbelElBateh/personal-website

Survey a codebase's animation and motion code as a senior motion advisor, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper models) to execute. Read-only on source code — it plans improvements, it does not apply them. Use when the user asks to "improve the animations", "audit the motion", "make this app feel better", or wants a roadmap of animation fixes rather than a review of a single diff.

CharbelElBateh/personal-website

Make a web app feel native on a phone — the small CSS and meta-tag fixes that separate "a website in a browser" from something that feels installed. Covers sticky hover states, tap highlight flashes, the 100vh bug, inputs that zoom the page, laggy taps, pull-to-refresh hijacking scroll, content under the notch, long-press selecting button text, carousels that scroll the wrong way, mismatched status bars, and the rule that you test on real hardware. Use when a web app is being built for or reviewed on mobile, when something "works in Chrome but feels wrong on my phone", when building a PWA, a bottom sheet, a carousel, a full-screen layout, or any touch interaction. For motion itself use animate; for React Native use animate-expo.

CharbelElBateh/personal-website

Pick the right library for a given frontend task from a curated, opinionated list — numbers, OTP inputs, charts, command menus, virtualization, drag and drop, toasts, state, styling, and more. Only runs when explicitly invoked; it does not trigger on its own.

CharbelElBateh/personal-website

Build multiple genuinely different versions of a UI piece you describe, rendered behind a visual picker so you can flip through them live and promote the one that feels right. Only runs when explicitly invoked; it does not trigger on its own.

CharbelElBateh/personal-website

How to write modern Swift well — modeling with value types, Swift 6 data-race safety and approachable concurrency (@concurrent, main-actor-by-default, actors, task groups), protocols and generics (some vs any), API design, performance and ARC, Swift Testing, macros, and the modern language features agents don't know about yet. Use when writing, reviewing, or migrating Swift, or when a concurrency error, a hang, a data race, a retain cycle, or a performance problem needs fixing.

相關技能