Communitygithub.com

delorenj/skills

用于 HyperFrames 的 CSS 动画适配器模式。在编写 CSS 关键帧、基于 animation-delay 的时间控制、animation-fill-mode、animation-play-state 或纯 CSS 动画时使用,这些动画需要在预览和渲染期间被 HyperFrames 确定性定位。

skills 是什么?

该技能为 HyperFrames 提供了一个 CSS 动画运行时适配器,使其能够通过 `css` 适配器对 CSS 关键帧动画进行确定性定位(seek)。它适用于简单的重复主题、背景动效、闪烁、发光、遮罩以及非序列化的装饰性动画。对于复杂的场景编排,GSAP 更合适;而 CSS 动画则最适合那些属于单个元素且有固定持续时间的动效。技能文档详细说明了使用契约,包括在运行时初始化前将动画元素放入 DOM、为元素设置 `data-start` 属性以匹配剪辑时间、使用有限的 `animation-iteration-count` 以及优先选择 `animation-fill-mode: both`。此外,还提供了基础模式和交错(stagger)模式的代码示例,并指出应避免无限循环动画、布局属性动画以及依赖用户事件的状态变化。支持的平台包括使用 HyperFrames 的任何环境,其工作原理是通过获取浏览器 `Animation` 句柄进行定位,或回退到使用负的 `animation-delay` 进行暂停。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/delorenj/skills/tree/HEAD/css-animations

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

HyperFrames 的 CSS 动画

HyperFrames 可以通过其 css 运行时适配器来定位 CSS 关键帧动画。适用于简单的重复主题、背景动效、闪烁、发光、遮罩以及非序列化的装饰性动画。

对于场景编排,GSAP 通常更清晰。CSS 动画最适合那些属于单个元素且具有固定持续时间的动效。

契约

  • 在运行时初始化完成前,将动画元素放入 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 时间线显得过于繁琐。

应避免

  • 无限 CSS 动画,除非已验证浏览器暴露了可定位的 WAAPI 支持的 CSS 动画句柄。应优先使用覆盖可见持续时间的有限迭代次数。
  • 在使用变换(transform)可行的场景中,对 top、left、width 或 height 等布局属性进行动画。
  • 依赖悬停、聚焦、滚动或媒体查询来触发渲染关键动效。
  • 在启动后更改动画类,除非有其他确定性时间线控制这种更改。

验证

编辑 CSS 动画合成后:

npx hyperframes lint
npx hyperframes validate

致谢与参考

Individual skills in this repo

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

delorenj/skills

Plan and generate terminal ASCII animations/screensaver-style output (FPS, refresh rules, loop policy, low-flicker guidance), with a static poster frame and an optional local demo script.

delorenj/skills

ASCII video: convert video/audio to colored ASCII MP4/GIF.

delorenj/skills

Plan, build and quality-check a premium short commercial for a real business (roofing, property, ecommerce, B2B software) using AI-generated footage, code-built motion (HTML/GSAP), selective Three.js and an independent-critic "Gauntlet" loop. Use when asked to make a launch-style / SaaS-style video, business ad, explainer, sample reel or pitch video, or to review and improve one. Encodes motion principles distilled from 28 professional launch films, a quality bar, audio rules and a business-offer playbook.

delorenj/skills

Generate professional voiceovers using ElevenLabs AI. Use when the user needs to create voiceovers for videos, audio narration, or text-to-speech content. Supports multiple voices with character presets (narrator, salesperson, expert) for natural delivery. Includes single scene regeneration for fine-tuning.

delorenj/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.

delorenj/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.

delorenj/skills

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, and registry discovery.

delorenj/skills

Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML. Use when asked to build any HTML-based video content, add captions or subtitles synced to audio, generate text-to-speech narration, create audio-reactive animation (beat sync, glow, pulse driven by music), add animated text highlighting (marker sweeps, hand-drawn circles, burst lines, scribble, sketchout), or add transitions between scenes (crossfades, wipes, reveals, shader transitions). Covers composition authoring, timing, media, and the full video production workflow. For dev-loop CLI commands (init, lint, inspect, preview, render) see the hyperframes-cli skill; for asset preprocessing commands (tts, transcribe, remove-background) see the hyperframes-media skill.

delorenj/skills

Manim CE animations: 3Blue1Brown math/algo videos.

delorenj/skills

Join a Google Meet or Zoom call as a video meeting agent via PikaStreaming. Trigger: user drops a Google Meet or Zoom link, or asks to join a meeting.

delorenj/skills

Translate an existing Remotion (React-based) video composition into a HyperFrames HTML composition. Use ONLY when the user explicitly asks to port, convert, migrate, translate, or rewrite a Remotion composition as HyperFrames (e.g. "port my Remotion project to HyperFrames"). Do NOT use when (a) authoring a NEW HyperFrames composition (even if A/B-testing a Remotion video); (b) Remotion is mentioned in passing; (c) Remotion code is shared as reference, not for translation; (d) the user wants "the same video as my Remotion one" without explicitly asking to migrate the source — treat as a fresh HyperFrames build. When in doubt, default to the `hyperframes` skill. Detects unsupported patterns (useState, useEffect side effects, async calculateMetadata, third-party React component libraries, `@remotion/lambda`) and recommends the runtime interop escape hatch instead of a lossy translation.

delorenj/skills

Generate speech using the self-hosted voxxy (vox) TTS service at https://vox.delo.sh. Use when the user asks to speak, say, narrate, synthesize speech, clone a voice, create a voice, add or register a voice, pipe TTS, or control voice qualities by description (e.g. "a young woman with a cheerful voice"). Handles HTTP API usage, voice profile management, description-based voice design, cloning, MCP registration, and integration patterns for new platforms.

delorenj/skills

Capture a website and create a HyperFrames video from it. Use when: (1) a user provides a URL and wants a video, (2) someone says "capture this site", "turn this into a video", "make a promo from my site", (3) the user wants a social ad, product tour, or any video based on an existing website, (4) the user shares a link and asks for any kind of video content. Even if the user just pastes a URL — this is the skill to use.

delorenj/skills

YouTube transcripts to summaries, threads, blogs.

相关技能