This skill should be used when the user wants to "clone a video", "recreate this video style", "analyze this video", "clone this content", "extract the scene from this video", "match this video format", or needs to reverse-engineer a video's style and recreate it with a different subject using Kie.ai and Gemini.
This skill provides a fully automated, end-to-end pipeline for "creative cloning"—analyzing a reference video, extracting its key scenes (camera angles, lighting, actions), generating custom AI image replacements, bringing them to life with AI video generation, tracking all metadata in an Airtable database, and stitching the final clips together into a finished video.
inputs/: Source materials (reference video to clone, reference images of the subject/character to inject).outputs/: Generated assets (YAML analysis files, generated scene_*.mp4 clips, final merged video).tools/: The Python scripts driving each step of the pipeline..agent/: Hidden Agent configuration folder.
.env: Holds all API keys (GEMINI_API_KEY, AIRTABLE_TOKEN, AIRTABLE_BASE_ID, ).KIE_API_KEYskills/: Contains this SKILL.md documentation.workflows/: Reusable workflow definitions.node_modules/: Contains ffmpeg-static used for video concatenation.nano-banana-pro and kling-2.6/image-to-video incur real costs on Kie.ai. Always warn the user before running batch generations. If generation returns a 402 error ("Credits insufficient"), the user must top up their Kie.ai balance before continuing..agent/.env.ffmpeg-static package (node_modules/ffmpeg-static/ffmpeg). Direct system brew installs are unnecessary; rely on the local Node artifact.generate_videos.py allows up to 10 minutes (60 attempts * 10s) before timing out. Do not abort early.tools/analyze_video.py)
.mp4 video (from inputs/) to Gemini API.gemini-2.5-flash to extract a scene-by-scene breakdown.outputs/.start_image_prompt and video_prompt strings, incorporating the user's specific subject/product replacing the original actors.tools/setup_airtable.py)
tools/generate_images.py)
google/nano-banana-edit model with the start_image_prompt.start_image attachment field in Airtable.tools/generate_videos.py)
video_prompt and start_image URL from Airtable.kling-2.6/image-to-video to animate the frame.scene_video in Airtable, and downloads it to outputs/.tools/combine_all.py)
ffmpeg-static to concatenate all downloaded scene_*.mp4 clips.--music) with a 2-second fade-out.--project is passed) Uploads the final merged mp4 to CatBox and logs the URL to the final_video Airtable field.| Tool | Usage | Description |
|---|---|---|
analyze_video.py | python3 tools/analyze_video.py inputs/ref.mp4 outputs/analysis.yaml | Analyzes source video via Gemini 2.5 Flash and extracts scene metadata. |
setup_airtable.py | python3 tools/setup_airtable.py | Initializes Airtable schema and seeds initial prompt data. |
generate_images.py | python3 tools/generate_images.py "Project Name" "Scene Name" | Creates Kie.ai static image, logs to Airtable start_image. |
generate_videos.py | python3 tools/generate_videos.py "Project Name" "Scene Name" | Creates Kie.ai Kling video from the image, logs to Airtable scene_video. |
combine_all.py | python3 tools/combine_all.py out/v1.mp4 out/v2.mp4 --music track.mp3 --output final.mp4 --project "Project Name" | Concatenates video clips, overlays audio, logs final output to Airtable. |
Authorization: Bearer <KIE_API_KEY>POST https://api.kie.ai/api/v1/jobs/createTaskGET https://api.kie.ai/api/v1/jobs/recordInfo?taskId=<ID>google/nano-banana-edit):
{
"model": "google/nano-banana-edit",
"input": {
"prompt": "Subject description here...",
"image_urls": ["https://catbox.moe/..."]
}
}
kling-2.6/image-to-video):
{
"model": "kling-2.6/image-to-video",
"input": {
"prompt": "Motion description here...",
"image_urls": ["https://airtable.com/..."],
"duration": "5",
"sound": false
}
}
POST https://catbox.moe/user/api.phpreqtype=fileupload, fileToUpload=@local_file.pngAuthorization: Bearer <AIRTABLE_TOKEN>.env file (AIRTABLE_BASE_ID).Table Name: Scenes
| Field Name | Type | Purpose |
|---|---|---|
| Project Name | Single line text | Groups scenes for a project. |
| Scene | Single line text | Identifier (e.g., "Scene 1 - Intro"). |
| start_image_prompt | Long text | Prompt used for NanoBanana Pro. |
| video_prompt | Long text | Prompt used for Kling 2.6. |
| start_image | Attachment | Kie.ai generated static image array. |
| scene_video | Attachment | Kie.ai generated video array. |
| final_video | Attachment | Combined video array (logged by combine_all.py). |
.agent/.env has GEMINI_API_KEY, AIRTABLE_TOKEN, AIRTABLE_BASE_ID, and KIE_API_KEY.node_modules/ffmpeg-static is installed (npm install ffmpeg-static).analyze_video.py on your source mp4.setup_airtable.py.generate_images.py "ProjectName" "SceneName" for each scene.generate_videos.py "ProjectName" "SceneName" for each scene.combine_all.py on the downloaded MP4s inside outputs/ to generate the final deliverable.