From open-source-prep
Generates short AI videos from text or first-frame images using 10+ providers like OpenAI Sora, Google Veo, Runway Gen-3/4, Pika, Luma via Bun CLI. Supports text-to-video, image-to-video, optional last-frame control.
npx claudepluginhub iamzhihuix/happy-claude-skills --plugin open-source-prepThis skill uses the workspace's default tool permissions.
Generates short videos (text-to-video or image-to-video) across 10 providers through one CLI: `bun scripts/main.ts ...`. All providers are async — the CLI submits a job, polls until the provider finishes, then downloads the MP4 / WebM.
assets/EXTEND.template.mdpackage.jsonreferences/aspect_ratio_map.mdreferences/async-protocol.mdreferences/config/extend-schema.mdreferences/config/first-time-setup.mdreferences/error_codes.mdreferences/providers.mdscripts/main.tsscripts/providers/ark.tsscripts/providers/bailian.tsscripts/providers/fal.tsscripts/providers/google.tsscripts/providers/luma.tsscripts/providers/minimax.tsscripts/providers/openai.tsscripts/providers/pika.tsscripts/providers/runway.tsscripts/providers/vidu.tsscripts/types.tsGenerates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Generates short videos (text-to-video or image-to-video) across 10 providers through one CLI: bun scripts/main.ts .... All providers are async — the CLI submits a job, polls until the provider finishes, then downloads the MP4 / WebM.
# Text-to-video
bun scripts/main.ts --prompt "camera slowly pushes into a calico cat on grass" --ar 16:9 --duration 5 --video ./out.mp4
# Image-to-video (first frame)
bun scripts/main.ts --prompt "subtle zoom, leaves swaying" --image ./keyframe.png --duration 5 --video ./out.mp4
# Image-to-video with last-frame control (provider-dependent)
bun scripts/main.ts --prompt "seamless morph" --image ./a.png --last-frame ./b.png --video ./out.mp4
Route to happy-dreamina if the user explicitly mentions 即梦 / Jimeng / dreamina CLI. Route to happy-image-gen if the user actually wants a still image.
Locate EXTEND.md (same resolution order as happy-image-gen):
./.happy-skills/happy-video-gen/EXTEND.md$XDG_CONFIG_HOME/happy-skills/happy-video-gen/EXTEND.md~/.happy-skills/happy-video-gen/EXTEND.mdIf none, run bun scripts/main.ts --setup and walk the user through references/config/first-time-setup.md.
Verify one provider has credentials. Check env vars in the order the CLI auto-detects (see providers.md). Do not proceed without one usable provider.
Verify Bun. Fall back to npx -y bun if missing.
Warn about cost. Video generation is 10–100× more expensive per call than images. If the user asks for HD 1080P / 10-second clips, confirm before firing — show them the expected provider cost bracket from references/providers.md.
Preference order:
--provider <id> explicitly passed.default_provider.fal > ark > minimax > runway > luma > pika > vidu > google > bailian > openai.Pick by strength of the actual task:
ark (Seedance) or bailian (Wanx).google (Veo 3) or runway (Gen-4).fal (Kling) or luma.ark Seedance Lite, fal Kling v2.5 turbo, vidu Q1.google Veo 3, openai Sora 2.--prompt: always double-quote.--image <path> / --last-frame <path>: local paths, will be base64-encoded as data URIs automatically. --last-frame only accepted by Luma and a few FAL endpoints.--duration <seconds>: 5 is universal default. Caps: Sora-2 / Kling up to 10; Seedance up to 10; Luma up to 9.--ar <ratio>: 16:9 / 9:16 / 1:1 / 4:3 / 3:4. See references/aspect_ratio_map.md for provider-specific quirks.--resolution: 480p / 720p / 1080p. Not all providers honour it; most cap at 720p on cheap tiers.--poll-timeout: default 600s (10 min). Increase for 1080P or >5s clips.bun scripts/main.ts \
--prompt "..." \
--video ./out.mp4 \
--provider ark \
--duration 5 \
--ar 16:9 \
--resolution 720p
While waiting, do not fire another job on the same provider — concurrency caps on cheap tiers are strict (often 1). On success the CLI writes the MP4 and reports size + path. JSON output:
{ "success": true, "provider": "ark", "model": "doubao-seedance-1-0-lite-t2v-250408", "video": "/abs/out.mp4", "size_bytes": 4823456, "format": "mp4" }
If polling exceeds --poll-timeout, the CLI throws with the provider-specific external id (task id / job id / operation name / request id). Capture it from stderr and resume later with provider-specific tooling. See references/async-protocol.md for the per-provider id format and manual resume commands.
references/providers.md — all 10 providers with env vars, defaults, cost notes, feature matrix.references/async-protocol.md — external id format per provider + how to resume a stuck task.references/aspect_ratio_map.md — --ar mapping per provider.references/error_codes.md — common errors and fixes.references/config/first-time-setup.md — setup walkthrough.references/config/extend-schema.md — EXTEND.md schema.assets/EXTEND.template.md — config template.