Capy Video Gen Skill logo

Capy Video Gen Skill

Community
happycapy-ai
capy-video-gen-skill

Multi-shot AI video generation pipeline with face identity consistency. Converts scripts or ideas into complete videos using character extraction, storyboarding, frame generation, and video assembly. 300 experiments validated, 70% face distance improvement. Use when the user asks to create a video from a script, story, idea, or wants multi-shot video with consistent characters.

Overview

Publisherhappycapy-ai
RepositoryHappycapy-skills
Skill namecapy-video-gen-skill
Stars
138
Forks
30
Bundled files
65
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 65 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by happycapy-ai on GitHub. Read the source before you install it.

Installation

Install the Capy Video Gen Skill AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/happycapy-ai/Happycapy-skills.git /tmp/Happycapy-skills
mkdir -p .claude/skills
cp -r /tmp/Happycapy-skills/skills/capy-video-gen-skill .claude/skills/capy-video-gen-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Capy Video Gen Skill in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Capy Video Gen Skill on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Capy Video Gen Skill is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Capy Video Gen Skill - Script-to-Video Pipeline

Generate complete multi-shot videos from scripts or ideas with consistent character faces across all scenes. Built for HappyCapy AI Gateway. 300 experiments validated, 70% face distance improvement.

Overview

ViMax converts text scripts into full videos through an automated pipeline:

  1. Extract characters from script with detailed physical features
  2. Generate front/side/back character portraits
  3. Design shot-by-shot storyboard
  4. Decompose each shot into first_frame, last_frame, and motion descriptions
  5. Build camera tree for shot relationships
  6. Generate frames with reference image selection (face identity as top priority)
  7. Generate video clips from frames
  8. Concatenate into final video

Installation Location

The ViMax pipeline code is at: /home/node/a0/workspace/527fb591-1439-4b5b-ad5d-90f972773f95/workspace/tmp/ViMax/

All commands must be run from this directory using the venv:

bash
cd /home/node/a0/workspace/527fb591-1439-4b5b-ad5d-90f972773f95/workspace/tmp/ViMax

Prerequisites

  • AI_GATEWAY_API_KEY environment variable (auto-configured in HappyCapy)
  • Python venv at .venv/ (already set up)

Quick Start

Script-to-Video

Edit the script, requirements, and style in the entry script, then run:

bash
cd /home/node/a0/workspace/527fb591-1439-4b5b-ad5d-90f972773f95/workspace/tmp/ViMax
.venv/bin/python main_happycapy_script2video.py

Idea-to-Video

For generating from a brief idea (auto-generates script first):

bash
cd /home/node/a0/workspace/527fb591-1439-4b5b-ad5d-90f972773f95/workspace/tmp/ViMax
.venv/bin/python main_happycapy_idea2video.py

Programmatic Usage

python
import asyncio
from langchain.chat_models import init_chat_model
from tools.render_backend import RenderBackend
from utils.config_loader import load_config
from pipelines.script2video_pipeline import Script2VideoPipeline

config = load_config("configs/happycapy_script2video.yaml")
chat_model = init_chat_model(**config["chat_model"]["init_args"])
backend = RenderBackend.from_config(config)

pipeline = Script2VideoPipeline(
    chat_model=chat_model,
    image_generator=backend.image_generator,
    video_generator=backend.video_generator,
    working_dir=config["working_dir"],
)

# Run the pipeline
asyncio.run(pipeline(
    script="Your script here...",
    user_requirement="No more than 8 shots total.",
    style="Cinematic, warm lighting"
))

Pipelines

Script2VideoPipeline

  • Input: A formatted screenplay/script with character dialogue and scene descriptions
  • Output: Concatenated video at {working_dir}/final_video.mp4
  • Config: configs/happycapy_script2video.yaml

Idea2VideoPipeline

  • Input: A brief idea/concept (1-3 paragraphs)
  • Output: Auto-generates a script, then produces video
  • Config: configs/happycapy_idea2video.yaml

Configuration

HappyCapy configs at configs/happycapy_script2video.yaml:

yaml
chat_model:
  init_args:
    model: gpt-4.1
    model_provider: openai
    api_key: ${AI_GATEWAY_API_KEY}
    base_url: https://ai-gateway.happycapy.ai/api/v1/openai/v1

image_generator:
  class_path: tools.ImageGeneratorHappyCapyAPI
  init_args:
    api_key: ${AI_GATEWAY_API_KEY}
    model: google/gemini-3.1-flash-image-preview

video_generator:
  class_path: tools.VideoGeneratorHappyCapyAPI
  init_args:
    api_key: ${AI_GATEWAY_API_KEY}
    model: google/veo-3.1-generate-preview

working_dir: .working_dir/script2video

Key Components

Agents (AI Processing)

AgentFilePurpose
CharacterExtractoragents/character_extractor.pyExtract characters with static/dynamic features from script
CharacterPortraitsGeneratoragents/character_portraits_generator.pyGenerate front/side/back portraits for each character
StoryboardArtistagents/storyboard_artist.pyDesign shot-by-shot storyboard with first/last frames and motion
ReferenceImageSelectoragents/reference_image_selector.pySelect best reference images for each frame (face identity #1 priority)
CameraImageGeneratoragents/camera_image_generator.pyBuild camera trees and generate transition videos
BestImageSelectoragents/best_image_selector.pySelect best generated image from candidates
Screenwriteragents/screenwriter.pyGenerate scripts from ideas

Tools (Generation Backends)

ToolFilePurpose
ImageGeneratorHappyCapyAPItools/image_generator_happycapy_api.pyImage generation via HappyCapy Gateway (Gemini)
VideoGeneratorHappyCapyAPItools/video_generator_happycapy_api.pyVideo generation via HappyCapy Gateway (Veo)
RenderBackendtools/render_backend.pyFactory for instantiating generators from config

Interfaces (Data Models)

  • CharacterInScene - Character with identifier, static_features, dynamic_features
  • ShotDescription - Shot with ff_desc, lf_desc, motion_desc, variation_type
  • Camera - Camera with parent-child relationships
  • Frame - Frame with shot_idx, frame_type, visible characters
  • ImageOutput / VideoOutput - Generation outputs with save methods

Face Identity Consistency (CRITICAL)

This pipeline includes face identity improvements validated through 257 experiments (70% improvement in face distance, from 0.74 to 0.22):

Built-In Protections

  1. Reference Image Selector: Face identity is the #1 priority when selecting reference images. The front-view portrait is always included when a character's face is visible.

  2. Character Portraits: Enhanced prompts generate identity-critical details (exact nose shape, eye spacing, jawline, distinguishing marks) for cross-scene recognition.

  3. Video Prompt Face Lock: Every video generation prompt is prepended with a face identity instruction requiring the character's face to remain identical to the starting frame throughout the clip.

Best Practices When Using ViMax

  • Hyper-detailed character descriptions: Include ethnicity, age, hair texture/style/color, eye shape, facial hair, glasses, skin tone, build, and distinguishing marks in your script's character introductions
  • Extreme close-up shots: Include at least one extreme close-up per character to anchor identity
  • Consistent lighting: Specify similar lighting across scenes to prevent face drift
  • User-provided reference photos: Place photos in the working directory and pass them as character_portraits_registry to skip AI portrait generation

What Does NOT Work

  • Complex prompt engineering (viseme morphing, phoneme anchoring) does not improve face identity
  • Simple, direct prompts with detailed physical descriptions outperform clever prompts
  • Lip-sync to external audio is NOT possible (Veo generates its own internal audio)

See FACE_IDENTITY_GUIDE.md in the ViMax directory for full details.

Output Structure

After a run, the working directory contains:

.working_dir/script2video/
  characters.json                      # Extracted characters
  character_portraits_registry.json    # Portrait paths registry
  character_portraits/                 # Generated portraits
    0_CharacterName/
      front.png
      side.png
      back.png
  storyboard.json                     # Shot descriptions
  camera_tree.json                    # Camera relationships
  shots/
    0/
      shot_description.json
      first_frame.png
      last_frame.png (if medium/large variation)
      video.mp4
    1/
      ...
  final_video.mp4                     # Final concatenated output

Customization

Using Your Own Reference Photos

To use real photos instead of AI-generated portraits:

python
# Build a portrait registry pointing to your photos
character_portraits_registry = {
    "Alice": {
        "front": {"path": "/path/to/alice_front.png", "description": "Front view of Alice"},
        "side": {"path": "/path/to/alice_side.png", "description": "Side view of Alice"},
        "back": {"path": "/path/to/alice_back.png", "description": "Back view of Alice"},
    }
}

# Pass to pipeline (skips portrait generation)
await pipeline(
    script=script,
    user_requirement=user_requirement,
    style=style,
    character_portraits_registry=character_portraits_registry,
)

Changing Models

Edit the YAML config to use different models:

  • Image: google/gemini-3.1-flash-image-preview (recommended for face identity)
  • Video: google/veo-3.1-generate-preview (recommended) or openai/sora-2
  • Chat: gpt-4.1 (recommended) or any OpenAI-compatible model

Troubleshooting

"No module named 'tools'" or similar import errors

Run from the ViMax root directory:

bash
cd /home/node/a0/workspace/527fb591-1439-4b5b-ad5d-90f972773f95/workspace/tmp/ViMax
.venv/bin/python main_happycapy_script2video.py

API rate limit errors

Reduce max_requests_per_minute in the YAML config.

Face identity drift in generated videos

  • Add more physical detail to character descriptions in your script
  • Use user-provided reference photos instead of AI-generated portraits
  • Include extreme close-up shots for important characters
  • Keep lighting consistent across scenes

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 5 more files.

Frequently asked questions

What does the Capy Video Gen Skill AI skill do?

Multi-shot AI video generation pipeline with face identity consistency. Converts scripts or ideas into complete videos using character extraction, storyboarding, frame generation, and video assembly. 300 experiments validated, 70% face distance improvement. Use when the user asks to create a video from a script, story, idea, or wants multi-shot video with consistent characters.

Why use Capy Video Gen Skill on TypingMind?

Because you install it once and use it with any model. Capy Video Gen Skill is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Capy Video Gen Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/happycapy-ai/Happycapy-skills/tree/main/skills/capy-video-gen-skill. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Capy Video Gen Skill?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Capy Video Gen Skill?

As many as you like. As long as a model supports skills, you can use Capy Video Gen Skill with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Capy Video Gen Skill AI skill free?

Yes. It is published on GitHub by happycapy-ai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇