| name | shopping-shorts-factory |
| description | End-to-end Korean shopping/product shorts video factory. Takes a Korean script (.md with Hook/Body/CTA structure) or product info and produces a 9:16 vertical MP4 (~30s) by orchestrating ElevenLabs TTS, Higgsfield CLI (Nano Banana Pro images + Kling 3.0 i2v), and ffmpeg composition (tpad freeze, atempo, ASS subtitle burn-in with Pretendard). Includes built-in A/B testing variant generation (shared body + alternate hook). Use this skill whenever the user asks to create Korean YouTube Shorts, Instagram Reels, TikTok-style product/shopping/beauty/cosmetic ads from a script, especially Hera/AHC/cushion/skincare/coupang-partners content. Also trigger when user says "쇼츠 만들어줘", "30초 영상", "AB 테스트 영상", "헤라/제품 쇼츠", "비포애프터 쇼츠", "비교 시연 영상", or references existing /04-scripts/*.md script files.
|
Shopping Shorts Factory
Korean shopping/product shorts automation. Single 30-second vertical MP4 from a script in ~5 minutes, ~40–70 Higgsfield credits per video.
When to use
- User has a Korean shorts script with Hook/Body/CTA structure (typically in
04-scripts/*.md)
- User wants to create a product/cosmetic/shopping ad shorts (Hera, AHC, cushion, skincare, coupang-partners, etc.)
- User asks for A/B test variants of a shorts video
- User explicitly says "쇼츠 만들어줘", "30초 영상", "쇼츠 영상 자동 제작"
Do NOT use when:
- User wants long-form (>60s) video — use a different pipeline
- User wants English narration — voice ID below is Korean-specific
- Higgsfield credits are below 100 (single video minimum ~40)
Output spec (always)
| Field | Value |
|---|
| Aspect | 9:16 vertical |
| Resolution | 720×1280 |
| Codec | h264 (libx264) + aac |
| Framerate | 24 fps |
| Duration | ~28–34s (slightly variable depending on narration) |
| Subtitle | ASS burn-in with Pretendard ExtraBold/Bold |
| Audio voice | Brian (Korean Seoul, male, advertisement style) |
Prerequisites (verify before running)
Run these checks first. If any fails, stop and ask the user:
higgsfield account status
echo "${ELEVENLABS_API_KEY:-MISSING}" | head -c 4
which ffmpeg && which ffprobe
ls ~/Library/Fonts/Pretendard-ExtraBold.otf
Default voice: ElevenLabs voice ID r2b2z8wPmZeh7CQksHSs (Brian — Korean Seoul accent, male, advertisement category). Override with VOICE_ID env var if needed.
API key: Never write the ElevenLabs key into any file in this skill. Pull from $ELEVENLABS_API_KEY env var, or ask the user inline and set it for the session only.
Workflow overview
Korean script (.md)
│
├─ Parse Hook / Body / CTA segments
│
├─ [parallel] ElevenLabs TTS → N segment mp3s (Korean, Brian voice)
├─ [parallel] Higgsfield image (nano_banana_2) → N reference PNGs (9:16, 2K)
│
├─ Higgsfield video (kling3_0) i2v → N raw mp4 clips
│ duration chosen per segment audio length (clamp 3–15s)
│
└─ ffmpeg assemble
├─ Normalize each clip: scale to 720x1280, pad, setsar=1, 24fps, libx264
├─ Match audio to video per segment:
│ atempo (speed) if audio > video
│ tpad (silence pad) if video > audio
│ OR tpad clone (freeze last frame) on video if audio >> video
├─ concat video clips and audio segments
├─ ASS subtitle burn-in (Pretendard font dir flag)
└─ Final mux: video + aac audio + faststart
Step-by-step
1. Parse the script
A typical script in 04-scripts/위크XX-제품-포맷.md has three sections marked by emoji headers:
- 🔴 훅 (Hook) — 0–3s tagline
- 📦 본문 (Body) — 3–25s main content
- 📢 CTA — 25–30s call to action
Extract the raw narration text (strip italic stage directions and inline markdown). Split body into 1–2 segments if its narration would exceed 15s (Kling 3.0 max clip duration).
2. Plan segments
Decide on N (usually 3–4 segments):
- Hook (1 segment, target 4–5s video)
- Body (1 or 2 segments, target 8–15s each)
- CTA (1 segment, target 4–5s video)
For each segment, draft a visual concept (start image) and an i2v motion prompt. Use "VIRAL HOOK STYLE" keywords for hook clips (zoom punch, jump cut, dynamic reveal).
3. Generate narration audio (ElevenLabs)
Use scripts/tts_korean.sh <text> <output.mp3>. Important constraint: max 3 concurrent ElevenLabs requests. Generate in batches of 3 or sequentially. After all segments are done, measure each with ffprobe to get exact durations — these drive the video clip length decisions.
4. Generate reference images (Higgsfield Nano Banana Pro)
Use scripts/gen_image.sh <prompt> — returns the image job UUID. Submit all N images in parallel, then wait for all. Cost: 2 credits per image at 9:16 / 1K-2K resolution.
Prompt patterns that work well for K-beauty shopping shorts:
- "Vertical 9:16, K-beauty editorial, hyper-realistic 4K"
- "Korean female influencer age 25–28, soft daylight"
- "Luxury cosmetic product on marble, golden price tag floating"
- "K-beauty advertisement final scene, glowing arrow pointing down"
5. Generate i2v video clips (Higgsfield Kling 3.0)
Use scripts/gen_video.sh <prompt> <duration> <start_image_id>. Cost: 1.75 credits per second (e.g., 5s = 8.75, 8s = 14, 12s = 21).
Strategy for matching audio duration → clip duration:
- Audio 4–5s → clip 5s
- Audio 7–9s → clip 8s
- Audio 10–13s → clip 12s
- Audio 14–15s → clip 15s (Kling max)
- Audio > 15s → split into 2 segments OR use freeze-frame extension in ffmpeg
For hook clips, the prompt prefix "VIRAL HOOK STYLE: Fast aggressive camera zoom-punch, dynamic reveal motion, jump-cut energy, …" produces engaging openings.
6. Assemble with ffmpeg
Use scripts/assemble_shorts.sh <work_dir> after laying out the directory like:
work_dir/
audio/
01-hook.mp3
02-body1.mp3
02-body2.mp3 (optional)
03-cta.mp3
video/
01-hook.mp4
02-body1.mp4
02-body2.mp4 (optional)
03-cta.mp4
subs.ass (subtitle file using assets/subs-template.ass styles)
The script handles:
- Per-segment audio fit: atempo (if audio > video) or silence pad (if audio < video)
- tpad freeze-frame extension (if video must be longer than recorded)
- 720x1280 normalization + 24fps re-encode
- concat with concat demuxer
- ASS burn-in with
fontsdir=~/Library/Fonts
- Final mux to
final.mp4
7. Open and verify
open <work_dir>/final.mp4
Visually inspect: subtitle timing, audio sync, hook impact. If body narration sounds rushed (>1.25x atempo), regenerate body video at longer duration instead of speeding the audio.
A/B testing variant (optional)
When user asks for A/B test (e.g., "A안 vs D안", "훅 변형 비교"), build two videos that share the body + CTA but differ only in the hook segment:
- Generate one set of body/CTA assets (audio + images + videos)
- Generate two hook assets (A-hook, D-hook) — different audio narration + different reference image + different i2v
- Run
assemble_shorts.sh twice with different hook clips
This keeps A/B isolation clean (single variable changed) and saves ~50% credits vs full duplication.
See references/ab-testing.md for KPI tracking guidance.
Cost estimation
| Scenario | Images | Videos | Total credits |
|---|
| Single 28s shorts (3 segments) | 3 × 2 = 6 | 5s + 10s + 5s = 35 | ~41 |
| Single 33s shorts (4 segments) | 4 × 2 = 8 | 5+8+12+5 = 52.5 | ~60 |
| A/B test (2 videos, shared body) | 5 × 2 = 10 | 5×2 + 8 + 12 + 5 = 52.5+8.75 = 61.25 | ~71 |
ElevenLabs cost: negligible (<500 chars per video, ~1 cent on the Creator plan).
Common pitfalls and fixes
| Symptom | Cause | Fix |
|---|
Failed to find two consecutive MPEG audio frames | ElevenLabs returned JSON error (rate limit) inside .mp3 | Inspect file with head -c 200, retry sequentially (max 3 concurrent) |
| Body audio rushed >1.25x | tried to fit 18s narration into 12s video | Use freeze-frame extension (tpad) or generate 2 body clips |
| Subtitles render as squares/missing | Pretendard font not found by libass | Pass fontsdir=~/Library/Fonts to ass filter |
| Hook narration starts too early | no silence pad before TTS | adelay=800|800,apad,atrim=0:5.04 to delay 0.8s |
| Video clip resolution mismatch | Kling outputs vary (716×1284 or 768×1344) | Always renormalize with scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2,setsar=1 |
Error: unknown flag: --wait-timeout | wrong CLI flag | Use higgsfield generate wait <id> --timeout 5m --interval 5s |
Reference files
Bundled scripts
Assets
Output and logging
- Place all intermediate files under a per-run work directory (e.g.,
output/<slug>/)
- Final MP4 file naming:
<topic>-<format>.mp4 (e.g., 위크03-헤라3종비교-A안.mp4)
- After successful production, write a work log to
/Users/macbook15-platform/2026/L_2026_os/logs/ per the project's CLAUDE.md convention (date, tool, project, summary, file list, credit cost)