tim-hub/powerball-harness / .claude/skills/generate-video
generate-video
VerifiedGenerates product demo videos and release walkthroughs via Remotion. Use when creating video documentation or animated demos.
src/types/README.md
View on GitHub# Component Type Definitions
TypeScript type definitions for Remotion components, synchronized with JSON schemas.
## Overview
This directory contains TypeScript type definitions that match the JSON schema definitions in `schemas/`. These types ensure type safety when using Remotion components.
## Files
- **`components.ts`** - Core type definitions for Remotion components
- **`index.ts`** - Barrel export for convenience
## Type Definitions
### TransitionConfig
Configuration for the `TransitionWrapper` component.
```typescript
interface TransitionConfig {
type: 'fade' | 'slide_in' | 'zoom' | 'cut';
duration_ms: number;
easing?: 'linear' | 'easeIn' | 'easeOut' | 'easeInOut' | ...;
spring?: { damping?: number; stiffness?: number; mass?: number; };
delay_ms?: number;
direction?: 'left' | 'right' | 'top' | 'bottom';
opacity_range?: [number, number];
scale_range?: [number, number];
slide_distance?: number;
}
```
**Maps to**: `schemas/animation.schema.json`
**Example**:
```typescript
const transition: TransitionConfig = {
type: 'fade',
duration_ms: 500,
easing: 'easeInOut'
};
```
### EmphasisConfig
Configuration for the `EmphasisBox` component.
```typescript
interface EmphasisConfig {
level: 'subtle' | 'medium' | 'strong';
effect: 'glow' | 'pulse' | 'outline' | 'none';
duration_ms?: number;
text?: string;
color?: string;
glow_intensity?: number;
enable_pulse?: boolean;
font_size?: number;
background_color?: string;
enable_background?: boolean;
}
```
**Maps to**: `schemas/emphasis.schema.json`
**Example**:
```typescript
const emphasis: EmphasisConfig = {
level: 'strong',
effect: 'glow',
text: 'Important!',
color: '#00F5FF',
glow_intensity: 30
};
```
### BackgroundConfig
Configuration for the `BackgroundLayer` component.
```typescript
interface BackgroundConfig {
type: 'solid' | 'gradient' | 'image' | 'video' | 'particles';
value: string;
opacity?: number;
blur?: number;
animated?: boolean;
overlay_color?: string;
overlay_opacity?: number;
secondary_color?: string;
gradient_angle?: number;
}
```
**Maps to**: `schemas/visual-patterns.schema.json` background section
**Example**:
```typescript
const background: BackgroundConfig = {
type: 'gradient',
value: '#1a1a1a',
secondary_color: '#2a2a2a',
gradient_angle: 135,
animated: true
};
```
## Type Guards
Runtime validation functions to check if objects conform to expected types:
```typescript
// Check if object is valid TransitionConfig
if (isTransitionConfig(obj)) {
// TypeScript knows obj is TransitionConfig here
}
// Check if object is valid EmphasisConfig
if (isEmphasisConfig(obj)) {
// TypeScript knows obj is EmphasisConfig here
}
// Check if object is valid BackgroundConfig
if (isBackgroundConfig(obj)) {
// TypeScript knows obj is BackgroundConfig here
}
```
## Usage in Remotion Components
### Example: Using TransitionConfig
```tsx
import { TransitionConfig } from '../src/types/components';
import { msToFrames } from '../src/utils/converters';
interface MyComponentProps {
transition: TransitionConfig;
}
export const MyComponent: React.FC<MyComponentProps> = ({ transition }) => {
const durationFrames = msToFrames(transition.duration_ms, 30);
return (
<TransitionWrapper
type={transition.type}
duration={durationFrames}
easing={transition.easing}
>
{/* Your content */}
</TransitionWrapper>
);
};
```
## Schema Synchronization
These types are manually synchronized with JSON schemas. When schemas change:
1. Update the corresponding type definition
2. Update type guards if needed
3. Run tests to ensure compatibility
### Automated Schema Generation
For automated type generation from JSON schemas, use:
```bash
npm run generate:schemas
```
This generates Zod schemas in `src/schemas/` which can be used for runtime validation.
## Related Files
- **Schemas**: `schemas/*.schema.json` - JSON Schema definitions
- **Zod Schemas**: `src/schemas/*.ts` - Auto-generated Zod schemas
- **Components**: `remotion/components/*.tsx` - Remotion components
- **Utilities**: `src/utils/converters.ts` - Frame/ms conversion utilities
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Unverified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |