Communitygithub.com

Anhvu1107/all-agent-skill

モーション性能の修正リクエストに常に使用:レイアウトスラッシング、コンポジッタプロパティ、スクロール連動モーション、ブラー効果を含むアニメーションのパフォーマンス問題を監査・修正します。

all-agent-skill とは?

このスキルは、UIアニメーションのパフォーマンス問題を監査・修正するための包括的なガイドラインセットです。レイアウトスラッシング、コンポジッタプロパティの誤用、スクロール連動モーション、ブラー効果など、一般的なパフォーマンスの落とし穴に対処します。CSS、WAAPI、Motionライブラリ、requestAnimationFrame、GSAPなど、あらゆるアニメーションスタックで動作し、特にClaude CodeやCursorなどのAIエージェントがjankyなインタラクションやトランジションをリファクタリングする際に役立ちます。このスキルは、ルールを優先度別に分類し、トランスフォームと不透明度をデフォルトのメカニズムとして推奨し、測定、スクロール、ペイント、レイヤー管理に関するベストプラクティスを提供します。また、アニメーションライブラリの移行は明示的に要求されない限り行わず、既存のスタック内でルールを適用することを強調します。ユーザーは`/fixing-motion-performance`コマンドを実行して制約を適用し、特定のファイルをルールに対してレビューし、違反箇所、その影響、具体的な修正案を報告させることができます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Anhvu1107/all-agent-skill/tree/HEAD/.agent/skills/fixing-motion-performance

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

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

ドキュメント

fixing-motion-performance(モーション性能の修正)

選択的読み取りルール

以下から開始:

  • references/senior-master-standard.md
  • references/usage-routing.md
  • references/quality-checklist.md

その後、ユーザーの実際のタスクにマッチする継承されたドキュメント、スクリプト、アセット、または例のみを読み込みます。

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

使用方法

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

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

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

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

使用すべきタイミング

以下の状況でこのガイドラインを参照してください:

  • UIアニメーションの追加または変更時(CSS、WAAPI、Motion、rAF、GSAP)
  • jankyなインタラクションやトランジションのリファクタリング時
  • スクロール連動モーションやスクロールに応じた表示(reveal-on-scroll)の実装時
  • レイアウト、フィルター、マスク、グラデーション、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 Timelinesを優先
  • 可視性と一時停止にはIntersectionObserverを使用
  • アニメーションのためにスクロール位置をポーリングしない
  • 画面外ではアニメーションを一時停止または停止
  • スクロール連動モーションは、大規模なサーフェスで連続的なレイアウトやペイントを引き起こしてはならない

5. ペイント(中~高)

  • ペイントを誘発するアニメーションは、小さく孤立した要素でのみ許可
  • 大きなコンテナではペイント負荷の高いプロパティをアニメーションさせない
  • transform、opacity、またはpositionのために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.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches 007: Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Agentfolio: Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Animejs Animation: Advanced JavaScript animation library skill for creating complex, high-performance web animations.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astropy: Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astro: Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Emotional ARC Designer: One sentence - what this skill does and when to invoke it

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches I18n Localization: Internationalization and localization patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Interactive Portfolio: Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches JQ: Expert jq usage for JSON querying, filtering, transformation, and pipeline integration.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Landing Page Generator: Generates high-converting Next.js/React landing pages with Tailwind CSS.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches LEX: Centralized ''Truth Engine'' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Magic Animator: AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Makepad Animation: CRITICAL: Use for Makepad animation system.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs APP Router Patterns: Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Anhvu1107/all-agent-skill

ALWAYS use this when the user mentions Nextjs Best Practices, asks to build, debug, review, document, automate, test, configure, migrate, or make decisions in this domain, or the task clearly depends on Nextjs Best Practices; scope: Next.js App Router principles. Apply the bundled workflow, references, scripts, Senior Master standard, and Codex strict review gate before final output.

Anhvu1107/all-agent-skill

description: ALWAYS use this when the work is specifically about modern Next.js or React architecture, data flow, rendering strategy, routing, or performance-sensitive frontend behavior.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs Supabase Auth: Expert integration of Supabase Auth with Next.js App Router

Anhvu1107/all-agent-skill

ALWAYS use this when the task involves reading, extracting, splitting, merging, rotating, creating, validating, OCR-ing, form-filling, or otherwise producing or modifying PDF files.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches React Nextjs Development: React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when working with Remotion code, video compositions, rendering logic, timing, media assets, or React-based motion workflows.

関連スキル