Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Safe-Zone Repurpose Gate: Stop UI-Cropped Shorts

    1

    Validates every caption, logo, and overlay against YouTube Shorts, TikTok, and Reels UI danger zones and compiles a clean ffmpeg crop plan only when the layout is safe.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Safe-Zone Repurpose Gate: Stop UI-Cropped Shorts

    Example session with this skill installed

    Validate my vertical layout demo_layout.json for TikTok and YouTube Shorts. If it passes, give me the FFmpeg filter string for a center crop.

    • Read your context and instructions
    • Compiled the safe-zone repurpose gate

    I have processed your layout against the YouTube Shorts and TikTok safe-zone specifications. The layout passed all validation checks with no UI collisions detected in the action rails or caption bars.

    Safe-Zone Validation Report

    PlatformStatusCollision TypeResolution
    YouTube ShortsPASSNoneValidated
    TikTokPASSNoneValidated

    ASCII Collision Map (1080x1920)

    #################### (Top Header)
    #..................#
    #.OOOOOO...........# (Hook Title)
    #..................#
    #..................#
    #..................#
    #..................#
    #..................#
    #.................## (Action Rail)
    #.................##
    #.................##
    #..................#
    #..OOOOOOOOOOOOOO..# (Captions)
    #################### (Bottom Bar)
    

    Compiled FFmpeg Filter

    ffmpeg -i input_16_9.mp4 -vf "crop=1080:1920:(in_w-1080)/2:0,scale=1080:1920" -c:a copy output_9_16.mp4
    

    Next steps

    • Run the provided FFmpeg command to export your validated vertical clip.
    • If you add a watermark, ensure it stays within the Universal Intersection Safe Zone (x:60-900).
    • Use --json flag if you need to pipe these results into a custom automation script.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Above-the-Fold Hook (3-Second Value)

    Stop publishing 9:16 Shorts, TikToks, and Reels where captions disappear under the bottom description bar or logos get buried behind like and comment buttons.

    Safe-Zone Repurpose Gate adds a deterministic 3-layer guardrail (SKILL.md SOP + 1080x1920 platform safe-zone JSON specs + zero-dependency Python 3 stdlib validator & compiler) that checks every overlay and face bounding box against YouTube Shorts, TikTok, and Instagram Reels UI danger zones, prints an ASCII 9:16 collision map in your terminal, and compiles a ready-to-use ffmpeg crop/scale/pad filter string only when every element clears all target platforms.

    What's Inside (3-Layer Architecture + 60-Second Test Pack)

    • Layer 1 — Operational SOP (SKILL.md): Strict Lock Target Platforms -> Validate Bounding Boxes -> Compile Clean FFmpeg Plan workflow for Claude Code, Cursor, and Codex CLI, with non-negotiable hard-fail rules.
    • Layer 2 — JSON Schema Draft 2020-12 Contracts (schemas/):
      • schemas/safe_zone_spec.schema.json: Canvas and per-platform UI danger-zone coordinate schema.
      • schemas/repurpose_layout.schema.json: Source video, target 9:16 output, target platform list, crop mode (center_crop, custom_crop, letterbox_pad), and overlay bounding-box schema.
    • Layer 3 — Zero-Dependency Validator & FFmpeg Compiler (scripts/safe_zone_gate.py): Pure Python 3 standard library (json, pathlib, argparse) that:
      • Checks every element (x, y, w, h) against canvas bounds and every target platform's UI danger zones, reporting exact pixel overlap area (px^2), overlap percentage, and pixel-level fix hints.
      • Renders an ASCII 9:16 visual safe-zone collision map directly in your terminal (# = UI danger zone, ! = collision, O = safe overlay, . = safe canvas).
      • Compiles a clean JSON repurpose plan and pure-text ffmpeg crop/scale/pad filter string (even-pixel H.264-aligned) when passing (or marked BLOCKED_DO_NOT_EXPORT when --compile-plan is forced on a failing layout).
      • Supports --json, --compile-plan, and --plan-out; exits 0 on PASS and 1 on FAIL.
    • 60-Second Test Pack (examples/):
      • examples/platform_safe_zones.json: 1080x1920 pixel danger zones for youtube_shorts, tiktok, and instagram_reels (top header, right interaction rail, bottom caption/audio bar, left bezel margin).
      • examples/demo_layout_fail.json: Broken 9:16 layout where captions collide with all 3 bottom bars and channel logo collides with the right-side like/comment rail.
      • examples/demo_layout_pass.json: Clean layout placed inside the universal 3-platform safe zone (x=60..900, y=250..1480).

    Who This Is For & Prerequisites

    Built for:

    • Faceless video creators, short-form editors, and social media agencies repurposing 16:9 videos into YouTube Shorts, TikTok, and Instagram Reels.
    • Automation builders running AI-assisted video pipelines who want a hard coordinate gate before spending render time.

    Prerequisites:

    • Python 3.9+ (uses Python 3 standard library only — zero pip install, zero external dependencies).
    • Works cross-platform on Windows (cp1252-safe ASCII output), macOS, and Linux.
    • Optional: ffmpeg installed locally only if you later execute the compiled filter command on actual media files (the validator and compiler itself require no ffmpeg installation).

    60-Second Quick-Start

    Run directly from the skill folder:

    # 1. Run the FAIL fixture (catches bottom-bar captions and right-rail logo collisions)
    python scripts/safe_zone_gate.py \
      --layout examples/demo_layout_fail.json \
      --spec examples/platform_safe_zones.json
    
    # 2. Run the PASS fixture (validates universal safe zone and compiles FFmpeg filter)
    python scripts/safe_zone_gate.py \
      --layout examples/demo_layout_pass.json \
      --spec examples/platform_safe_zones.json
    
    # 3. Export machine-readable JSON + compiled repurpose plan
    python scripts/safe_zone_gate.py \
      --layout examples/demo_layout_pass.json \
      --spec examples/platform_safe_zones.json \
      --json
    

    Real Terminal Proof

    1. FAIL Gate — Catching Bottom Caption & Right-Rail Logo Collisions (exit code 1)

    $ python scripts/safe_zone_gate.py --layout examples/demo_layout_fail.json --spec examples/platform_safe_zones.json
    ========================================================================
    SAFE-ZONE REPURPOSE GATE -- 9:16 VALIDATION & COMPILER REPORT
    ========================================================================
    Project          : ep04_short_hook_v1_broken
    Canvas           : 1080x1920 (9:16)
    Target Platforms : youtube_shorts, tiktok, instagram_reels
    Universal Safe   : x=60..900 (w=840), y=250..1480 (h=1230)
    Elements Checked : 4 | Out-of-Bounds: 0 | UI Collisions: 9
    ------------------------------------------------------------------------
    [BLOCKED] Layout rejected: 0 out-of-bounds error(s), 9 platform UI collision(s).
    
    Violations:
      1. [FAIL] UI_COLLISION element='dynamic_captions' (caption) x youtube_shorts::right_action_rail
         Overlap: 4800 px^2 (2.33% of element) at box [x=910, y=1440, w=30, h=160]
         Fix    : Move 'dynamic_captions' left by at least 30px (set x <= 50).
      2. [FAIL] UI_COLLISION element='dynamic_captions' (caption) x youtube_shorts::bottom_caption_bar
         Overlap: 120400 px^2 (58.33% of element) at box [x=80, y=1540, w=860, h=140]
         Fix    : Move 'dynamic_captions' up by at least 140px (set y <= 1300).
      3. [FAIL] UI_COLLISION element='dynamic_captions' (caption) x tiktok::right_action_rail
         Overlap: 4000 px^2 (1.94% of element) at box [x=900, y=1440, w=40, h=100]
         Fix    : Move 'dynamic_captions' left by at least 40px (set x <= 40).
      4. [FAIL] UI_COLLISION element='dynamic_captions' (caption) x tiktok::bottom_caption_bar
         Overlap: 172000 px^2 (83.33% of element) at box [x=80, y=1480, w=860, h=200]
         Fix    : Move 'dynamic_captions' up by at least 200px (set y <= 1240).
      5. [FAIL] UI_COLLISION element='dynamic_captions' (caption) x instagram_reels::right_action_rail
         Overlap: 2400 px^2 (1.16% of element) at box [x=920, y=1440, w=20, h=120]
         Fix    : Move 'dynamic_captions' left by at least 20px (set x <= 60).
      6. [FAIL] UI_COLLISION element='dynamic_captions' (caption) x instagram_reels::bottom_caption_bar
         Overlap: 154800 px^2 (75.0% of element) at box [x=80, y=1500, w=860, h=180]
         Fix    : Move 'dynamic_captions' up by at least 180px (set y <= 1260).
      7. [FAIL] UI_COLLISION element='channel_logo' (watermark) x youtube_shorts::right_action_rail
         Overlap: 18200 px^2 (76.47% of element) at box [x=910, y=980, w=130, h=140]
         Fix    : Move 'channel_logo' left by at least 130px (set x <= 740).
      8. [FAIL] UI_COLLISION element='channel_logo' (watermark) x tiktok::right_action_rail
         Overlap: 19600 px^2 (82.35% of element) at box [x=900, y=980, w=140, h=140]
         Fix    : Move 'channel_logo' left by at least 140px (set x <= 730).
      9. [FAIL] UI_COLLISION element='channel_logo' (watermark) x instagram_reels::right_action_rail
         Overlap: 16800 px^2 (70.59% of element) at box [x=920, y=980, w=120, h=140]
         Fix    : Move 'channel_logo' left by at least 120px (set x <= 750).
    ========================================================================
    # Exit code: 1
    

    (The full FAIL output in the package also includes the ASCII 9:16 collision map above the violations list.)

    2. PASS Gate — Universal Safe Layout Approved & FFmpeg Filter Compiled (exit code 0)

    $ python scripts/safe_zone_gate.py --layout examples/demo_layout_pass.json --spec examples/platform_safe_zones.json
    ========================================================================
    SAFE-ZONE REPURPOSE GATE -- 9:16 VALIDATION & COMPILER REPORT
    ========================================================================
    Project          : ep04_short_hook_v2_safe
    Canvas           : 1080x1920 (9:16)
    Target Platforms : youtube_shorts, tiktok, instagram_reels
    Universal Safe   : x=60..900 (w=840), y=250..1480 (h=1230)
    Elements Checked : 4 | Out-of-Bounds: 0 | UI Collisions: 0
    ------------------------------------------------------------------------
    [PASS] All 4 element(s) sit inside every target platform safe zone.
    ------------------------------------------------------------------------
    COMPILED REPURPOSE PLAN (READY_FOR_RENDER):
      Crop Mode  : center_crop -> source rect {'x': 656, 'y': 0, 'w': 608, 'h': 1080}
      FFmpeg -vf : crop=608:1080:656:0,scale=1080:1920:flags=lanczos,setsar=1
      FFmpeg Cmd : ffmpeg -i "input/episode_04_16x9.mp4" -vf "crop=608:1080:656:0,scale=1080:1920:flags=lanczos,setsar=1" -r 30 -c:v libx264 -pix_fmt yuv420p -c:a aac -b:a 192k "output/episode_04_short_safe.mp4"
    ========================================================================
    # Exit code: 0
    

    MCP Search Keywords

    safe zone repurpose compiler, youtube shorts safe zone, tiktok safe zone overlay, instagram reels safe zone, 9:16 bounding box validator, vertical video ui collision, ffmpeg crop scale compiler, 16:9 to 9:16 repurpose, caption safe zone checker, short-form video preflight, python stdlib video gate, json schema draft 2020-12, ascii safe zone map

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Video Skills.

    Requires manual or programmatic bounding box input. Does not perform auto-detection of objects or text within video frames.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed today

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listedtoday

    What's inside

    Frequently Asked Questions

    This skill uses a deterministic Python engine to cross-reference your video overlays against hardcoded, platform-specific UI maps for TikTok, Instagram, and YouTube. Unlike manual prompting, it detects 1-pixel collisions to ensure captions and titles are never hidden by app interfaces.

    The skill requires a Python 3 environment and FFmpeg installed on your system. It is designed to work with any AI agent or automation workflow that can execute Python scripts and handle JSON-based data inputs.

    You will receive the core Python validation engine, the platform-specific UI coordinate library, JSON schema templates for your layouts, and the FFmpeg command compiler. It is a complete toolkit for building a safe-zone-aware video pipeline.

    While the compiler handles the 2D geometry and safe-zone logic, it does not 'see' the video. You must provide the pixel coordinates for your overlays and crops, which can be easily generated by an LLM or an object detection model.

    Yes, the skill includes a 'Universal Safe Zone' feature that calculates the intersection of safe areas across all selected platforms. This allows you to generate a single FFmpeg command for a video that is guaranteed to look perfect on TikTok, Reels, and Shorts simultaneously.

    New in Image & Video