Skip to content

tim-hub/powerball-harness / .claude/skills/generate-video

generate-video

Verified

Generates product demo videos and release walkthroughs via Remotion. Use when creating video documentation or animated demos.

FileKindSize
SKILL.mdskill md6.6 KB
assets/backgrounds/backgrounds.jsonconfig4.9 KB
assets/sounds/sounds.jsonconfig5.7 KB
package.jsonmanifest710 B
references/MIGRATION-11.2.mdmarkdown7.9 KB
references/analyzer.mdmarkdown4.5 KB
references/asset-customization.mdmarkdown11.2 KB
references/best-practices.mdmarkdown8.6 KB
references/direction-guide.mdmarkdown14.6 KB
references/generator.mdmarkdown25.9 KB
references/image-generator.mdmarkdown9.0 KB
references/image-patterns.mdmarkdown14.5 KB
references/image-quality-check.mdmarkdown6.9 KB
references/naming-conventions.mdmarkdown6.0 KB
references/planner.mdmarkdown7.6 KB
references/visual-effects.mdmarkdown11.0 KB
remotion/components/BackgroundLayer.tsxother7.5 KB
remotion/components/EmphasisBox.tsxother5.9 KB
remotion/components/ProgressIndicator.tsxother6.8 KB
remotion/components/README.mdmarkdown8.5 KB
remotion/components/TransitionWrapper.tsxother5.7 KB
remotion/components/index.tsscript1004 B
remotion/tsconfig.jsonconfig617 B
schemas/README.mdmarkdown8.1 KB
schemas/animation.schema.jsonconfig5.2 KB
schemas/assets.manifest.schema.jsonconfig5.9 KB
schemas/character.schema.jsonconfig16.0 KB
schemas/direction.schema.jsonconfig4.5 KB
schemas/emphasis.schema.jsonconfig8.6 KB
schemas/examples/scenario-example.jsonconfig1.6 KB
schemas/examples/scene-example.jsonconfig1.6 KB
schemas/examples/video-script-example.jsonconfig5.1 KB
schemas/examples/visual-patterns/comparison-example.jsonconfig1.0 KB
schemas/examples/visual-patterns/concept-example.jsonconfig2.1 KB
schemas/examples/visual-patterns/flow-example.jsonconfig1.8 KB
schemas/examples/visual-patterns/highlight-example.jsonconfig745 B
schemas/scenario.schema.jsonconfig3.6 KB
schemas/scene.schema.jsonconfig8.2 KB
schemas/validate-schemas-basic.jsscript2.7 KB
schemas/validate-schemas.jsscript6.6 KB
schemas/video-script.schema.jsonconfig7.6 KB
schemas/visual-patterns.schema.jsonconfig14.2 KB
scripts/README.mdmarkdown7.4 KB
scripts/generate-schemas.jsexecutablescript6.2 KB
scripts/load-assets.jsexecutablescript14.1 KB
scripts/merge-scenes.jsexecutablescript15.0 KB
scripts/render-video.jsexecutablescript14.0 KB
scripts/template-registry.jsexecutablescript10.0 KB
scripts/validate-scenario.jsexecutablescript8.0 KB
scripts/validate-scene.jsexecutablescript4.3 KB
scripts/validate-video.jsexecutablescript13.0 KB
src/schemas/animation.tsscript3.7 KB
src/schemas/assets.manifest.tsscript2.8 KB
src/schemas/character.tsscript6.5 KB
src/schemas/direction.tsscript3.2 KB
src/schemas/emphasis.tsscript5.2 KB
src/schemas/index.tsscript423 B
src/schemas/scenario.tsscript2.7 KB
src/schemas/scene.tsscript5.5 KB
src/schemas/video-script.tsscript9.4 KB
src/schemas/visual-patterns.tsscript8.2 KB
src/types/README.mdmarkdown4.1 KB
src/types/components.tsscript6.0 KB
src/types/index.tsscript108 B
src/utils/README.mdmarkdown6.1 KB
src/utils/converters.jsscript5.9 KB
src/utils/converters.tsscript5.7 KB
src/utils/index.tsscript109 B
templates/image-prompts/comparison.txtmarkdown1.3 KB
templates/image-prompts/concept.txtmarkdown2.3 KB
templates/image-prompts/flow.txtmarkdown2.8 KB
templates/image-prompts/highlight.txtmarkdown3.2 KB
templates/intro-3min.jsonconfig8.9 KB
templates/teaser-90s.jsonconfig7.0 KB
tests/asset-loader.test.jsscript12.1 KB
tests/character-schema.test.jsscript7.9 KB
tests/converters.test.jsscript8.3 KB
tests/determinism.test.jsscript11.4 KB
tests/e2e/merge-e2e.test.jsscript13.3 KB
tests/e2e/render.test.jsscript6.1 KB
tests/fixtures/minimal-video-script.jsonconfig1.2 KB
tests/merge-scenes.test.jsscript17.2 KB
tests/schema-validation.test.jsscript3.7 KB
tests/validation-integration.test.jsscript12.9 KB
tests/visual-patterns.test.jsscript12.1 KB

remotion/components/BackgroundLayer.tsx

View on GitHub
import React from 'react';
import { useCurrentFrame, useVideoConfig, interpolate, Img, Video } from 'remotion';

/**
 * BackgroundLayer Component
 *
 * Provides 5 types of animated backgrounds for video scenes.
 * Supports both static images and video backgrounds.
 */

export type BackgroundType = 'neutral' | 'highlight' | 'dramatic' | 'tech' | 'warm';

export interface BackgroundLayerProps {
  /** Background type */
  type: BackgroundType;

  /** Path to background image or video (optional, falls back to generated gradient) */
  src?: string;

  /** Is the source a video? */
  isVideo?: boolean;

  /** Primary color for generated backgrounds (hex format) */
  primaryColor?: string;

  /** Secondary color for gradients (hex format) */
  secondaryColor?: string;

  /** Background opacity */
  opacity?: number;

  /** Enable animated effects */
  animated?: boolean;

  /** Blur intensity (pixels) */
  blur?: number;

  /** Overlay color (optional, for tinting) */
  overlayColor?: string;

  /** Overlay opacity */
  overlayOpacity?: number;
}

const TYPE_CONFIG: Record<BackgroundType, {
  primaryColor: string;
  secondaryColor: string;
  gradientAngle: number;
  animationSpeed: number;
}> = {
  neutral: {
    primaryColor: '#1a1a1a',
    secondaryColor: '#2a2a2a',
    gradientAngle: 135,
    animationSpeed: 0.5,
  },
  highlight: {
    primaryColor: '#00F5FF',
    secondaryColor: '#FF00F5',
    gradientAngle: 45,
    animationSpeed: 1,
  },
  dramatic: {
    primaryColor: '#0a0a0a',
    secondaryColor: '#FF1744',
    gradientAngle: 180,
    animationSpeed: 0.3,
  },
  tech: {
    primaryColor: '#0D1117',
    secondaryColor: '#1E3A8A',
    gradientAngle: 90,
    animationSpeed: 0.8,
  },
  warm: {
    primaryColor: '#FF6B35',
    secondaryColor: '#F7931E',
    gradientAngle: 315,
    animationSpeed: 0.6,
  },
};

export const BackgroundLayer: React.FC<BackgroundLayerProps> = ({
  type,
  src,
  isVideo = false,
  primaryColor,
  secondaryColor,
  opacity = 1,
  animated = true,
  blur = 0,
  overlayColor,
  overlayOpacity = 0.3,
}) => {
  const frame = useCurrentFrame();
  const { width, height, fps } = useVideoConfig();

  const config = TYPE_CONFIG[type];
  const effectivePrimaryColor = primaryColor ?? config.primaryColor;
  const effectiveSecondaryColor = secondaryColor ?? config.secondaryColor;

  // Animated gradient rotation
  const gradientAngle = animated
    ? interpolate(
        frame,
        [0, fps * 10], // 10 second cycle
        [config.gradientAngle, config.gradientAngle + 360],
        { extrapolateRight: 'wrap' }
      )
    : config.gradientAngle;

  // Animated gradient position for flowing effect
  const gradientPosition = animated
    ? interpolate(
        frame,
        [0, fps * 5], // 5 second cycle
        [0, 100],
        { extrapolateRight: 'wrap' }
      )
    : 0;

  // Background styles
  const containerStyle: React.CSSProperties = {
    position: 'absolute',
    width: '100%',
    height: '100%',
    top: 0,
    left: 0,
    overflow: 'hidden',
    zIndex: -1,
  };

  const gradientStyle: React.CSSProperties = {
    position: 'absolute',
    width: '100%',
    height: '100%',
    background: `linear-gradient(${gradientAngle}deg, ${effectivePrimaryColor} ${gradientPosition}%, ${effectiveSecondaryColor} ${100 + gradientPosition}%)`,
    opacity,
    filter: blur > 0 ? `blur(${blur}px)` : 'none',
  };

  // Tech-specific grid overlay
  const renderTechGrid = () => {
    if (type !== 'tech') return null;

    const gridOpacity = animated
      ? interpolate(
          Math.sin(frame * 0.05),
          [-1, 1],
          [0.1, 0.3]
        )
      : 0.2;

    return (
      <div
        style={{
          position: 'absolute',
          width: '100%',
          height: '100%',
          backgroundImage: `
            linear-gradient(${effectivePrimaryColor}40 1px, transparent 1px),
            linear-gradient(90deg, ${effectivePrimaryColor}40 1px, transparent 1px)
          `,
          backgroundSize: '50px 50px',
          opacity: gridOpacity,
        }}
      />
    );
  };

  // Dramatic-specific vignette
  const renderDramaticVignette = () => {
    if (type !== 'dramatic') return null;

    return (
      <div
        style={{
          position: 'absolute',
          width: '100%',
          height: '100%',
          background: 'radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%)',
        }}
      />
    );
  };

  // Highlight-specific particles effect (CSS-based)
  const renderHighlightParticles = () => {
    if (type !== 'highlight' || !animated) return null;

    const particleCount = 20;
    const particles = Array.from({ length: particleCount }, (_, i) => {
      const x = (i * 5) % 100;
      const delay = i * 0.2;
      const translateY = interpolate(
        frame - delay * fps,
        [0, fps * 3],
        [0, height],
        { extrapolateRight: 'wrap' }
      );

      return (
        <div
          key={i}
          style={{
            position: 'absolute',
            left: `${x}%`,
            width: '2px',
            height: '2px',
            backgroundColor: effectivePrimaryColor,
            borderRadius: '50%',
            transform: `translateY(${translateY}px)`,
            opacity: 0.6,
            boxShadow: `0 0 10px ${effectivePrimaryColor}`,
          }}
        />
      );
    });

    return <>{particles}</>;
  };

  // Warm-specific radial gradient
  const renderWarmRadial = () => {
    if (type !== 'warm') return null;

    const pulseScale = animated
      ? interpolate(
          Math.sin(frame * 0.1),
          [-1, 1],
          [0.8, 1.2]
        )
      : 1;

    return (
      <div
        style={{
          position: 'absolute',
          width: '100%',
          height: '100%',
          background: `radial-gradient(circle at center, ${effectivePrimaryColor} 0%, ${effectiveSecondaryColor} 100%)`,
          transform: `scale(${pulseScale})`,
          transformOrigin: 'center',
        }}
      />
    );
  };

  return (
    <div style={containerStyle}>
      {/* Base gradient or solid color */}
      {!src && <div style={gradientStyle} />}

      {/* Image or video source */}
      {src && !isVideo && (
        <Img
          src={src}
          style={{
            width: '100%',
            height: '100%',
            objectFit: 'cover',
            opacity,
            filter: blur > 0 ? `blur(${blur}px)` : 'none',
          }}
        />
      )}

      {src && isVideo && (
        <Video
          src={src}
          style={{
            width: '100%',
            height: '100%',
            objectFit: 'cover',
            opacity,
            filter: blur > 0 ? `blur(${blur}px)` : 'none',
          }}
        />
      )}

      {/* Type-specific effects */}
      {renderTechGrid()}
      {renderDramaticVignette()}
      {renderHighlightParticles()}
      {renderWarmRadial()}

      {/* Optional overlay tint */}
      {overlayColor && (
        <div
          style={{
            position: 'absolute',
            width: '100%',
            height: '100%',
            backgroundColor: overlayColor,
            opacity: overlayOpacity,
            pointerEvents: 'none',
          }}
        />
      )}
    </div>
  );
};

/**
 * Utility function to get recommended background for scene type
 */
export const getRecommendedBackground = (sceneType: string): BackgroundType => {
  const typeMap: Record<string, BackgroundType> = {
    intro: 'highlight',
    hook: 'dramatic',
    demo: 'neutral',
    feature: 'tech',
    cta: 'warm',
    conclusion: 'dramatic',
  };

  return typeMap[sceneType.toLowerCase()] ?? 'neutral';
};
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 198kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 198kUpdated Claude CodeCodexVerifiedInstall