css-animations
CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o css-animations.zip https://jpskill.com/download/19199.zip && unzip -o css-animations.zip && rm css-animations.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19199.zip -OutFile "$d\css-animations.zip"; Expand-Archive "$d\css-animations.zip" -DestinationPath $d -Force; ri "$d\css-animations.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
css-animations.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
css-animationsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
HyperFrames 用 CSS アニメーション
HyperFrames は、css ランタイムアダプターを介して CSS キーフレームアニメーションをシークできます。これは、単純な繰り返しモチーフ、背景の動き、きらめき、光沢、マスク、およびシーケンス化されていない装飾に使用してください。
シーンの振り付けには、通常 GSAP の方が明確です。CSS アニメーションは、動きが1つの要素に属し、固定された期間を持つ場合に最適に機能します。
契約
- ランタイムの初期化が完了する前に、アニメーション化された要素を DOM に配置してください。
- ローカルアニメーション時間がクリップと一致するように、時間指定された要素に
data-start値を設定してください。 - 有限の
animation-durationとanimation-iteration-countを使用してください。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
クレジットと参考文献
- HyperFrames アダプターのソース:
packages/core/src/runtime/adapters/css.ts。 - MDN CSS アニメーションのドキュメント: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/animation
- MDN
animation-fill-mode: https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
CSS Animations for HyperFrames
HyperFrames can seek CSS keyframe animations through its css runtime adapter. Use this for simple repeated motifs, background motion, shimmer, glow, masks, and non-sequenced decoration.
For scene choreography, GSAP is usually clearer. CSS animations work best when the motion belongs to one element and has a fixed duration.
Contract
- Put the animated element in the DOM before runtime initialization finishes.
- Give timed elements a
data-startvalue so local animation time matches the clip. - Use finite
animation-durationandanimation-iteration-countbecause the negative-delay fallback cannot represent unbounded duration in environments without WAAPI-backed CSS animations. - Prefer
animation-fill-mode: bothso seeked states hold before and after active motion. - Avoid wall-clock JavaScript, hover-triggered state, and class toggles that depend on user events.
The adapter discovers elements with computed animation-name, seeks their browser Animation handles when available, and falls back to pausing with negative animation-delay.
Basic Pattern
<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>
Stagger Pattern
Use CSS custom properties to avoid duplicating keyframes:
<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>
Good Uses
- Decorative loops with a known repeat count.
- Mask, glow, shimmer, grain, and subtle parallax layers.
- Simple one-element entrances where a full JS timeline would be excessive.
Avoid
- Infinite CSS animations unless you have verified the browser exposes seekable WAAPI-backed CSS animation handles. Prefer a finite iteration count covering the visible duration.
- Animating layout properties like
top,left,width, orheightwhen transforms work. - Relying on hover, focus, scroll, or media queries to trigger render-critical motion.
- Changing animation classes after startup unless another deterministic timeline controls that change.
Validation
After editing CSS animation compositions:
npx hyperframes lint
npx hyperframes validate
Credits And References
- HyperFrames adapter source:
packages/core/src/runtime/adapters/css.ts. - MDN CSS animation documentation: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/animation
- MDN
animation-fill-mode: https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode