agentsclimarketplace

Viral clip editor skill

Skill eligapris/viral-clip-editor-skill

Turn any long-form video into viral-ready short clips (TikTok/Reels/Shorts) or a single stitched recap. Use this skill whenever the user wants to: cut a video into clips, create viral shorts from a long video, extract key moments from a recording, add captions to a video, crop a video for mobile/vertical, make a recap or highlight reel from a podcast/interview/tutorial, download a YouTube video and edit it, or convert any horizontal video into vertical social-media-ready content. Also trigger when the user mentions: clip maker, short form content, reel maker, highlight reel, video recap, podcast clips, interview highlights, key moments extraction, or auto-edit video.From its SKILL.md

Install
npx -y skills add eligapris/viral-clip-editor-skill

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

10.6 KB, ~2.5k tokens by cl100k_base, as published. Nobody here has run it

Viral Clip Editor

Transform long-form videos into viral-ready vertical clips with word-by-word synced captions, smart cropping, and professional transitions. Works with local files or URLs (YouTube, Twitter/X, etc.).

How It Works

The pipeline is: Source → Transcript → Analyze → Crop → Cut → Caption → Join → Deliver

Every decision (where to cut, where to crop, what to caption) is driven by the actual spoken content, not by guessing from visual frames. This produces clips that tell a coherent story and feel natural.

Quick Start

User: "Turn this 30-min podcast into 5 viral clips"
User: "Download this YouTube video and make shorts from it"
User: "Cut my screen recording into key moments with captions"
User: "Make a vertical recap of this interview"

Prerequisites

Check and install dependencies before starting. Run once per session:

# Check yt-dlp
yt-dlp --version 2>/dev/null || pip install --break-system-packages yt-dlp

# Check faster-whisper (for transcription)
python3 -c "import faster_whisper" 2>/dev/null || pip install --break-system-packages faster-whisper

# Check opencv
python3 -c "import cv2" 2>/dev/null || pip install --break-system-packages opencv-python-headless

# Check ffmpeg
ffmpeg -version >/dev/null 2>&1 || echo "ERROR: ffmpeg not found"

# Check fonts (for captions)
fc-list | grep -i "dejavu" | grep -i bold

Pipeline Reference

Read the detailed pipeline guide for each step:

  • {skill_path}/references/pipeline.md — Full pipeline architecture and decision logic

Scripts

The skill bundles reusable Python scripts in {skill_path}/scripts/:

ScriptPurpose
pipeline.pyMain orchestrator — runs the full pipeline end-to-end
download.pyDownload videos from URLs via yt-dlp
transcribe.pyWhisper transcription with word-level timestamps
analyze.pyTranscript analysis — find viral moments, score segments
smart_crop.pyOpenCV motion tracking + content-aware crop regions
cut_and_caption.pyffmpeg-based clip extraction with phrase-synced captions
join_with_transitions.pyConcatenate clips with professional transitions
convert_format.pyFormat conversion, resolution scaling, container changes

Workflow

Step 1: Get the Source Video

From URL (YouTube, Twitter/X, any yt-dlp-supported site):

python3 {skill_path}/scripts/download.py --url "https://youtube.com/watch?v=..." --output /path/to/output.mp4

From local file: Just use the file path directly. Supported formats: MP4, MKV, WebM, AVI, MOV.

Step 2: Transcribe

python3 {skill_path}/scripts/transcribe.py \
  --input /path/to/video.mp4 \
  --output-dir /path/to/workdir \
  --model base.en \
  --language en

Produces transcript.json with word-level timestamps:

[
  {
    "id": 0,
    "start": 1.4,
    "end": 11.5,
    "text": "Okay, so you have been working on...",
    "words": [
      {"word": "Okay,", "start": 1.4, "end": 1.8, "prob": 0.95},
      {"word": "so", "start": 1.9, "end": 2.0, "prob": 0.98}
    ]
  }
]

Step 3: Analyze & Plan Clips

Read the transcript and identify the best moments. The model should analyze the transcript using these scoring criteria (from references/pipeline.md):

  1. Hook potential — Does this segment grab attention in the first 3 seconds?
  2. Information density — How much value is packed per second?
  3. Emotional resonance — Does it tell a story, surprise, or create urgency?
  4. Self-contained — Can this segment stand alone and still make sense?
  5. Visual action — Is something happening on screen (not just talking head)?

The model should produce a clip_plan.json:

[
  {
    "clip_num": 1,
    "name": "hook_problem",
    "label": "The Problem Hook",
    "start": 1.4,
    "end": 27.8,
    "reason": "Pattern-interrupt: relatable pain point that stops scrolling",
    "words": [...]
  }
]

Key rules for clip selection:

  • Each clip should be 15-60 seconds (sweet spot for virality)
  • The first clip MUST be a strong hook — no exceptions
  • Clips should tell a story when viewed in sequence
  • Avoid segments with lots of "um", "uh", dead air
  • Prefer segments where spoken words match visible action

Step 4: Smart Crop Analysis

For 9:16 vertical output, use OpenCV to find the best crop region per clip.

python3 {skill_path}/scripts/smart_crop.py \
  --input /path/to/video.mp4 \
  --plan /path/to/workdir/clip_plan.json \
  --output /path/to/workdir/crop_data.json

Crop strategy matters. Use the right method per content type:

Content TypeMethodWhy
Talking head / presenterMotion trackingFollows the person speaking
Screen recording / demoCenter-weightedKeeps readable content in frame
Mixed (presenter + screen)Motion + content blendTracks presenter but covers screen sections
Action / B-rollMotion peaksFollows where things are moving

Why not just center-crop? A blind center-crop often cuts off the presenter's face, misses the demo action, or shows empty space. Motion tracking finds where the viewer's attention should be and frames around that. This is the single biggest quality differentiator between amateur and professional vertical clips.

Step 5: Cut Clips with Captions

For each planned clip, extract it with smart cropping and burned-in captions:

python3 {skill_path}/scripts/cut_and_caption.py \
  --input /path/to/video.mp4 \
  --plan /path/to/workdir/clip_plan.json \
  --crops /path/to/workdir/crop_data.json \
  --output-dir /path/to/output/ \
  --style viral  # or: clean, minimal, bold

Caption rules:

  • Sync to the actual transcript — words highlight as they're spoken
  • Show 2 lines at a time (current phrase + next phrase)
  • Active phrase in accent color, upcoming in white
  • Semi-transparent dark backdrop behind caption area for readability
  • NO text overlays at the top of the video (watermarks, titles) unless explicitly requested
  • Font: DejaVu Sans Bold (or system default bold sans-serif)
  • Font size: ~40pt after 1080x1920 upscale
  • Caption area: bottom 300px of frame

Step 6: Join with Transitions (Optional)

To stitch clips into a single recap video:

python3 {skill_path}/scripts/join_with_transitions.py \
  --clips /path/to/output/Clip*.mp4 \
  --output /path/to/output/FinalRecap.mp4 \
  --transition fade \
  --transition-duration 0.5

Available transitions:

  • fade — Quick crossfade (default, 0.5s)
  • dip_black — Brief black dip between clips
  • dip_white — Brief white flash between clips
  • none — Hard cut (fastest, no re-encode of transitions)

Step 7: Format Conversion (Optional)

python3 {skill_path}/scripts/convert_format.py \
  --input /path/to/clip.mp4 \
  --output /path/to/clip_final.mp4 \
  --resolution 1080x1920 \
  --crf 24 \
  --preset medium

Output Specifications

Default output for social media virality:

  • Resolution: 1080×1920 (9:16 vertical)
  • Container: MP4 (H.264 + AAC)
  • CRF: 24-26 (good quality, reasonable size)
  • Captions: Burned-in (not soft subtitles) for maximum compatibility
  • Audio: AAC 96-128kbps

Important Rules

  1. Transcript-first, always. Never pick clip timestamps by guessing from visual frames. The transcript tells you what's being said and when. Use it as the source of truth.

  2. Crop per clip, not per video. Different segments of the same video may have the presenter on different sides of the screen, or the demo may shift. Analyze each clip's time range independently.

  3. Captions from transcript, not invented. The burned-in captions should match what's actually being said. Use Whisper's word timestamps for sync accuracy.

  4. Respect the story. When selecting clips, think about narrative flow. The first clip hooks, the middle clips build, the last clip pays off. Even individual clips should have internal coherence — a beginning, middle, and end within 15-60 seconds.

  5. No unnecessary overlays. Don't add watermarks, branding text, or decorative elements unless the user explicitly asks. Clean content > cluttered content.

  6. Check memory constraints. Long videos with many drawtext filters can OOM. Process clips one at a time. For clips over 45 seconds, consider splitting into sub-clips and concatenating.

  7. Horizontal option. If the user doesn't explicitly ask for vertical/mobile format, ask. Some content (screen recordings, presentations) may work better horizontal.

Full Pipeline (One Command)

For the full end-to-end pipeline in one go:

python3 {skill_path}/scripts/pipeline.py \
  --input /path/to/video.mp4 \
  --output-dir /path/to/output/ \
  --num-clips 5 \
  --style viral \
  --join \
  --join-transition fade

Or from a URL:

python3 {skill_path}/scripts/pipeline.py \
  --url "https://youtube.com/watch?v=..." \
  --output-dir /path/to/output/ \
  --num-clips 5 \
  --style viral

The pipeline script orchestrates all steps: download → transcribe → analyze → crop → cut → caption → (optionally) join.

When the Model Should Read Reference Files

  • references/pipeline.md — Read this when you need to understand the detailed architecture, scoring criteria for clip selection, or crop strategy decisions. Read it before running the pipeline for the first time.

  • scripts/pipeline.py — Read this when you need to understand command-line arguments, configuration options, or want to debug the pipeline.

Limitations

  • Videos longer than 2 hours may need segment-by-segment transcription
  • Very low audio quality or heavy music/noise reduces Whisper accuracy
  • Screen recordings with no speech cannot be transcribed (use visual analysis instead)
  • yt-dlp may not support every site — check with yt-dlp --list-extractors
  • Memory-intensive operations (many caption filters) may need clips processed one at a time

What ships with it: 9 files

51.8 KB alongside SKILL.md, 7 of them executable

references/

scripts/

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.