New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Auto-generate viral 9:16 YouTube Shorts from a long-form

Muapi youtube shorts

by SamurAIGPT · MIT license · ★ 4,317 on GitHub · v2.0.0 · updated Sep 8

Muapi youtube shorts cover

Auto-generate viral 9:16 YouTube Shorts (or TikTok / Reels clips) from a long-form video. Thin platform-aware wrapper around the AI Clipping skill — picks sensible defaults for short-form social platforms (9:16, 30–60s sweet spot) and…

---
slug: muapi-youtube-shorts
name: muapi-youtube-shorts
version: "2.0.0"
description: Auto-generate viral 9:16 YouTube Shorts (or TikTok / Reels clips) from a long-form video. Thin platform-aware wrapper around the AI Clipping skill — picks sensible defaults for short-form social platforms (9:16, 30–60s sweet spot) and delegates the actual highlight extraction + crop to muapi.ai's `/ai-clipping` endpoint.
acceptLicenseTerms: true
---

# YouTube Shorts Generator

**Long video → ranked vertical short clips, tuned for short-form social.**

This skill is a platform-aware preset over the [AI Clipping](../../edit/ai-clipping/) primitive. It picks the right aspect ratio and clip count for the target platform and delegates highlight extraction, dedupe, and face-tracked auto-crop to muapi.ai's managed `/ai-clipping` endpoint.

Reference implementation: https://github.com/SamurAIGPT/AI-Youtube-Shorts-Generator
Underlying API: https://muapi.ai/playground/ai-clipping

---

Overview

Long video → ranked vertical short clips, tuned for short-form social.

The SKILL.md below is the copy AgentAlley read and checked. The repo has changed it since; the other files are from commit 5519622.

Manual install (npx, ZIP)
Claude Codenpx skills add SamurAIGPT/Generative-Media-Skills --skill muapi-youtube-shorts -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/SamurAIGPT/Generative-Media-Skills/tar.gz/5519622e885a \ | tar -xz -C ~/.claude/skills --strip-components=3 Generative-Media-Skills-5519622e885a/.opencode/skills/muapi-youtube-shorts
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/2e1237eea113ccb38ad9/muapi-youtube-shorts.zip" -OutFile "$env:TEMP\muapi-youtube-shorts.zip"; Expand-Archive "$env:TEMP\muapi-youtube-shorts.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md5.9 KB
Read the files here
SamurAIGPT/55196221 file
Shared references3SKILL.md reads these from elsewhere in the repo. Not in the ZIP.Get them on GitHub ↗
SKILL.md
Show the full text173 lines

YouTube Shorts Generator

Long video → ranked vertical short clips, tuned for short-form social.

This skill is a platform-aware preset over the AI Clipping primitive. It picks the right aspect ratio and clip count for the target platform and delegates highlight extraction, dedupe, and face-tracked auto-crop to muapi.ai's managed /ai-clipping endpoint.

Reference implementation: https://github.com/SamurAIGPT/AI-Youtube-Shorts-Generator Underlying API: https://muapi.ai/playground/ai-clipping


When to Use This vs. AI Clipping

Use this skill when… Use AI Clipping directly when…
Target is YouTube Shorts / TikTok / Reels You want full control over aspect / count
You want platform-tuned defaults You want raw timestamps (--coords-only)
You'd rather pass --platform tiktok than think about ratios You're integrating into a custom renderer

Agent Execution Protocol

Step 1 — Collect Inputs
Input Default Notes
--source — YouTube URL, hosted mp4 URL, or local file
--platform shorts shorts | tiktok | reels | feed (sets ratio + count defaults)
--num-clips platform default Override clip count
--aspect-ratio platform default Override aspect ratio

If the user gave only a URL, run with platform defaults — don't block.


Step 2 — Verify Prerequisites
  • muapi-cli installed and authed (muapi auth configure)
  • MUAPI_API_KEY available

That's it. Transcription, highlight ranking, dedupe, and cropping all run server-side — no ffmpeg, no Python, no Whisper, no LLM keys needed locally.


Step 3 — Run the Pipeline
bash library/social/youtube-shorts/scripts/run-youtube-shorts.sh \
  --source "<YOUTUBE_URL>" \
  --platform shorts \
  --num-clips 5 \
  --view

The script:

  1. Resolves the source (uploads local files to muapi CDN if needed).
  2. Picks platform defaults if --aspect-ratio / --num-clips aren't passed.
  3. Calls muapi edit clipping (the /ai-clipping endpoint) with the chosen params.
  4. Polls until done, prints a ranked summary, optionally downloads / opens clips.

What Happens Server-Side

The /ai-clipping endpoint runs the full pipeline:

  • Transcribes the audio.
  • Ranks highlights through a virality framework — hook moments, emotional peaks, opinion bombs, revelation moments, conflict, quotable lines, story peaks, practical value.
  • Dedupes overlapping candidates by score.
  • Top-N selects and face-tracks vertical crops.

Each clip ships with score (0–100), opening hook line, and a one-sentence "why it works" reason.


Platform Defaults

Platform Flag Aspect Default clips Notes
YouTube Shorts --platform shorts 9:16 3 Hook in first 1s
TikTok --platform tiktok 9:16 5 Higher energy, longer ok
Instagram Reels --platform reels 9:16 3 Hook in first 1s
Instagram Feed --platform feed 1:1 3 Static-feel works well

Override any default with --aspect-ratio / --num-clips.


Quick Invocation Patterns

Single video, defaults:

bash run-youtube-shorts.sh --source "https://youtube.com/watch?v=VIDEO_ID"

TikTok preset — 5 clips, view in player:

bash run-youtube-shorts.sh --source "<URL>" --platform tiktok --view

Square Instagram feed clips:

bash run-youtube-shorts.sh --source "<URL>" --platform feed --num-clips 3

Batch — urls.txt with one URL per line:

xargs -a urls.txt -I{} bash run-youtube-shorts.sh --source "{}"

Async submit (returns request_id, poll later):

REQUEST_ID=$(bash run-youtube-shorts.sh --source "<URL>" --async --output-json - | jq -r '.request_id')
muapi predict wait "$REQUEST_ID" --download ./outputs

Output Schema

{
  "source_video_url": "...",
  "shorts": [
    {
      "title": "The one mistake that cost me $50K",
      "start_time": 124.3,
      "end_time": 187.6,
      "score": 92,
      "hook_sentence": "Nobody talks about this, but it killed my first startup...",
      "virality_reason": "Opens with a number + regret, peaks on a contrarian lesson",
      "clip_url": "https://.../short_1.mp4"
    }
  ]
}

When reporting back, surface for each clip: rank, score, time range, title, hook, and clip URL.


Common Mistakes to Avoid

  1. Wrong aspect ratio for the platform — Shorts / TikTok / Reels are 9:16. The platform preset handles this; only override if you know why.
  2. Padding to hit --num-clips — if the API returns fewer survivors, return what you have. Don't ship low-score filler.
  3. Re-running on a 404'd clip URL — re-fetch the same request_id with muapi predict wait <id> rather than re-clipping.

Failure Modes

  • API key missing or rejected — surface the error; don't fabricate a key.
  • Job timed out — bump --poll-timeout and retry.
  • Source URL not reachable — upload the file via muapi upload file and pass the returned URL.
  • Fewer clips returned than requested — source had fewer rankable highlights. Return what came back with a note.

Done Criteria

The skill is done when:

  1. result.shorts has up to num_clips entries, each with a working clip_url.
  2. The user has been shown the ranked list (score, time range, title, hook, URL).
  3. If --output-json was set, the file exists and parses.
1---
2slug: muapi-youtube-shorts
3name: muapi-youtube-shorts
4version: "2.0.0"
5description: Auto-generate viral 9:16 YouTube Shorts (or TikTok / Reels clips) from a long-form video. Thin platform-aware wrapper around the AI Clipping skill — picks sensible defaults for short-form social platforms (9:16, 30–60s sweet spot) and delegates the actual highlight extraction + crop to muapi.ai's `/ai-clipping` endpoint.
6acceptLicenseTerms: true
7---
8 
9# YouTube Shorts Generator
10 
11**Long video → ranked vertical short clips, tuned for short-form social.**
12 
13This skill is a platform-aware preset over the [AI Clipping](../../edit/ai-clipping/) primitive. It picks the right aspect ratio and clip count for the target platform and delegates highlight extraction, dedupe, and face-tracked auto-crop to muapi.ai's managed `/ai-clipping` endpoint.
14 
15Reference implementation: https://github.com/SamurAIGPT/AI-Youtube-Shorts-Generator
16Underlying API: https://muapi.ai/playground/ai-clipping
17 
18---
19 
20## When to Use This vs. AI Clipping
21 
22| Use this skill when… | Use [AI Clipping](../../edit/ai-clipping/) directly when… |
23|:---|:---|
24| Target is YouTube Shorts / TikTok / Reels | You want full control over aspect / count |
25| You want platform-tuned defaults | You want raw timestamps (`--coords-only`) |
26| You'd rather pass `--platform tiktok` than think about ratios | You're integrating into a custom renderer |
27 
28---
29 
30## Agent Execution Protocol
31 
32### Step 1 — Collect Inputs
33 
34| Input | Default | Notes |
35|:---|:---|:---|
36| `--source` | — | YouTube URL, hosted mp4 URL, or local file |
37| `--platform` | `shorts` | `shorts` \| `tiktok` \| `reels` \| `feed` (sets ratio + count defaults) |
38| `--num-clips` | platform default | Override clip count |
39| `--aspect-ratio` | platform default | Override aspect ratio |
40 
41If the user gave only a URL, run with platform defaults — don't block.
42 
43---
44 
45### Step 2 — Verify Prerequisites
46 
47- `muapi-cli` installed and authed (`muapi auth configure`)
48- `MUAPI_API_KEY` available
49 
50That's it. Transcription, highlight ranking, dedupe, and cropping all run server-side — no `ffmpeg`, no Python, no Whisper, no LLM keys needed locally.
51 
52---
53 
54### Step 3 — Run the Pipeline
55 
56```bash
57bash library/social/youtube-shorts/scripts/run-youtube-shorts.sh \
58 --source "<YOUTUBE_URL>" \
59 --platform shorts \
60 --num-clips 5 \
61 --view
62```
63 
64The script:
651. Resolves the source (uploads local files to muapi CDN if needed).
662. Picks platform defaults if `--aspect-ratio` / `--num-clips` aren't passed.
673. Calls `muapi edit clipping` (the `/ai-clipping` endpoint) with the chosen params.
684. Polls until done, prints a ranked summary, optionally downloads / opens clips.
69 
70---
71 
72## What Happens Server-Side
73 
74The `/ai-clipping` endpoint runs the full pipeline:
75 
76- **Transcribes** the audio.
77- **Ranks highlights** through a virality framework — hook moments, emotional peaks, opinion bombs, revelation moments, conflict, quotable lines, story peaks, practical value.
78- **Dedupes** overlapping candidates by score.
79- **Top-N selects** and **face-tracks** vertical crops.
80 
81Each clip ships with score (0–100), opening hook line, and a one-sentence "why it works" reason.
82 
83---
84 
85## Platform Defaults
86 
87| Platform | Flag | Aspect | Default clips | Notes |
88|:---|:---|:---|:---|:---|
89| YouTube Shorts | `--platform shorts` | `9:16` | 3 | Hook in first 1s |
90| TikTok | `--platform tiktok` | `9:16` | 5 | Higher energy, longer ok |
91| Instagram Reels | `--platform reels` | `9:16` | 3 | Hook in first 1s |
92| Instagram Feed | `--platform feed` | `1:1` | 3 | Static-feel works well |
93 
94Override any default with `--aspect-ratio` / `--num-clips`.
95 
96---
97 
98## Quick Invocation Patterns
99 
100**Single video, defaults:**
101```bash
102bash run-youtube-shorts.sh --source "https://youtube.com/watch?v=VIDEO_ID"
103```
104 
105**TikTok preset — 5 clips, view in player:**
106```bash
107bash run-youtube-shorts.sh --source "<URL>" --platform tiktok --view
108```
109 
110**Square Instagram feed clips:**
111```bash
112bash run-youtube-shorts.sh --source "<URL>" --platform feed --num-clips 3
113```
114 
115**Batch — `urls.txt` with one URL per line:**
116```bash
117xargs -a urls.txt -I{} bash run-youtube-shorts.sh --source "{}"
118```
119 
120**Async submit (returns request_id, poll later):**
121```bash
122REQUEST_ID=$(bash run-youtube-shorts.sh --source "<URL>" --async --output-json - | jq -r '.request_id')
123muapi predict wait "$REQUEST_ID" --download ./outputs
124```
125 
126---
127 
128## Output Schema
129 
130```json
131{
132 "source_video_url": "...",
133 "shorts": [
134 {
135 "title": "The one mistake that cost me $50K",
136 "start_time": 124.3,
137 "end_time": 187.6,
138 "score": 92,
139 "hook_sentence": "Nobody talks about this, but it killed my first startup...",
140 "virality_reason": "Opens with a number + regret, peaks on a contrarian lesson",
141 "clip_url": "https://.../short_1.mp4"
142 }
143 ]
144}
145```
146 
147When reporting back, surface for each clip: rank, score, time range, title, hook, and clip URL.
148 
149---
150 
151## Common Mistakes to Avoid
152 
1531. **Wrong aspect ratio for the platform** — Shorts / TikTok / Reels are `9:16`. The platform preset handles this; only override if you know why.
1542. **Padding to hit `--num-clips`** — if the API returns fewer survivors, return what you have. Don't ship low-score filler.
1553. **Re-running on a 404'd clip URL** — re-fetch the same `request_id` with `muapi predict wait <id>` rather than re-clipping.
156 
157---
158 
159## Failure Modes
160 
161- **API key missing or rejected** — surface the error; don't fabricate a key.
162- **Job timed out** — bump `--poll-timeout` and retry.
163- **Source URL not reachable** — upload the file via `muapi upload file` and pass the returned URL.
164- **Fewer clips returned than requested** — source had fewer rankable highlights. Return what came back with a note.
165 
166---
167 
168## Done Criteria
169 
170The skill is done when:
1711. `result.shorts` has up to `num_clips` entries, each with a working `clip_url`.
1722. The user has been shown the ranked list (score, time range, title, hook, URL).
1733. If `--output-json` was set, the file exists and parses.
View all files on GitHub →

Details

Version
2.0.0
Updated
Sep 8, 2026
License
MIT
Stars on the repo
★ 4,317
Checked
Source
SamurAIGPT/Generative-Media-Skills ↗
Creator
SamurAIGPT · 16 listings
View creator

Similar skills

See all →
SkillOverlays silent b-roll cutaway clips onto a finished baseBroll overlaynovoads/agent-skills · by novoadsOverlays silent b-roll cutaway clips onto a finished base video — the base audio keeps running underneath while the picture cuts away and returns, and the final duration always equals the base duration. Use when the user asks to add b-roll, add cutaways, or overlay clips on a video: "add b-roll to this", cut away to a product shot here", "overlay these clips on my UGC ad". Entered from an approved base video plus its transcript, which comes from POST /v1/transcripts and needs no local install; it never generates the base itself and it never extends a video.★ 23 GitHub starsSkillCrafts viral social media hook video prompts for TikTokHiggsfield Social Hook Skillpixelab-ch/higgsfield-skills · by pixelab-chCrafts viral social media hook video prompts for TikTok, Instagram Reels, and YouTube Shorts via Higgsfield. Routes to kling3_0 (primary) or grok_video (fallback). Use when the user wants scroll-stopping hooks, viral short-form video, attention-grabbing openers, TikTok content, Reels content, Shorts content, or any social-media-optimized video.★ 6 GitHub starsSkillGab, o editor de vídeo com IAGab, o editor (/ogab)gabrielxreis/ogab · by gabrielxreisGab, o editor de vídeo com IA (comando /ogab). Skill PRINCIPAL para qualquer trabalho de vídeo: criar um vídeo novo (Reels, YouTube Shorts/longo, Meta Ads, anúncio, institucional, vídeo de cliente) OU editar um vídeo/projeto/timeline no DaVinci Resolve (cortar, montar, legendar, colocar música, takes, lettering, motions, cor, áudio, exportar). Leva do roteiro até a timeline pronta no DaVinci: roteiro para aprovação, voz por IA, música, efeitos sonoros, takes de banco ou gerados, lettering animado, motions e gráficos com HyperFrames, legenda com métrica e conferência automática. Use SEMPRE que o usuário pedir para criar/fazer/editar um vídeo, mexer no DaVinci, reels, anúncio, pauta ou roteiro, mesmo sem citar a skill; as outras skills de vídeo (hyperframes, motion-graphics etc.) entram como ferramentas DENTRO deste fluxo. Comando: /ogab <pedido> ou /ogab <subcomando> (ajuda, config, update, pauta, cliente). Também cuida do Instagram: legenda do post, carrossel pronto em imagem (PNG/PDF na marca do cliente), gancho de Reel viral, hashtags, tirar cara de IA do texto, semana de conteúdo, perfil e dados do nicho.★ 1 GitHub starsSkillTurn a long video into N viral-ready short clipsMuapi AI clippingSamurAIGPT/Generative-Media-Skills · by SamurAIGPTTurn a long video into N viral-ready short clips with a single managed API call. Wraps muapi.ai's `/ai-clipping` endpoint, which handles transcription, highlight ranking through a virality framework (hook / emotional peak / opinion bomb / revelation / conflict / quotable / story peak / practical value), overlap dedupe, and vertical face-tracking auto-crop server-side. No local Whisper, no local LLM, no GPU.★ 4.3k GitHub starsSkillTurn newly recorded talking-head footage into review-readyNet new video editorericosiu/ai-marketing-skills · by ericosiuTurn newly recorded talking-head footage into review-ready vertical video drafts with an explicit edit plan, deterministic FFmpeg rendering, captions, hook cards, audio normalization, and visual QA. Use for original Instagram Reels, TikTok videos, YouTube Shorts, LinkedIn videos, founder-led recordings, multiple takes of a new script or idea card, or requests to automate the first video-editing pass. Do not use to mine clips from long-form source videos.★ 3.6k GitHub starsSkillPython3 telemetry/versioncheck.py 2/dev/null || trueShort-Form Video Clip Pipeline — Skillericosiu/ai-marketing-skills · by ericosiupython3 telemetry/versioncheck.py 2>/dev/null || true★ 3.6k GitHub stars

More from SamurAIGPT

SkillGenerate a high-converting ad creative setMuapi ad creativeSamurAIGPT/Generative-Media-Skills · by SamurAIGPTGenerate a high-converting ad creative set — hero image, ad copy variations, and platform-optimized crops for Meta, Google Display, and LinkedIn.★ 4.3k GitHub starsSkillTurn a long video into N viral-ready short clipsMuapi AI clippingSamurAIGPT/Generative-Media-Skills · by SamurAIGPTTurn a long video into N viral-ready short clips with a single managed API call. Wraps muapi.ai's `/ai-clipping` endpoint, which handles transcription, highlight ranking through a virality framework (hook / emotional peak / opinion bomb / revelation / conflict / quotable / story peak / practical value), overlap dedupe, and vertical face-tracking auto-crop server-side. No local Whisper, no local LLM, no GPU.★ 4.3k GitHub starsSkillGenerate a high-cut-density action / fight scene by firstMuapi AI fight sceneSamurAIGPT/Generative-Media-Skills · by SamurAIGPTGenerate a high-cut-density action / fight scene by first composing a 16-cell storyboard image, then driving Seedance 2.0 image-to-video off that storyboard. Stacks GPT-Image-2 (character sheet + storyboard), Nano-Banana-2 (environment concept), and Seedance 2.0 i2v.★ 4.3k GitHub starsSkillTurn a real lifestyle photo into a polished chibi cloneMuapi chibi collage effectSamurAIGPT/Generative-Media-Skills · by SamurAIGPTTurn a real lifestyle photo into a polished "chibi clone sticker diary" image — the original person stays photorealistic, surrounded by 5–8 kawaii chibi mini-clones, scrapbook doodles, and handwritten-style captions that match the scene.★ 4.3k GitHub starsSkillDirect high-fidelity cinematic video with AIMuapi cinema directorSamurAIGPT/Generative-Media-Skills · by SamurAIGPTDirect high-fidelity cinematic video with AI — translates creative intent into technical cinematographic directives for Veo3, Kling, and Luma video models via muapi.ai★ 4.3k GitHub starsSkillCreate a polished, on-brand Instagram postMuapi instagram postSamurAIGPT/Generative-Media-Skills · by SamurAIGPTCreate a polished, on-brand Instagram post — square or portrait hero image with matching caption and hashtags.★ 4.3k GitHub stars