css-animations — скилл для Claude Code: перемотка CSS-анимаций
Скилл css-animations помогает настроить CSS-анимации для HyperFrames так, чтобы плеер мог детерминированно перематывать кадры при рендеринге и превью.
Apache-2.0 271 установок ★ 484 обновлён 2026-08-15
npx skills add boraoztunc/skills --skill css-animations -a claude-codeЧто делает css-animations
Скилл задаёт правила вёрстки CSS-анимаций для рантайм-адаптера HyperFrames. Адаптер находит элементы с вычисленным свойством animation-name, управляет ими через Web Animations API или эмулирует перемотку через отрицательный animation-delay.
Чтобы таймлайн рендерился без сбоев, анимированные элементы должны находиться в DOM до инициализации рантайма и содержать атрибут data-start. Бесконечные анимации здесь ломают перемотку в окружениях без WAAPI, поэтому требуются строго конечные значения animation-iteration-count и свойство animation-fill-mode: both.
Разметку проверяют командами npx hyperframes lint и npx hyperframes validate.
Какие задачи решает
- настроить зацикленный CSS-эффект с точной привязкой ко времени клипа
- реализовать появление элементов со сдвигом через CSS-переменные
- подготовить CSS-анимацию к перемотке и рендерингу в HyperFrames
Примеры запросов агенту
- Оформи пульсирующий круг для HyperFrames с поддержкой перемотки
- Сделай эффект появления точек через CSS keyframes и data-start
- Проверь CSS-анимацию на совместимость с рантайм-адаптером HyperFrames
Как установить css-animations
1Через Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill css-animations -a claude-code2Вручную: положить файлы
~/.claude/skills/css-animations/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/css-animations/
1Через Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill css-animations -a codex2Вручную: положить файлы
.agents/skills/css-animations/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill css-animations -a cursor2Вручную: положить файлы
.cursor/skills/css-animations/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install boraoztunc/skills css-animations2Вручную: положить файлы
.github/skills/css-animations/SKILL.md1Через Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill css-animations -a gemini-cli2Командой платформы
gemini skills install https://github.com/boraoztunc/skills --path css-animationsВручную: положить файлы
.devin/skills/css-animations/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add boraoztunc/skills --skill css-animations -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о css-animations
Как установить css-animations в Claude Code?
Выполните команду npx skills add boraoztunc/skills --skill css-animations -a claude-code.
Зачем нужен скилл css-animations?
Он объясняет агенту, как писать CSS keyframes для HyperFrames, чтобы кадры корректно перематывались при рендеринге видео.
Почему нельзя использовать бесконечные анимации?
Механизм отката через отрицательный animation-delay не может рассчитать неограниченную длительность без прямой поддержки WAAPI в браузере.
Исходный текст
SKILL.md · Apache-2.0
---
name: css-animations
description: 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.
---
# 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-start` value so local animation time matches the clip.
- Use finite `animation-duration` and `animation-iteration-count` because the negative-delay fallback cannot represent unbounded duration in environments without WAAPI-backed CSS animations.
- Prefer `animation-fill-mode: both` so 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
```html
<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:
```html
<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`, or `height` when 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:
```bash
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
© boraoztunc · Apache-2.0 · boraoztunc/skills