Communitygithub.com

shengdabai/Tony-Claude-Code-Skills

HyperFrames用CSSアニメーションアダプターパターン。CSSキーフレーム、animation-delayベースのタイミング、animation-fill-mode、animation-play-state、またはHyperFramesがプレビューおよびレンダリング時に決定論的にシークする必要があるCSSのみのモーションを作成する際に使用します。

Tony-Claude-Code-Skills とは?

このスキルは、HyperFramesフレームワーク内でCSSアニメーションを扱うためのアダプターパターンを提供します。HyperFramesは、CSSキーフレームアニメーションをシーク(指定した再生位置に移動)する機能を持ち、シンプルな反復モーション、背景の動き、きらめき、グロー、マスク、装飾などに適しています。アニメーション化する要素はランタイム初期化前にDOMに配置し、`data-start`属性でタイミングを設定することで、ローカルアニメーション時間をクリップに同期させる必要があります。WAAPI(Web Animations API)非対応環境へのフォールバックとして負のanimation-delayを使用するため、`animation-iteration-count`は有限値にするのが推奨されており、`animation-fill-mode: both`でシーク時の状態保持を保証します。CSSのみの装飾ループや、JSのタイムラインを利用するほどではない単一要素のエントランスアニメーションに最適です。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/shengdabai/Tony-Claude-Code-Skills/tree/HEAD/skills/hyperframes-css-animations

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

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

ドキュメント

HyperFrames用CSSアニメーション

HyperFramesは、cssランタイムアダプターを通じてCSSキーフレームアニメーションをシークできます。シンプルな反復モチーフ、背景のモーション、きらめき、グロー、マスク、およびシーケンス化されていない装飾に使用します。

シーンの振り付けには、GSAPの方が通常は明確です。CSSアニメーションは、モーションが1つの要素に属し、固定された継続時間を持つ場合に最適に機能します。

契約

  • アニメーション化する要素を、ランタイム初期化が完了する前にDOMに配置します。
  • タイミング指定のある要素にdata-start値を与え、ローカルアニメーション時間がクリップと一致するようにします。
  • 有限のanimation-durationとanimation-iteration-countを使用します。なぜなら、負のdelayフォールバックは、WAAPI非対応のCSSアニメーション環境では無限の継続時間を表現できないためです。
  • アクティブなモーションの前後でシーク状態を維持できるように、animation-fill-mode: bothを優先します。
  • ウォールクロックJavaScript、ホバートリガーの状態、ユーザーイベントに依存するクラストグルを避けます。

アダプターは、計算されたanimation-nameを持つ要素を検出し、利用可能な場合はブラウザのAnimationハンドルをシークし、利用できない場合は負のanimation-delayで一時停止にフォールバックします。

基本パターン

<div
  id="pulse-ring"
  class="clip pulse-ring"
  data-start="0"
  data-duration="4"
  data-track-index="2"
></div>

<style>
  .pulse-ring {
    width: 280px;
    height: 280px;
    border: 4px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation-name: pulse-ring;
    animation-duration: 1200ms;
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
    animation-iteration-count: 3;
    animation-fill-mode: both;
  }

  @keyframes pulse-ring {
    from {
      opacity: 0;
      transform: scale(0.82);
    }
    35% {
      opacity: 1;
    }
    to {
      opacity: 0;
      transform: scale(1.18);
    }
  }
</style>

スタガーパターン

キーフレームを重複させないためにCSSカスタムプロパティを使用します:

<div class="clip dots" data-start="1" data-duration="3" data-track-index="3">
  <span style="--i: 0"></span>
  <span style="--i: 1"></span>
  <span style="--i: 2"></span>
</div>

<style>
  .dots span {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border-radius: 50%;
    background: currentColor;
    animation: dot-pop 900ms ease-out both;
    animation-delay: calc(var(--i) * 120ms);
  }

  @keyframes dot-pop {
    from {
      opacity: 0;
      transform: translateY(18px) scale(0.75);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
</style>

適切な使用例

  • 既知の繰り返し回数を持つ装飾的なループ。
  • マスク、グロー、きらめき、グレイン、微妙なパララックスレイヤー。
  • 完全なJSタイムラインを必要としない、単一要素のエントランスアニメーション。

避けるべきこと

  • ブラウザがシーク可能なWAAPIベースのCSSアニメーションハンドルを公開していることを確認していない限り、無限CSSアニメーションを使用する。表示時間をカバーする有限の反復回数を優先する。
  • トランスフォームで対応できる場合に、top、left、width、heightなどのレイアウトプロパティをアニメーション化する。
  • レンダリングに重要なモーションをトリガーするために、ホバー、フォーカス、スクロール、メディアクエリに依存する。
  • 別の決定論的なタイムラインがその変更を制御しない限り、起動後にアニメーションクラスを変更する。

検証

CSSアニメーション構成を編集した後:

npx hyperframes lint
npx hyperframes validate

クレジットと参照

Individual skills in this repo

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

shengdabai/Tony-Claude-Code-Skills

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

shengdabai/Tony-Claude-Code-Skills

接收抖音、小红书、微信视频号等短视频链接或分享文案,查询作品/账号数据并提取语音文字稿,按作者和标题归档为 Markdown。用户希望完整解析短视频、取得数据或文字稿时使用;运行前检查 TikHub 与轻抖使用凭证,缺少时用新手能理解的方式引导购买和安全配置。

shengdabai/Tony-Claude-Code-Skills

Read-only queue dashboard for workspace-aware ship. (gstack)

shengdabai/Tony-Claude-Code-Skills

Anime.js adapter patterns for HyperFrames. Use when writing Anime.js animations or timelines inside HyperFrames compositions, registering animations on window.__hfAnime, making Anime.js seek-driven and deterministic, or translating Anime.js examples into render-safe HyperFrames HTML.

shengdabai/Tony-Claude-Code-Skills

Author a new HyperFrames registry block (caption style, VFX block, transition, lower third) or component (text effect, overlay, snippet) and ship it as an upstream PR to the hyperframes repo. Use ONLY when the user wants to CONTRIBUTE to the public catalog — for in-project caption/transition authoring use the `hyperframes` skill, for installing existing registry items use the `hyperframes-registry` skill.

shengdabai/Tony-Claude-Code-Skills

GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.

shengdabai/Tony-Claude-Code-Skills

HyperFrames CLI dev loop — `npx hyperframes` for scaffolding (init), validation (lint, inspect), preview, render, and environment troubleshooting (doctor, browser, info, upgrade). Use when running any of these commands or troubleshooting the HyperFrames build/render environment. For asset preprocessing commands (`tts`, `transcribe`, `remove-background`), invoke the `hyperframes-media` skill instead.

shengdabai/Tony-Claude-Code-Skills

Asset preprocessing for HyperFrames compositions — text-to-speech narration (Kokoro), audio/video transcription (Whisper), and background removal for transparent overlays (u2net). Use when generating voiceover from text, transcribing speech for captions, removing the background from a video or image to use as a transparent overlay, choosing a TTS voice or whisper model, or chaining these (TTS → transcribe → captions). Each command downloads its own model on first run.

関連スキル