Communitygithub.com

Andersonlimahw/lemon-ai-hub

モーショントークン、スプリングプリセット、React/Next.js(motion/react)のインタラクションパターンを提供します。製品UIをビデオに忠実に再現し、アニメーション化してシーク可能なシーンにし、実際の製品のモーションを映像と一致させます。モーションビデオが製品UIを表示または再現する場合に使用します。ビデオ成果物のないWeb UI作業には代わりにdesign-expertを使用してください。

lemon-ai-hub とは?

このスキルは、実際の製品UIをWeb上でアニメーション化し、ビデオ用に製品UIを再構築するための統一されたモーションパターンとトークンシステムを提供します。トークンファーストのアプローチにより、すべてのモーション値(duration、easing、distance、springs)を一元管理し、コンポーネント内にインライン数値を記述することを禁止します。アクセシビリティとSSRを考慮し、`useReducedMotion`フックを使用してユーザーの設定に応じたモーション制御を実装します。また、ボタンプレス、リストスタッガー、モーダル、トースト、スクロールリビールなど16種類以上のUIパターンとそのルールを定義しています。ビデオ制作のための製品UI再構築では、実際の製品から正確に計測し、アニメーションする要素のみを再構築するハイブリッドアプローチを推奨し、絶対時間に基づくシーク可能なアニメーションを実現します。このスキルはClaude Code、Cursor、CodexなどのAIエージェントで使用できます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Andersonlimahw/lemon-ai-hub/tree/HEAD/plugins/motion-movie-expert/skills/ui-motion-patterns

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

UIモーションパターン

2つの仕事:実際の製品UIをWeb上でアニメーション化すること、および製品UIをビデオ用に再設計せずに再構築すること。どちらも同じトークンを使用します。

1. トークンファースト

モーションを一度定義し、どこでもインポートします。コンポーネント内にインライン数値は記述しません。

export const motionTokens = {
  duration: { instant: 0.1, fast: 0.18, normal: 0.3, slow: 0.5, scene: 0.7 },
  easing: {
    standard: [0.2, 0, 0, 1],   // 進入 + 移動
    exit: [0.4, 0, 1, 1],       // 離脱
    emphasized: [0.3, 0, 0, 1],
  },
  distance: { nudge: 4, small: 8, medium: 16, large: 32 },
  stagger: 0.06,                // 0.05〜0.10の間を維持
} as const;

export const springs = {
  press:   { type: "spring", stiffness: 600, damping: 38 },  // ボタン、トグル
  snappy:  { type: "spring", stiffness: 420, damping: 34 },  // チップ、メニュー
  gentle:  { type: "spring", stiffness: 260, damping: 27 },  // カード、パネル
  layout:  { type: "spring", stiffness: 320, damping: 30 },  // 並べ替え、サイズ変更
  camera:  { type: "spring", stiffness: 140, damping: 20 },  // 大きな移動、ビデオのみ
} as const;

質量1、減衰比ζ = damping / (2·√stiffness):press 0.78、snappy 0.83、gentle 0.84、layout 0.84、camera 0.85 — すべて0.75〜0.90の範囲内(オーバーシュート≤約6%)。ブランドに合わせてこの式で調整し、このテーブルを唯一の情報源として維持してください。

2. アクセシビリティとSSR

"use client";
import { useReducedMotion } from "motion/react";

export function useSafeMotion() {
  const reduce = useReducedMotion();
  return {
    reduce,
    // モーション軽減:transformを削除し、短いopacity変化(≤0.2秒)を維持
    enter: reduce ? { opacity: 1 } : { opacity: 1, y: 0 },
    initial: reduce ? { opacity: 0 } : { opacity: 0, y: 8 },
    transition: reduce ? { duration: 0.2 } : undefined,
  };
}
  • 初回ペイント時にすでに表示されている要素にはinitial={false}を使用して、ハイドレーション時のフラッシュを回避します。
  • transformとopacityのみをアニメーション化します。width、height、top、left、またはbox-shadowをループでアニメーション化しないでください。代わりにlayoutまたはscaleを使用します。
  • ローエンドデバイス:durationを短縮し、装飾的なモーションをスキップします。

3. パターンとそのルール

パターンルール
ボタンプレスwhileTap={{ scale: 0.96 }}とsprings.pressを使用;100ミリ秒以内にフィードバック
条件付きレンダリングAnimatePresenceでラップし、安定したkeyを設定;すべてのinitial + animateにはexitが必要
ページ / ルート遷移AnimatePresence mode="wait":exitが完了してからenterを開始
リストスタッガーstaggerChildrenを0.05〜0.10秒に設定;スタッガーするアイテムは約8個までに制限し、残りは同時に表示
並べ替え / サイズ変更小さなサブツリー(≲5子要素)にのみlayoutを使用;それ以外は明示的なx/yを使用
モーダル / シートフォーカストラップ、Escapeで閉じる、スクロールロック、role="dialog"、aria-modal="true"、フォーカスを戻す
トースト表示される端から進入;自動非表示はホバー/フォーカス時に一時停止
数値変化垂直ロール:古い値は上方に退出しぼやけ、新しい値は下から進入;font-variant-numeric: tabular-nums
スクロールリビールwhileInViewとviewport={{ once: true }}を使用;スクロールアウト時に再アニメーション化しない
ローディング → 成功ボタンが圧縮→スピナー→チェックマーク;ボタンの幅は安定させる

4. ビデオ用の製品UI再構築

  • 推測するな、計測せよ。 製品ソースまたは計算されたスタイルからトークンを取得:色、角丸、フォントファミリー/ウェイト/トラッキング、スペーシング、アイコンセットとストローク。実際のスクリーンショットから色をサンプリングして比較。
  • ハイブリッドがデフォルト。 実際のスクリーンショットをコンテキストとして使用;アニメーションする要素のみをピクセル単位でその上に再構築。
  • 明示的な承認なしに再設計しないこと。 新しい色、フォント、アイコン、またはコピーは追加しない。
  • クリーンにキャプチャ。 ログアウト済みまたはデモアカウント、架空のデータ、個人情報なし、ユーザーが所有していない限りサードパーティのブランドなし。
  • シーク可能。 ビデオでは、すべてのアニメーション値を絶対時間(value = f(t))から駆動し、motion/reactのランタイム状態からは駆動しない。ライブWebにはmotion/reactを、レンダリングされたビデオには閉形式のスプリングまたはGSAPタイムラインを使用する。

これらのパターンがWebサイトで使用され、ビデオではない場合は、出荷前にdesign-expert検証ゲート(キーボード、フォーカス、モーション軽減、パフォーマンス)を実行してください。

Individual skills in this repo

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

Andersonlimahw/lemon-ai-hub

When the user wants to plan a product launch, feature announcement, or release strategy. Also use when the user mentions 'launch,' 'Product Hunt,' 'feature release,' 'announcement,' 'go-to-market,' 'beta launch,' 'early access,' 'waitlist,' 'product update,' 'how do I launch this,' 'launch checklist,' 'GTM plan,' or 'we're about to ship.' Use this whenever someone is preparing to release something publicly. For ongoing marketing after launch, see marketing-ideas. For the offer being launched (bonuses, guarantees, scarcity, naming), see offers.

Andersonlimahw/lemon-ai-hub

Create and edit motion videos end to end — product motion films, motion graphics, narrated explainers, captioned clips, UI animation recreations, and recuts. Orchestrates brief, storyboard, choreography, build (HyperFrames or any deterministic renderer), voice/caption sync, and render QC. Use when the user asks to make, animate, storyboard, narrate, caption, edit, or render a video or motion piece; skip for static images and web UI work with no video deliverable.

Andersonlimahw/lemon-ai-hub

Build and render a deterministic video composition — HyperFrames (HTML + GSAP) by default, or a custom seek(t) + Playwright + FFmpeg pipeline. Covers project setup, composition contract, timeline rules, creative direction for frames, lint/check/snapshot, preview, and local render. Use when implementing an approved storyboard as code.

Andersonlimahw/lemon-ai-hub

Motion law for multi-scene videos — seam continuity (axis, direction, speed, phase), carriers, causal motion, springs and timing, camera, transitions, stillness, and loop design. Use when planning or fixing how scenes connect and move, before and during any animation build.

Andersonlimahw/lemon-ai-hub

Short design-led motion graphics where motion is the message — kinetic typography, stat count-up, chart/data-viz reveal, logo sting, lower third or callout, animated map, tweet/news/headline card, webpage or UI walkthrough, and image-plus-data fusion. Usually under 10 s, up to about 30 s, no narration; renders to MP4 or a transparent overlay. Use when the user wants a short motion graphic, animated stat/chart/logo/map/card, or overlay; when the upstream HyperFrames `motion-graphics` skill is installed, use it for exact CLI flags and registry blocks.

Andersonlimahw/lemon-ai-hub

Turn a video idea, product, or script into an approved master prompt and pre-implementation storyboard — intake, concept, 8–12 state sequence, beat grid, transition map, camera plan, audio cue plan, and render architecture. Use before building any new video, or when a video brief is vague.

Andersonlimahw/lemon-ai-hub

Edit existing video and verify any render before delivery — recut, trim, reframe to other aspect ratios, burn in or attach captions, swap or remix audio, loop, and export; plus the QC gates (probe, contact sheet, stills per beat, loudness, loop seam, legibility, facts, PII). Use for editing footage or for the final check of any motion video.

Andersonlimahw/lemon-ai-hub

Synchronize narration, captions, music, and SFX with picture — narration writing, script lock, TTS or recorded voiceover, word-level timestamps, caption blocks, shot windows derived from the voice track, dwell budgets, ducking, and loudness targets. Use for narrated explainers, voiceover changes, subtitles, or any video where timing must follow audio.

Andersonlimahw/lemon-ai-hub

Agent skill at plugins/video/SKILL.md

関連スキル