Communitygithub.com

mrvijaykr56/youtubeshorts

>- Specialized agentic skill to direct, engineer prompts, and batch generate high-quality 9:16 vertical images for YouTube Shorts using Antigravity's generate_image tool. Maintains character and world visual consistency across 5 to 20 scenes, maps storyboards to cinematic Imagen 3 prompts, and organizes generated assets for the YTShorts rendering pipeline.

What is youtubeshorts?

youtubeshorts is a Antigravity agent skill that >- Specialized agentic skill to direct, engineer prompts, and batch generate high-quality 9:16 vertical images for YouTube Shorts using Antigravity's generate_image tool. Maintains character and world visual consistency across 5 to 20 scenes, maps storyboards to cinematic Imagen 3 prompts, and organizes generated assets for the YTShorts rendering pipeline.

Works with~Claude Code~Codex CLI~Cursor✓Antigravity✓Gemini CLI
npx skills add https://github.com/mrvijaykr56/youtubeshorts/tree/HEAD/.agents/skills/shorts-image-director

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

YouTube Shorts Visual Director & Image Generation Skill

This skill guides the agent in generating cohesive, cinematic 9:16 vertical scenes for YouTube Shorts using Antigravity's native generate_image capability.


1. Visual Consistency Framework (Character & World Sync) 👥🌍

When generating 5 to 20 images for a Short, avoiding stylistic or character drift is critical. If a character's face, clothing, or environment shifts randomly between scenes, video immersion breaks.

The 3 Pillars of Scene-to-Scene Synchronization:

  1. The Character DNA Blueprint:

    • Replicate the exact same 5-part character formula in every scene featuring the character: [Name + Age/Gender] + [Hair style & color] + [Facial traits] + [Exact clothing items & colors]
    • Example: "Maya, a 26-year-old female archaeologist with messy curly dark hair in a ponytail, freckles, wearing an olive linen safari shirt and brass compass necklace"
    • Never substitute with generic terms like "she looks" or "the woman".
  2. The World & Lighting Anchor:

    • Define a shared environment statement prepended to all scene prompts: [Setting] + [Primary light source & color temperature] + [Shadow style] + [Atmosphere]
    • Example: "Subterranean ancient Egyptian sandstone tomb, warm amber torchlight casting deep flickering shadows, floating golden dust particles, dark cobalt background."
  3. Visual Reference Chaining (ImagePaths parameter) 🔗:

    • Antigravity's generate_image tool natively supports ImagePaths (passing previous images as visual conditioning references).
    • The Workflow:
      1. Generate Scene 1 (establishing master character and lighting).
      2. Save scene_1.jpg.
      3. For Scene 2, 3, 4..., pass ImagePaths: ["<path_to_scene_1.jpg>"] into generate_image.
      4. This feeds Scene 1's visual latent features directly to Imagen 3, anchoring face shape, clothing color, and environmental tones across all subsequent scenes!

2. Pre-Flight Validation & User Approval 🛑

CRITICAL REQUIREMENT (Zero Token Wastage): Before executing any generate_image calls:

  1. Run the Pre-Flight Storyboard Validator:
    .\backend\venv\Scripts\python.exe backend\scripts\storyboard_validator.py --json "path/to/script.json"
    
    • Must have 0 blocking errors (e.g., no banned text tokens, valid 9:16 signals, within 60s Shorts ceiling).
  2. Present the Validated Storyboard & Art Style to the user with the validation stats.
  3. Ask for explicit user approval:

    "The storyboard has passed all pre-flight safety checks (0 errors, ~Xs estimated length). Would you like me to proceed with generating these [N] 9:16 images, or would you like to tweak any scenes or style parameters first?"

  4. DO NOT generate images until the user gives explicit confirmation.

3. Generating Images with Antigravity generate_image

For each scene in the storyboard (after receiving user approval):

  1. Pre-Generation Duplicate / Cache Check 🛑:

    • Check if scene_{X}.jpg or scene_{X}.png already exists in the destination folder (backend/output/<job_id>/) and is valid (>10 KB).
    • If it already exists, skip regeneration to prevent wasted tokens, unless the user explicitly asks to regenerate/re-roll that specific scene.
  2. Synthesize the Final Prompt (Ensuring Distinct Camera Framing):

    [World Anchor] + [Character Anchor] + [Scene Action & DISTINCT Camera Angle] + [Global Art Style Template] + [9:16 Vertical Composition]
    
    • Ensure the camera shot (e.g. wide vs macro vs reaction) differs from the preceding scene to avoid generating visually identical stills.
  3. Invoke the Tool: Call generate_image with:

    • AspectRatio: "9:16"
    • ImageName: scene_1, scene_2, scene_3, etc. (strictly unique per scene).
    • Prompt: The synthesized prompt.
    • ImagePaths: For scenes 2..N, pass ["<path_to_scene_1.jpg>"] for visual conditioning.
  4. Batch Generation: Generate scenes sequentially or in groups of scenes (up to 20 per short).


4. Asset Deployment to YTShorts Pipeline

Once images are generated by Antigravity:

  1. Antigravity stores generated images in the conversation artifact directory: C:\Users\<user>\.gemini\antigravity-ide\brain\<conversation-id>\*.png

  2. Copy or link the images to the YTShorts output/job directory: d:\WorkSpace\YTShorts\backend\output\<job_id>\ Standard naming required by the backend:

    • scene_1.png
    • scene_2.png
    • scene_3.png
    • ...
  3. Pair with the storyboard JSON: Save script.json in the same directory: d:\WorkSpace\YTShorts\backend\output\<job_id>\script.json


5. Triggering Video Rendering 🚀

Once the images and script.json are staged in backend/output/<job_id>/, run the standalone assembly tool:

.\backend\venv\Scripts\python.exe backend\scripts\assemble_short.py --job_dir "backend/output/<job_id>" --voice in_female --caption_style tiktok --music lofi --resolution 1080p --transition dynamic

This single command automatically:

  1. Synthesizes high-definition TTS narration (Edge-TTS / KittenTTS).
  2. Generates word-level synchronized ASS subtitles via Whisper.
  3. Renders the final 1080p/4K .mp4 video with optical transitions (xfade), Ken Burns pan/zoom motion, background music with audio ducking, and subtitle burn in one go!

6. Channel Branding & Community Asset Generation 🎨📊

Beyond 9:16 vertical story scenes, the visual director also produces marketing assets using Antigravity's native generate_image tool:

  1. Community Tab Image Polls (1:1 Square):

    • Generate or center-crop characters to 1024x1024 square cards.
    • Stage cards in backend/output/community_poll_assets/ (e.g. poll_1_character.jpg).
    • Image polls generate 3x–5x more reach on new channels than standard text posts.
  2. Channel Avatar Mascot (1:1 Square):

    • Generate centered 1024x1024 3D Pixar character portrait with expressive glossy eyes, holding a glowing storybook.
    • Save to backend/output/channel_branding/channel_avatar_1024x1024.jpg.
  3. Panoramic Channel Banner (16:9 Landscape):

    • Generate 16:9 panoramic cinematic landscape of the channel's recurring world.
    • Upscale with Lanczos filter to 2560x1440.
    • Save to backend/output/channel_branding/channel_banner_2560x1440.jpg.
  4. Zero External API Mandate:

    • Always prioritize Antigravity's native generate_image tool. Never fall back to unverified free external image APIs.

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

Related Skills