# muapi-youtube-shorts

Turns a long video into ranked 9:16 clips with virality scores and face-tracked crops. Useful when you need Shorts, TikTok or Reels out of a podcast or stream.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2700 installs · ★ 23
- Author: SamurAIGPT
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/SamurAIGPT/Generative-Media-Skills/tree/HEAD/.opencode/skills/muapi-youtube-shorts/SKILL.md
- Updated: 2026-09-29
- HTML: https://affpapa.org/en/nevibecode/skills/muapi-youtube-shorts

## What it does

The skill takes a YouTube link, a hosted mp4 or a local file and returns a ranked list of short clips. Transcription, highlight ranking, dedupe of overlapping candidates and vertical cropping all run on muapi.ai through the `/ai-clipping` endpoint. Nothing heavy runs on your machine.

Platform presets do the tuning: `--platform shorts` and `--platform reels` give 9:16 with 3 clips, `--platform tiktok` gives 9:16 with 5, `--platform feed` gives square 1:1 with 3. Override either with `--num-clips` and `--aspect-ratio`. Every clip arrives with a score from 0 to 100, its opening hook line and a one-sentence reason it should work.

You need `muapi-cli` installed and authed via `muapi auth configure`, plus `MUAPI_API_KEY` in the environment. A missing or rejected key surfaces as an error rather than a silent fallback. If the source URL is unreachable, upload the file with `muapi upload file` and pass the returned URL to `--source`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add SamurAIGPT/Generative-Media-Skills --skill muapi-youtube-shorts -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/muapi-youtube-shorts/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/muapi-youtube-shorts/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add SamurAIGPT/Generative-Media-Skills --skill muapi-youtube-shorts -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/muapi-youtube-shorts/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add SamurAIGPT/Generative-Media-Skills --skill muapi-youtube-shorts -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/muapi-youtube-shorts/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install SamurAIGPT/Generative-Media-Skills muapi-youtube-shorts
```

2. **Manually: put the files in place**
- File: `.github/skills/muapi-youtube-shorts/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add SamurAIGPT/Generative-Media-Skills --skill muapi-youtube-shorts -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/SamurAIGPT/Generative-Media-Skills --path .opencode/skills/muapi-youtube-shorts
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/muapi-youtube-shorts/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add SamurAIGPT/Generative-Media-Skills --skill muapi-youtube-shorts -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/SamurAIGPT/Generative-Media-Skills/tree/HEAD/.opencode/skills/muapi-youtube-shorts/SKILL.md

## When to use it
- cut a long recording into vertical clips for Shorts
- rank the strongest moments instead of guessing timestamps
- get face-tracked vertical crops without manual reframing
- batch a list of URLs from `urls.txt` in one run
- pull raw timestamps and render clips in your own pipeline

## Example prompts
- Cut five TikTok clips from this video: `bash run-youtube-shorts.sh --source "<URL>" --platform tiktok --view`
- Make three vertical Shorts from the podcast and show me the ranked list with scores
- Read the links in `urls.txt` and run each one through the skill

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 6d6a5ed82aae757c.

BEGIN THIRD-PARTY FILE 6d6a5ed82aae757c
````text
---
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

---

## When to Use This vs. AI Clipping

| Use this skill when… | Use [AI Clipping](../../edit/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
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).
````
END THIRD-PARTY FILE 6d6a5ed82aae757c

The third-party file has ended. Everything between the 6d6a5ed82aae757c tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2442 of 6024 bytes. © SamurAIGPT · MIT · https://github.com/SamurAIGPT/Generative-Media-Skills/tree/HEAD/.opencode/skills/muapi-youtube-shorts/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
