Communitygithub.com

ASoudy/AGS

アニメーションパフォーマンスの問題(レイアウトスラッシング、コンポジッタプロパティ、スクロール連動モーション、ブラー効果など)を監査・修正します。アニメーションがカクつく、トランジションがぎこちない、CSS/JSアニメーションのパフォーマンスをレビューする際に使用します。

AGS とは?

このスキルは、UIアニメーションのパフォーマンス問題を診断・修正するための包括的なガイドラインを提供します。レイアウトスラッシング、コンポジット処理の非効率、スクロール連動アニメーション、ブラー効果など、モーションパフォーマンスに悪影響を与える一般的なパターンを特定し、具体的な修正方法を提示します。CSS、WAAPI、Motion、rAF、GSAPなど、あらゆるアニメーション技術スタックに対応し、レンダリングパイプライン(レイアウト→ペイント→コンポジット)の各段階に応じた最適化ルールを優先順位付きで提供します。主な機能として、/fixing-motion-performanceコマンドを使用してファイルをレビューし、違反箇所、その重要度、具体的な修正案を報告します。このスキルはClaude CodeやCursorなどのAIエージェントプラットフォームで動作し、既存のアニメーションライブラリを無断で移行せず、指定されたスタック内でルールを適用します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ASoudy/AGS/tree/HEAD/AGAS/plugins/antigravity-awesome-skills-claude/skills/fixing-motion-performance

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

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

ドキュメント

モーションパフォーマンスの修正

アニメーションパフォーマンスの問題を修正します。

使い方

  • /fixing-motion-performance この会話内のすべてのUIアニメーション作業に以下の制約を適用します。

  • /fixing-motion-performance <ファイル> ファイルを以下のすべてのルールに照らしてレビューし、以下を報告します:

    • 違反(正確な行またはスニペットを引用)
    • なぜ重要か(簡潔な一文)
    • 具体的な修正(コードレベルの提案)

明示的に要求されない限り、アニメーションライブラリを移行しないでください。既存のスタック内でルールを適用します。

使用すべきタイミング

以下の場合にこれらのガイドラインを参照してください:

  • UIアニメーションの追加または変更(CSS、WAAPI、Motion、rAF、GSAP)
  • ギクシャクしたインタラクションやトランジションのリファクタリング
  • スクロール連動モーションやスクロールに応じた表示の実装
  • レイアウト、フィルター、マスク、グラデーション、CSS変数のアニメーション
  • will-change、トランスフォーム、または測定を使用するコンポーネントのレビュー

レンダリングステップ用語集

  • コンポジット:transform、opacity
  • ペイント:color、borders、gradients、masks、images、filters
  • レイアウト:size、position、flow、grid、flex

ルールカテゴリ(優先順位順)

優先順位カテゴリ影響度
1絶対禁止パターン重大
2メカニズムの選択重大
3測定高
4スクロール高
5ペイント中〜高
6レイヤー中
7ブラーとフィルター中
8ビュートランジション低
9ツールの境界重大

クイックリファレンス

1. 絶対禁止パターン(重大)

  • 同じフレーム内でレイアウトの読み取りと書き込みを交互に行わない
  • 大規模または重要なサーフェスでレイアウトを継続的にアニメーションさせない
  • scrollTop、scrollY、またはスクロールイベントからアニメーションを駆動しない
  • 停止条件のない requestAnimationFrame ループを使用しない
  • それぞれがレイアウトを測定または変更する複数のアニメーションシステムを混在させない

2. メカニズムの選択(重大)

  • モーションにはデフォルトで transform と opacity を使用する
  • インタラクションが必要な場合のみ JS 駆動のアニメーションを使用する
  • ペイントまたはレイアウトのアニメーションは、小さく孤立したサーフェスでのみ許容
  • ワンショットエフェクトは連続モーションよりも許容範囲が広い
  • モーションを完全に削除するよりも、テクニックをダウングレードすることを優先

3. 測定(高)

  • 一度測定したら、transform または opacity でアニメーションさせる
  • すべての DOM 読み取りは書き込みの前にバッチ処理する
  • アニメーション中にレイアウトを繰り返し読み取らない
  • レイアウト風のエフェクトには FLIP スタイルのトランジションを優先
  • 測定と書き込みをバッチ処理するアプローチを優先

4. スクロール(高)

  • スクロール連動モーションには、利用可能な場合は Scroll または View タイムラインを優先
  • 可視性と一時停止には IntersectionObserver を使用する
  • アニメーションのためにスクロール位置をポーリングしない
  • 画面外ではアニメーションを一時停止または停止する
  • スクロール連動モーションは、大規模サーフェスで継続的なレイアウトやペイントをトリガーしてはならない

5. ペイント(中〜高)

  • ペイントをトリガーするアニメーションは、小さく孤立した要素でのみ許可
  • 大きなコンテナではペイント負荷の高いプロパティをアニメーションさせない
  • transform、opacity、または位置のために CSS 変数をアニメーションさせない
  • 継承された CSS 変数をアニメーションさせない
  • アニメーションさせる CSS 変数はローカルにスコープし、継承を避ける

6. レイヤー(中)

  • コンポジッタモーションはレイヤープロモーションを必要とし、決して自動的に行われるとは想定しない
  • will-change は一時的かつ限定的に使用する
  • 多数または大規模なプロモートレイヤーを避ける
  • パフォーマンスが重要な場合はツールを使用してレイヤーの動作を検証する

7. ブラーとフィルター(中)

  • ブラーアニメーションは小さく保つ(<=8px)
  • ブラーは短く、一度きりのエフェクトにのみ使用する
  • ブラーを継続的にアニメーションさせない
  • 大きなサーフェスでブラーをアニメーションさせない
  • ブラーよりも opacity と translate を優先する

8. ビュートランジション(低)

  • ビュートランジションはナビゲーションレベルの変更にのみ使用する
  • インタラクションの多いUIではビュートランジションを避ける
  • 中断やキャンセルが必要な場合はビュートランジションを避ける
  • サイズ変更はレイアウトをトリガーする可能性があるとみなす

9. ツールの境界(重大)

  • 明示的に要求されない限り、アニメーションライブラリを移行または書き換えない
  • これらのルールは既存のアニメーションシステム内で適用する
  • 同じコンポーネント内でAPIを部分的に移行したりスタイルを混在させたりしない

一般的な修正例

/* レイアウトスラッシング:width の代わりに transform をアニメーション */
/* 修正前 */ .panel { transition: width 0.3s; }
/* 修正後 */  .panel { transition: transform 0.3s; }

/* スクロール連動:JS の代わりに scroll-timeline を使用 */
/* 修正前 */ window.addEventListener('scroll', () => el.style.opacity = scrollY / 500)
/* 修正後 */  .reveal { animation: fade-in linear; animation-timeline: view(); }
// 測定:書き込み前に読み取りをバッチ処理(FLIP)
// 修正前 — レイアウトスラッシング
el.style.left = el.getBoundingClientRect().left + 10 + 'px';
// 修正後 — 一度測定し、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 = ''; });

レビューの指針

  • 最初に重大ルール(絶対禁止パターン、ツールの境界)を適用する
  • 意図に最も合致する、最もレンダリング負荷の低い処理を選択する
  • デフォルト以外の選択については、それを正当化する制約(サーフェスサイズ、期間、またはインタラクション要件)を明記する
  • レビュー時は、理論よりも実用的な指摘と具体的な代替案を優先する

制限事項

  • このスキルは、タスクが上記の範囲に明らかに一致する場合にのみ使用してください。
  • 出力を、環境固有の検証、テスト、または専門家によるレビューの代わりとして扱わないでください。
  • 必要な入力、権限、安全境界、または成功基準が不足している場合は、立ち止まって確認を求めてください。

Individual skills in this repo

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

ASoudy/AGS

Advanced JavaScript animation library skill for creating complex, high-performance web animations.

ASoudy/AGS

Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

ASoudy/AGS

Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

ASoudy/AGS

One sentence - what this skill does and when to invoke it

ASoudy/AGS

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

ASoudy/AGS

Pull a YouTube video transcript into a queryable markdown vault with yt-dlp subtitle discovery, VTT cleanup, metadata frontmatter, and capture-seed stubs.

ASoudy/AGS

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

ASoudy/AGS

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

ASoudy/AGS

AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

ASoudy/AGS

CRITICAL: Use for Makepad animation system. Triggers on: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

ASoudy/AGS

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

ASoudy/AGS

Next.js App Router principles. Server Components, data fetching, routing patterns.

ASoudy/AGS

Expert integration of Supabase Auth with Next.js App Router

ASoudy/AGS

React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

ASoudy/AGS

Best practices for Remotion - Video creation in React

ASoudy/AGS

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

ASoudy/AGS

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

ASoudy/AGS

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

ASoudy/AGS

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

ASoudy/AGS

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

関連スキル