Communitygithub.com

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Build a TikTok/Reels/YouTube **landscape 16:9 (1920×1080)** short video from a pre-recorded talking-head MP4 using HyperFrames — transcribe Vietnamese audio, scaffold a complete preview-ready 1920×1080 project with a slide pane (1200px) on the left and a floating avatar frame on the right, GSAP timeline có SPLIT↔PIP transitions (slide full-screen + avatar PIP corner thumbnail), breathing yoyo zoom + beat-driven punch-in trên avatar, 5 scene compositions kiểu "tier-row" pattern (post-stack hook / chats-stack problem / hero-orb solution / counter-row recap / terminal-row CTA), optional cream-paper editorial infographic image slots với `<img onerror>` fallback, 6 SFX wired tại scene boundaries, **NO captions** (giọng avatar là spine). USE WHEN user nói "edit video 16:9 từ HeyGen MP4", "scaffold project landscape", "podcast keynote editor", "talking head + slide editor", "build hyperframes 1920×1080", "tạo project 16:9 từ avatar mp4", "scaffold 16:9 hyperframes", "hyperframe landscape vide

What is MKT.LANDINGPAGE.SKILLS?

MKT.LANDINGPAGE.SKILLS is a Claude Code agent skill that build a TikTok/Reels/YouTube **landscape 16:9 (1920×1080)** short video from a pre-recorded talking-head MP4 using HyperFrames — transcribe Vietnamese audio, scaffold a complete preview-ready 1920×1080 project with a slide pane (1200px) on the left and a floating avatar frame on the right, GSAP timeline có SPLIT↔PIP transitions (slide full-screen + avatar PIP corner thumbnail), breathing yoyo zoom + beat-driven punch-in trên avatar, 5 scene compositions kiểu "tier-row" pattern (post-stack hook / chats-stack problem / hero-orb solution / counter-row recap / terminal-row CTA), optional cream-paper editorial infographic image slots với `<img onerror>` fallback, 6 SFX wired tại scene boundaries, **NO captions** (giọng avatar là spine). USE WHEN user nói "edit video 16:9 từ HeyGen MP4", "scaffold project landscape", "podcast keynote editor", "talking head + slide editor", "build hyperframes 1920×1080", "tạo project 16:9 từ avatar mp4", "scaffold 16:9 hyperframes", "hyperframe landscape vide.

Works with✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/lexuanthanhhy/MKT.LANDINGPAGE.SKILLS/tree/main/.claude/skills/mkt-hyperframe-talking-head-video-16-9

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

mkt-hyperframe-talking-head-video-16-9

Dedicated 16:9 (1920×1080) landscape editor — input là 1 folder workspace có sẵn voiceover.mp3 + source.mp4 + script.txt, output là cùng folder đó được scaffold đầy đủ thành HyperFrames preview project sẵn npx hyperframes preview.

Đây là layer operational dưới orchestrator mkt-full-video-with-11-hyperframe-heygen-16-9. Orchestrator handle Phase 1 (TTS) + Phase 2 (HeyGen avatar) → handoff folder cho skill này lo Phase 3 (transcribe + scaffold + lint + preview).


What this skill produces

<workspace_folder>/
├── voiceover.mp3                 # input (untouched)
├── source.mp4                    # input (HeyGen avatar lip-sync, untouched)
├── script.txt                    # input (untouched)
├── transcript.json               # generated — word-level Whisper output
├── transcript-cleaned.json       # generated — VN typo-cleaned
├── scenes-outline.json           # generated — pre-checkpoint outline (5 scenes)
├── scenes.json                   # generated — final per-scene metadata
├── index.html                    # generated — root composition 1920×1080
├── compositions/
│   ├── scene-1.html              # 1 file per scene, regardless of N
│   ├── scene-2.html              # authored by parallel LLM sub-agents (Phase 3d)
│   ├── scene-3.html              # NOT generated by Python templates (deprecated)
│   ├── ...
│   └── scene-N.html
├── sfx/                          # 6 SFX symlink/copy from skill assets
│   ├── camera-flash.mp3
│   ├── Whoosh sound effect (1).mp3
│   ├── búng tay.mp3
│   ├── Laser.mp3
│   ├── ting.mp3
│   └── Discord Notification - Sound Effect.mp3
└── (optional) infographics/
    ├── 1.png  2.png  3.png       # if --with-infographics
    └── prompts.md                # cream-paper editorial prompts per scene

Canvas:

  • Root: data-width="1920" data-height="1080".
  • Avatar frame default SPLIT: top:100, left:1290, width:540, height:880, borderRadius:32.
  • Avatar frame PIP corner: top:600, left:1540, width:320, height:420, borderRadius:20.
  • Slide-mount: 1200×1080 SPLIT, animatable to 1920×1080 during PIP.
  • Each composition's intrinsic size: data-width="1200" data-height="1080" (fills 100% of mount, expands when mount widens).

Inputs needed (workspace folder convention)

FileRequiredNote
voiceover.mp3YesElevenLabs TTS output (Hoàng's voice).
source.mp4YesHeyGen avatar lip-sync. Currently 9:16 portrait — landscape frame uses object-fit: cover; object-position: center 25% để crop hợp lý. See references/source-mp4-cropping.md.
script.txtYesVietnamese script that produced voiceover.mp3. Used for typo correction + scene heading derivation.
scenes-outline.jsonNoIf user pre-defined 5 scenes, skip auto-detection. Schema: see Step 3.

Slug = basename of the workspace folder (no derivation needed). All scripts read/write within that folder. Scripts accept --workspace <path> flag and default to CWD.


The pipeline (sequential script invocation)

voiceover.mp3 + source.mp4 + script.txt
    │
    ▼
1. transcribe_audio.py        ── Whisper VN → transcript.json (word-level)
    │
    ▼
2. clean_transcript.py        ── strip Whisper artifacts, apply VN dict
    │
    ▼
3. detect_scenes.py           ── transcript + script.txt → scenes-outline.json (5 scenes)
    │
    ▼
4. [optional CHECKPOINT]      ── user duyệt outline / chỉnh kicker, heading
    │
    ▼
5. scaffold_project.py        ── writes scenes.json (full schema), creates sfx/ + logos/ + avatar.jpg + yt-lower-third.html
    │
    ▼
6. 🔥 LLM SUB-AGENT FANOUT 🔥 ── orchestrator spawns N parallel general-purpose
                                  Agents (1 per scene) in a single message, each
                                  authoring compositions/scene-{num}.html from
                                  visual-plan.json + references/composition-patterns.md.
                                  NOT generate_compositions.py (Jinja2 generator
                                  DEPRECATED — collapses to 5 archetypes, can't adapt
                                  scene-specific metaphors, breaks listicle 6+ scenes).
    │
    ▼
7. generate_root_index.py     ── writes index.html with slide-mount (mounts scene-{num}.html
                                  for ALL scenes, no kind→fs-lesson mapping) +
                                  avatar-frame (claude-orange #d97757 brand border) +
                                  GSAP timeline (SPLIT↔PIP, breathing, punch-in,
                                  PIP_EVENTS, hybrid hook zoom) + 6 SFX wired +
                                  cream-paper b-roll img layer at root (full 1920×1080)
    │
    ▼
8. [optional] scaffold_infographic_slots.py
                              ── add <img onerror> placeholders + write prompts.md
                                  (cream-paper editorial per scene metaphor)
    │
    ▼
9. lint_and_preview.py        ── npx hyperframes lint → 0 errors, then preview
    │
    ▼
HAND-OFF — Studio URL printed; user reviews; orchestrator decides render.

Preview-first rule (non-negotiable): skill kết thúc ở Step 9 với Studio URL. Render MP4 chỉ chạy sau user explicit confirm — that step belongs to orchestrator hoặc user manual.

Step 1: transcribe_audio.py

python3 scripts/transcribe_audio.py --workspace <folder>

Wraps existing skill mkt-ai-video-extract-srt-segment if available locally; otherwise falls back to whisper CLI directly:

whisper voiceover.mp3 --model medium --language vi --word_timestamps True \
  --output_format json --output_dir .

KHÔNG bao giờ dùng --model medium.en cho audio Việt — .en translates instead of transcribes. Always --language vi.

Output: transcript.json — array of {text, start, end} word-level entries.

Step 2: clean_transcript.py

Re-uses logic từ sibling 9:16 editor (mkt-hyperframe-talking-head-video/scripts/clean_transcript.py). Strips U+FFFD, applies VN word-level + phrase-level dict (alphabit→Alphabet, Cod→Code, etc.), groups into 3-5 word phrases. Output: transcript-cleaned.json. (No caption-groups.json — captions are OFF in 16:9.)

Step 3: detect_scenes.py

Đọc transcript-cleaned.json + script.txt → infer 5 scene boundaries dùng standard knowledge-video skeleton:

#KindDefault kicker hintVariant
1hookFirst sentence of scripttier-row (post-stack feel via kind=hook)
2problemWhere script transitions to "ChatGPT/AI cũ", "khó", "đứt mạch", "vấn đề"…chats-stack
3solutionWhere script introduces tool/methodhero-orb
4recapWhere script shows numerical result ("X tiếng", "Y khách hàng")counter-row
5ctaLast sentence with comment/lưu/follow triggerterminal-row

If script không có 5 phần rõ ràng, output ít hơn (min 3) và warn user. Heuristic: split transcript by sentence boundaries into ~5 chunks weighted 1.5x to scene 3 (solution thường dài nhất).

Output scenes-outline.json:

[
  { "num": 1, "kind": "hook",     "start": 0.07,  "end": 13.73, "kicker": "...", "heading": "...", "variant": "tier-row" },
  { "num": 2, "kind": "problem",  "start": 13.73, "end": 27.37, "kicker": "...", "heading": "...", "variant": "chats-stack" },
  { "num": 3, "kind": "solution", "start": 27.37, "end": 47.75, "kicker": "...", "heading": "...", "variant": "hero-orb" },
  { "num": 4, "kind": "recap",    "start": 47.75, "end": 53.80, "kicker": "...", "heading": "...", "variant": "counter-row" },
  { "num": 5, "kind": "cta",      "start": 53.80, "end": 60.68, "kicker": "...", "heading": "...", "variant": "terminal-row" }
]

CHECKPOINT — print outline cho user duyệt. User có thể edit kicker/heading/variant inline rồi continue. Skip checkpoint nếu skill được gọi với --auto (orchestrator mode).

Step 4: scaffold_project.py

Reads scenes-outline.json → enriches each scene with:

  • accent_words — derive from heading (extract numbers + last 2-3 nouns)
  • content — pattern-specific schema (see assets/templates/)
  • badges — 1-3 floating badges per scene
  • brollEnd, hasBreath — for SPLIT↔PIP scheduling
  • pip_events — derived from accent_words timing within scene

Writes scenes.json. Also auto-copies these self-contained assets from skill-bundled assets/ into the workspace:

AssetSourceDestinationPurpose
6 SFX filesassets/sfx/<workspace>/sfx/Beat sounds (camera-flash, whoosh, búng-tay, Laser, ting, Discord-notification)
Brand logosassets/logos/{chatgpt,gemini,claude,claude-code}.{png,jpg}<workspace>/assets/logos/Auto-attached to compositions (chats-stack avatars, hero-orb, tier-row tool-badge)
Avatarassets/avatar.jpg<workspace>/assets/avatar.jpgChannel thumbnail for yt-lower-third subscribe banner
YT lower-thirdassets/compositions/yt-lower-third.html<workspace>/compositions/yt-lower-third.htmlSubscribe banner mount, last 3s of video

If a source asset is missing in the skill bundle, falls back to legacy workspace path (workspace/assets/...) silently. If neither is found, that asset is skipped (compositions degrade gracefully — text avatars instead of logos, no lower-third).

Step 5: 🔥 LLM SUB-AGENT FANOUT (composition authoring) 🔥

generate_compositions.py is DEPRECATED. Do not call it. The Python Jinja2 generator collapses every scene into 1 of 5 fixed archetypes (hook → tier-row, problem → chats-stack, solution → hero-orb, recap → counter-row, cta → terminal-row), can't adapt to scene-specific metaphor (e.g., "scroll-tape-wasted", "two-clock-comparison", "right-tool-vehicles"), and breaks on listicle 6+ scenes (multiple tip-N collapse to same filename → overwrite).

Canonical method: orchestrator (or user) spawns N parallel general-purpose Agents (1 per scene) in a single message so they run concurrent. Each sub-agent:

  1. Reads its scene block from visual-plan.json (path: <workspace>/visual-plan.json, scene index num-1)
  2. Reads references from the orchestrator skill: references/composition-patterns.md (8 production-shipped patterns), references/slide-design-tokens.md (palette + typography)
  3. Picks the right pattern for its scene's metaphor — adapts freely (hero-orb can become vault+spokes, stats-3card can become two-clock-comparison)
  4. Authors compositions/scene-{num}.html from scratch with: 1200×1080 viewport, scoped CSS via [data-composition-id="scene-{num}"], GSAP timeline registered to window.__timelines["scene-{num}"], no !important, no embedded image-slot (cream-paper image lives at root layer only)

The result: each scene gets a unique, metaphor-fit composition file. No collisions, no boring 5-archetype lock-in.

See orchestrator's mkt-full-video-with-11-hyperframe-heygen-16-9/SKILL.md Step 4d for the full sub-agent prompt template.

Brand logos in compositions (sub-agents reference these)

Sub-agents embed brand logos when their pattern needs them. Logos live at <workspace>/assets/logos/:

Pattern usageBrand element
Hook tier-row "after"tool-badge pill (top-right) — Claude logo + name.
Problem chats-stack fail rowsChatGPT/Gemini logos auto-attached when name matches keyword (chatgpt/gpt → chatgpt.png; gemini/google → gemini.jpg).
Solution hero-orb / vaultBrand logo inside the orb glow (default Claude).
CTA terminal-rowNo logos by default.

Sub-agents fall back to text-avatar if assets/logos/ doesn't exist (no flicker).

Pattern reference (8 archetypes, sub-agents pick + adapt)

The orchestrator's references/composition-patterns.md ships 8 production-tested patterns:

PatternBest forInternal motif
tier-row before-afterHook contrast2 tier rows (before rose/red + after lime/green) with letter + items
chats-stackProblem / fail / Edit-Regen demoUser row + 2-3 AI fail rows + broken-chain stamp
hero-orb + spec-trioSolution / mechanism / vault centralGlowing orb + task icons + 3 spec tier rows
counter-rowRecap / number proofBig counter (FROM → TO) + clients + delta tag
comment-terminalCTA / "comment X"Tier-letter + macOS terminal mock + 2 gift cards
stats-3cardKnowledge intro / 3-fact reveal3 columns landing-style with // LBL + grad number
comparison-2col"When to use which"2-column Yes/Yes chips
image-slot(DEPRECATED — image at root layer)—

Sub-agents adapt freely: e.g., hero-orb → "vault + 5 chat spokes", stats-3card → "two-clock-comparison", comparison-2col → "3-tier vehicle cards". The pattern doc gives the skeleton (HTML + CSS + GSAP), the LLM does the creative tailoring.

Step 6: generate_root_index.py

Reads scenes.json + total_duration from transcript → renders assets/templates/index.html.j2:

  • 1920×1080 root with #slide-bg, #heygen-bg, #avatar-frame > .avatar-breathing > .avatar-punch > #v-source
  • <audio id="a-source"> tracks original source.mp4 audio (track 1)
  • 6 <audio> SFX wired with absolute data-start (scene boundaries)
  • Brand mark top-left
  • GSAP block:
    • Initial entrance (avatar fade-in, brand fade-in)
    • SPLIT/PIP constants + goPIP(t) / goSplit(t) helpers
    • PIP_EVENTS array driven by per-scene pip_events from scenes.json
    • "Hybrid Hook" visual zoom strategy on .avatar-breathing:
      • HOOK scene: slow ramp 1.0 → 1.10 over scene duration (drama build, power2.in)
      • HOOK→BODY transition: snap reset 1.10 → 1.0 (release tension, 0.5s power3.in)
      • BODY scenes (2..N-1) at PIP-IN events: 1.06 punch beats (rhythm, power2.out → power3.out)
      • CTA scene: gentle 1.0 → 1.04 push (close, sine.inOut)
    • Per-scene-start small punch (1.06) on .avatar-punch for transition beats
  • <div class="clip slide-mount"> × N mounts wired with data-composition-src + data-start + data-duration + data-track-index
  • Cream-paper b-roll PIP-swap layer: 1 <img class="broll-image" id="broll-N"> per scene, full stage 1920×1080, object-fit: contain with cream #F0EEE6 letterbox (blends into image bg). Fades in during PIP windows of its scene, fades out otherwise. When N.png doesn't exist on disk yet, browser shows broken image at opacity 0 — no flicker.
  • YT subscribe lower-third (optional, default ON): if compositions/yt-lower-third.html exists, mounts at last 3s with z-index 60 (pointer-events:none). Disable with --no-yt-lower-third. Custom duration via --yt-lower-third-duration <sec>.

Step 7: scaffold_infographic_slots.py (DEPRECATED)

This script injected <img class="infographic-slot"> inside each composition's HTML — that's wrong. The cream-paper image should live at the root layer (full stage 1920×1080) and fade in/out during PIP windows, not be embedded inside the 1200×1080 composition (which would shrink the 16:9 image into a small box).

The root broll layer is now auto-baked by generate_root_index.py (Step 6) — it writes 1 <img class="broll-image" id="broll-N"> per scene at z-index 25 between slide-mount and avatar-frame, with GSAP fade in/out keyed off PIP_EVENTS.

Cream-paper prompts (prompts.md) are written by the planner skill (mkt-plan-short-video-edit-16-9/scripts/render_infographic_prompts.py) — not by this editor skill. User generates 1.png-N.png via AI33/Nano Banana Pro afterward; root broll layer picks them up automatically when files appear on disk.

If you have a project that previously ran scaffold_infographic_slots.py, those embedded infographic-slot divs in compositions/ should be removed (they bóp 16:9 cream-paper images into small boxes). Spawn an LLM sub-agent per composition to clean them up and recompose the freed space.

Step 8: lint_and_preview.py

cd <workspace>
npx hyperframes lint
npx hyperframes preview &       # background

Lint posture:

  • Errors: 0 acceptable.
  • Warnings: composition_self_attribute_selector is cosmetic and acceptable (templates use scoped [data-composition-id="..."] selectors).
  • Errors that must be fixed:
    • gsap_animates_clip_element — chỉ animate opacity trên clip elements
    • root_composition_missing_data_start — sub-comps phải có data-start="0" trên inner [data-composition-id] div
    • media_missing_data_start — <audio> SFX phải có absolute data-start

Print Studio URL (typically http://localhost:3002) and exit. Don't block.


Integration with mkt-plan-short-video-edit-16-9 (visual planner)

When visual-plan.json exists in the workspace, scaffold_project.py reads it and skips the manual scenes.json fill step. The planner already decided variant / tier_letter / items / badges / broll metaphors / pip_events. Editor just translates plan → scenes.json (via the planner's apply_plan_to_scenes.py shim).

visual-plan.json  ──►  apply_plan_to_scenes.py  ──►  scenes.json (editor format)  ──►  🔥 LLM SUB-AGENT FANOUT 🔥  ──►  compositions/scene-{1..N}.html
                                                                                  ──►  generate_root_index.py  ──►  index.html

When visual-plan.json does NOT exist, fall back to current behavior: heuristic detect_scenes.py + LLM-fills-content checkpoint. The planner is the recommended entry point (orchestrator Phase 3b) — this fallback exists for standalone editor invocation.

The planner skill ships its own references/visual-thinking-library.md with 25 metaphor entries — when the planner is involved, ignore the editor's older "manually fill content" guidance below (it's superseded).

Key architectural decisions (link to references/)

  • references/pip-event-scheduling.md — When/why to fire goPIP(t) and goSplit(t). Default rule: each scene fires 1 PIP event around its first tier-letter glow scale-in (~scene_start + 1.0–1.5s in scene's local time + offset to absolute) and exits 2.5–4s later. Multiple letters = stagger 2-3s each.

  • references/pattern-selection.md — Decision tree: archetype (Hook/Problem/Solution/Recap/CTA) → recommended variant. Includes when to override default mapping.

  • references/source-mp4-cropping.md — HeyGen renders 9:16 portrait by default. CSS-only fallback (object-fit: cover; object-position: center 25%) works in 540×880 SPLIT and 320×420 PIP, but for tightest framing user should regenerate HeyGen with portrait-tighter-crop or true landscape avatar. Document tradeoffs.


Differences from sibling 9:16 editor

Concern9:16 (mkt-hyperframe-talking-head-video)16:9 (this skill)
Canvas1080×1920 (vertical)1920×1080 (landscape)
LayoutFace full-screen with overlay scenes; b-roll fills frameSlide pane (1200px) left + avatar frame (540×880) right
AvatarAlways full-frame; "split-screen" splits face top/bottomFloating frame; PIP corner during emphasis
CaptionsRequired — caption track is the spineSkipped — avatar voice is the spine
PIP transitionsNone (face dominates)SPLIT↔PIP at every emphasis beat
Breathing zoomNoneYes — .avatar-breathing yoyo
Punch-inNoneYes — .avatar-punch at each scene start
Compositions7 abstract mockup variants (post-stack/ai-window/etc.)5 tier-row patterns (hook/problem/solution/recap/CTA)
Infographic styleGlassmorphic dark + neonCream-paper editorial (#F0EEE6 + slate ink + hand-drawn)
SFX wiring6 SFX same mapping6 SFX same mapping (identical files)
Lint warnings allowedcomposition_self_attribute_selectorSame

Common pitfalls

  1. !important on slide-mount internal width breaks PIP — DO NOT use width: 1200px !important inside slide-mount. Use plain width: 1200px. GSAP must be able to animate it to 1920px during goPIP().

  2. Composition root selector — use width: 100%; height: 100% (NOT fixed pixels) on [data-composition-id="<id>"] so it fills the mount when mount expands during PIP.

  3. Avatar zoom layer separation — DO NOT scale #avatar-frame directly for breathing/punch. Use 2 nested wrappers (.avatar-breathing + .avatar-punch) inside the frame. Otherwise breathing tween fights with PIP top/left/width tween.

  4. PIP timing collision with scene transitions — goSplit(t_out) should fire before the next scene's first PIP event. If they overlap, last goSplit/goPIP call wins (overwrite: 'auto' is set).

  5. Source MP4 audio track — HeyGen MP4 already contains the lip-synced TTS audio. Use <audio data-start="0" src="source.mp4"> (NOT voiceover.mp3) so audio matches lip movement. Use voiceover.mp3 only if you're doing custom audio post-processing.

  6. No audio for voiceover.mp3 separately — duplicating audio = double-volume garbage. Source.mp4 is canonical. voiceover.mp3 is kept in workspace for record-keeping only.

  7. Caption mount missing — DO NOT add compositions/captions.html. This is a deliberate skip. Documented above.

  8. Infographic slot onerror fallback — placeholders must use onerror="this.style.display='none'" so missing PNGs don't show broken-image icons. User generates infographics later with mkt-broll-image.

  9. Lint composition_self_attribute_selector — these are info-only warnings about scoped [data-composition-id="..."] selectors. Templates intentionally use them. DO NOT refactor to remove.

  10. SFX volume at avatar voice level — keep 0.18-0.32 range. Above 0.4, SFX drown the avatar.


How orchestrator delegates to this skill

mkt-full-video-with-11-hyperframe-heygen-16-9 Phase 3 invocation:

# Orchestrator has finished Phase 1 (TTS) + Phase 2 (HeyGen avatar). Workspace
# contains voiceover.mp3 + source.mp4 + script.txt. Now call this editor:

cd <workspace_folder>
python3 ~/.claude/skills/mkt-hyperframe-talking-head-video-16-9/scripts/transcribe_audio.py --workspace .
python3 ~/.claude/skills/mkt-hyperframe-talking-head-video-16-9/scripts/clean_transcript.py transcript.json

# Phase 3b: planner skill writes visual-plan.json + prompts.md
python3 ~/.claude/skills/mkt-plan-short-video-edit-16-9/scripts/plan_visuals.py --workspace . --brand claude
python3 ~/.claude/skills/mkt-plan-short-video-edit-16-9/scripts/render_infographic_prompts.py --workspace .
# CHECKPOINT — orchestrator presents visual-plan summary; user edits per-scene metaphor/tier-letter; LLM customizes visual-plan.json.
python3 ~/.claude/skills/mkt-plan-short-video-edit-16-9/scripts/apply_plan_to_scenes.py --workspace .

# Phase 3c: scaffold (sfx + logos + avatar.jpg + yt-lower-third.html)
python3 ~/.claude/skills/mkt-hyperframe-talking-head-video-16-9/scripts/scaffold_project.py --workspace .

# Phase 3d: 🔥 LLM SUB-AGENT FANOUT 🔥
# Orchestrator (or user) spawns N parallel general-purpose Agents in 1 message —
# 1 per scene — each authoring compositions/scene-{num}.html from visual-plan.json.
# DO NOT call generate_compositions.py (deprecated).

# Phase 3e: root index.html (mounts scene-N.html + broll layer + PIP + SFX + brand)
python3 ~/.claude/skills/mkt-hyperframe-talking-head-video-16-9/scripts/generate_root_index.py --workspace .

# Phase 3f: lint + preview
python3 ~/.claude/skills/mkt-hyperframe-talking-head-video-16-9/scripts/lint_and_preview.py --workspace .

Or, equivalently, the orchestrator can call this skill via the Skill tool with one shot — this SKILL.md tells it the order.

This skill does NOT know about the orchestrator. Cross-reference is one-way.


Reference: production project this skill must reproduce

Canonical 16:9 project shipped:

/Users/tonyhoang/Documents/GitHub/claudeclaw-os/workspace/content/2026-05-08/loi-ich-claude-ai/

Given that folder's voiceover.mp3 + source.mp4 + script.txt, running the pipeline above must regenerate index.html + compositions/*.html matching the shipped version (give or take cosmetic differences). When implementing scripts, scan that project before reinventing.


Output handoff template

After Step 9, print to user:

## Video preview sẵn sàng (16:9 landscape)

**Studio URL:** http://localhost:3002

**Project structure:**
- Root: `<slug>/index.html` (1920×1080, ~230 dòng)
- Compositions: `<slug>/compositions/` (5 scenes, 1200×1080 each)
- SFX: `<slug>/sfx/` (6 files)
- Infographic slots: <K> wired with onerror fallback

**Đã apply:**
- Slide pane (1200px) trái + floating avatar frame (540×880) phải
- 5 SPLIT↔PIP transitions tại tier-letter glow moments
- Breathing yoyo + punch-in trên avatar
- 5 scene compositions: hook (tier-row) / problem (chats-stack) / solution (hero-orb) / recap (counter-row) / CTA (terminal-row)
- 6 SFX (camera-flash hook, whoosh L1, snap L2, laser L3, ting recap, discord CTA)
- KHÔNG có caption mount — avatar voice là spine

**Refresh Studio để xem.** Nói "render" khi OK, hoặc báo cụ thể chỗ cần chỉnh.

Stop here. Render is orchestrator's call.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Best practices for Remotion - Video creation in React

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Scaffold trang `/admin` CRM-style trực quan vào Next.js project (Supabase backend) — KHÔNG còn variant Vercel KV. Layout 1CRM-inspired: sidebar 3 tab (Tổng quan / Khách hàng / Email marketing) + popup nhập mã đăng nhập. **Tab Tổng quan**: 4 KPI cards (Tổng leads / Đã thanh toán / Tỷ lệ chuyển đổi / Doanh thu) có delta arrow vs kỳ trước, line chart leads+paid+revenue theo ngày dùng `recharts`, donut trạng thái paid/pending/expired, period selector pill 7d/30d/90d, list 5 thanh toán gần nhất. **Tab Khách hàng**: bảng leads + search + filter trạng thái + filter ngày + CSV export. **Tab Email marketing**: form soạn chiến dịch (tên + tiêu đề + body chọn định dạng **văn bản thường HOẶC HTML** + placeholder `{{name}}` + audience 4 loại all/paid/pending/last_days + tên người gửi) — có nút **Xem trước** mở modal iframe render đúng email thật (text → auto convert + wrap khung; HTML fragment → wrap khung, HTML đầy đủ giữ nguyên) → gửi bulk qua SMTP (reuse `nodemailer` của `biz-email-setup` — KHÔN

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Deploy landing page / website (React, Next.js, Vite, static HTML) lên Vercel — tự kiểm tra Vercel CLI hoặc Vercel MCP đã cài chưa, nếu chưa thì cài qua npm/pnpm và hướng dẫn user authenticate (vercel login), tự detect framework (Next.js / Vite / CRA / static), auto-generate vercel.json khi cần, chạy `vercel --prod`, trả về live URL + inspect URL + hướng dẫn custom domain. USE WHEN user says 'deploy lên vercel', 'đẩy landing page lên vercel', 'publish website', 'go live', 'deploy nextjs', 'deploy react', 'deploy vite', 'tạo URL live', 'đưa lên production', 'biz-deploy-vercel', 'host landing page', 'vercel deploy', 'ship lên vercel', 'đẩy code lên vercel'. Skill này áp dụng cho cả case dùng Vercel CLI lẫn Vercel MCP server.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Setup SMTP-based email auto-responder cho landing page bán hàng — tự động gửi email sau khi user điền form (tên/SĐT/email), KHÔNG cố định vào provider nào. Skill này (1) hỏi user chọn SMTP provider (Gmail/Google Workspace, Resend SMTP, SendGrid, Mailgun, Brevo, Zoho, hoặc SMTP custom của hosting VN) và detect Next.js stack đang dùng, (2) đọc context từ `offer.json` + `conversion-copy.md` (từ `/biz-offer-alex-hormozi`) HOẶC đọc trực tiếp Next.js project đã build qua `ui-ux-pro-max` (file `app/page.tsx`) HOẶC đọc HTML landing page đã deploy để hiểu offer, dream outcome, mechanism, bonus. Lưu ý: skill `biz-sales-page-layout` đã DEPRECATED 2026-05-14 — pipeline mới skip layout/copy.json, (3) **draft 2 email**: email A — auto-responder gửi cho lead (warm welcome + deliver lead magnet/booking confirm/payment link tuỳ offer type), email B — notification gửi cho owner (lead alert + thông tin liên hệ), (4) **show draft cho user duyệt và chỉnh sửa** trước khi wire vào code, (5) cài `nodemailer`

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Cài chatbot AI dạng floating widget góc dưới phải vào project Next.js có sẵn (App Router hoặc Pages Router), responsive đầy đủ web + tablet + mobile, gọi LLM qua OpenRouter (mặc định google/gemini-3-flash-preview, có thể đổi sang anthropic/claude-sonnet-4.6), streaming response, RENDER MARKDOWN trong assistant bubble (bold / list / link / code) qua react-markdown + remark-gfm — KHÔNG hiện raw **bold** dạng text — có knowledge base từ FAQ + tài liệu sản phẩm/khóa học do user cung cấp để chatbot tự động trả lời khách hàng, và TỰ ĐỘNG EXTRACT + LƯU LEAD (tên + SĐT + email) vào Upstash Redis/Vercel KV dưới namespace `chat-lead:{phone}` khi user cung cấp đầy đủ thông tin trong chat — dedupe theo SĐT, TTL 90 ngày, fire-and-forget không block stream. Skill tự detect số lượng project Next.js — nếu có nhiều hơn 1 sẽ hỏi user chọn project nào để cài; tự detect TypeScript/JS, App Router/Pages Router, Tailwind/CSS module, KV/Upstash availability (skip auto-save nếu chưa có); tự install react-markd

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Đóng gói offer **không thể chối từ** (grand slam offer) theo phương pháp Alex Hormozi ($100M Offers) — nhận input pains/gains/customer jobs theo Value Proposition Design (Osterwalder 2014) + sản phẩm/dịch vụ, rồi sinh ra: (1) markdown report tiếng Việt đầy đủ Value Equation scoring + Core Offer + 3-4 Bonus stack + Guarantee + Urgency + Pricing, (2) offer.json structured cho pipeline downstream (`ui-ux-pro-max` build sales page production-ready), (3) conversion copy block (headline + subheadline + CTA) sẵn sàng paste landing page. 2 input mode: (B) user paste sẵn pains + gains + product, (C) user chỉ có sản phẩm — skill phỏng vấn theo VPD framework để surface pain/gain trước. Bonus stack mode hybrid: skill brainstorm 5-7 candidate có justification value rồi user pick/chỉnh 3-4 cái. Tiếng Việt thuần (xưng anh/chị), giá VND charm pricing (X99K), 3-tier decoy structure. USE WHEN user says 'đóng gói offer', 'tạo offer', 'thiết kế offer Hormozi', 'grand slam offer', 'value stack', 'offer sta

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Nâng cấp copy sales page tiếng Việt — biến copy có sẵn (từ `offer.json` + `conversion-copy.md` của `/biz-offer-alex-hormozi`, HOẶC từ Next.js project đã build qua `ui-ux-pro-max`, HOẶC user paste block copy bất kỳ) thành **copy chất lượng cao chốt đơn**: headline punchy hơn, pain agitation đau hơn, mechanism rõ hơn, benefit cụ thể hơn, FAQ xử lý đúng objection của thị trường VN, CTA mạnh hơn. Skill này có 3 INTENSITY LEVEL: (1) **Polish** — light edit + power word + sửa nhịp; (2) **Conversion-optimized** — rewrite 5 block critical + tạo A/B variants cho hero/CTA; (3) **Sales-letter** — long-form story-driven full rewrite kèm P.S.. Mỗi section áp dụng đúng formula thuyết phục (PAR cho pain, BAB cho solution, FEP cho benefit, PVEN cho final CTA, Star-Chain-Hook cho testimonial). Output gồm 4 file: `copy-upgraded.md`, `copy-variants.md` (A/B test bank — 3 hero + 3 CTA + 3 final-CTA), `copy-changes.md` (diff Trước/Sau + lý do), `copy.json` (structured downstream). Giọng văn tiếng Việt thuầ

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

⚠️ DEPRECATED (2026-05-14) — Skill này KHÔNG còn trong pipeline chuẩn. Quy trình mới đã bỏ bước wireframe markdown trung gian: sau `/biz-offer-alex-hormozi` đi THẲNG sang `ui-ux-pro-max` để build Next.js sales page production-ready (có design language nhất quán: style + palette + font pairing, không phải Tailwind defaults). Lý do deprecate: wireframe markdown làm thêm 1 bước trung gian không tạo giá trị — `ui-ux-pro-max` đọc trực tiếp `offer.json` đã đầy đủ anchor + core + bonus + guarantee + urgency + pricing rồi ra HTML production luôn. Chỉ dùng skill này KHI user EXPLICITLY yêu cầu wireframe markdown để review/in/share trước khi build code (rare case). KHÔNG trigger trên các keyword 'tạo sales page', 'tạo landing page bán hàng' nữa — những keyword đó giờ trigger `ui-ux-pro-max`.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

End-to-end Sepay VietQR payment infrastructure cho landing page Next.js — guide user setup Sepay account + bank linking + scaffold đầy đủ payment flow trong project. Skill này xử lý 7 phase: (0) detect Next.js stack + **HỎI user chọn lead store backend** (Vercel KV hoặc Supabase Free Postgres — default recommend Supabase do free tier rộng hơn ~50× + có SQL + admin UI), (1) GUIDE user đăng ký Sepay account tại my.sepay.vn + link bank account VN (Vietcombank/Techcombank/MB/ACB/VPBank/BIDV/...) + lấy API key + setup webhook URL trên Sepay dashboard, (2A nếu chọn KV) setup Vercel KV (install `@vercel/kv` + KV namespace + 4 env vars KV_*), (2B nếu chọn Supabase) setup Supabase project (tạo project tại Singapore region + chạy migration SQL tạo 4 bảng leads/phone_index/order_counter/webhook_dedup với pg_cron TTL cleanup + RLS deny-all + lấy SUPABASE_URL + SUPABASE_SERVICE_ROLE_KEY + Vercel Cron ping `/api/health` mỗi 6 ngày chống auto-pause), (3) scaffold `lib/leads-store.ts` (thin re-export

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Setup Telegram bot notification cho thanh toán thành công từ Sepay webhook trong Next.js project. Skill này: (1) hướng dẫn user 3 bước tạo Telegram bot riêng qua @BotFather + lấy bot token + chat_id (qua @userinfobot cho chat 1-1, hoặc /getUpdates API cho group), (2) tạo helper function `sendTelegramNotification()` reusable trong `lib/telegram.ts`, (3) detect existing Sepay webhook route trong project (thường là `/api/sepay-webhook`, `/api/payment-success`, hoặc tương đương) và wire Telegram call CÙNG CHỖ với email auto-responder (Resend) — gửi parallel qua `Promise.allSettled` để Telegram fail KHÔNG block 200 response trả Sepay (Sepay sẽ retry webhook nếu nhận non-200, gây duplicate notification), (4) draft message format mặc định tiếng Việt: emoji + tên khách + SĐT + email + amount (charm pricing VND định dạng `499.000đ`) + tên sản phẩm + timestamp giờ VN dd/mm/yyyy HH:mm, (5) update `.env.local` với `TELEGRAM_BOT_TOKEN` + `TELEGRAM_CHAT_ID`, add vào `.gitignore`, nhắc user paste vào

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Convert a single MP3 voiceover file into a single HeyGen avatar lip-sync MP4 video. Single-purpose — no planning, no SRT, no chunking, no Remotion compositing. Hybrid path — REST upload (helper script) + HeyGen MCP for video creation, because the post-2026 MCP no longer exposes an asset-upload tool. Reads avatar look pool (`HEYGEN_AVATAR_LOOKS`) from `.env` and HeyGen API key (`HEYGEN_API_KEY`) for the upload step. USE WHEN user says "tạo video heygen từ mp3", "mp3 to heygen", "heygen mp4 từ audio", "convert mp3 sang heygen video", "tạo avatar video từ file mp3", "lip sync mp3 heygen", "biến mp3 thành video heygen", or any time the user has exactly one MP3 file and wants exactly one HeyGen avatar MP4 out.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Demand-side market research cho digital product / service ở Việt Nam — đo cầu thật + WTP + channel-market fit + defensibility qua keyword volume, marketplace sales (Shopee/Unica/Edumall/Gitiho/KyNa), community signal (FB groups, TikTok hashtag, Zalo OA), competitor pricing, unit economics — không phải macro PESTEL. Output: keyword portfolio + Niche Score 100 điểm 7-dimension có evidence + go/no-go decision + falsification protocol. Force triangulate ≥3 sources cho mỗi claim quan trọng. USE WHEN user says 'nghiên cứu thị trường', 'market research', 'validate niche', 'keyword research', 'demand validation', 'niche có nên làm không', 'có ai làm chưa', 'thị trường đủ lớn không', 'có lời không', 'chọn ngách', 'kiểm tra cầu'. Cũng trigger khi user mô tả 1 ý tưởng kinh doanh cụ thể và muốn check feasibility. Skill này KHÔNG fit: high-ticket transactional sale (BĐS, ô tô), B2B enterprise (sales cycle 6+ tháng), hyper-local geo micro-market (1 toà nhà, 1 phường). KHÔNG làm: macro PESTEL/Porter

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Transcribe an MP3 voiceover into an SRT subtitle file and a word-level segments JSON using local OpenAI Whisper. Input is a single MP3 path; output is `<stem>.srt` + `<stem>_segments.json` written next to the MP3 (or to a custom output dir). USE WHEN the user says 'extract srt from mp3', 'trích srt từ mp3', 'transcribe voiceover', 'tạo file srt và segments', 'whisper transcribe', 'bóc transcript có timestamp', 'extract voiceover segments', 'tách SRT từ audio', or any time a downstream skill (plan-short-video-edit, heygen-remotion-short-video-editor) needs an SRT + word-level segments JSON from a voiceover MP3 and one does not already exist.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Convert Vietnamese/English script text to MP3 voiceover using ElevenLabs TTS API. Calls POST /v1/text-to-speech/{voice_id}, streams audio bytes, writes MP3 directly. Locked to Hoang's brand voice ID by default. USE WHEN user says 'tạo mp3 elevenlabs', 'elevenlabs tts', 'eleven labs voice', 'text to speech elevenlabs', 'tạo voiceover elevenlabs', 'đọc text bằng elevenlabs', 'tts elevenlabs to mp3', 'eleven labs script to mp3', 'voiceover bằng elevenlabs', 'giọng elevenlabs'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

End-to-end LANDSCAPE 16:9 (1920×1080) talking-head + slide knowledge video pipeline. Orchestrator 3 phase ghép `mkt-elevenlabs-tts-to-mp3` + `heygen-mp3-to-mp4` + HyperFrames để ra MP4 dạng "podcast keynote" — HeyGen avatar trong floating frame bo tròn bên phải (claude-orange border), slide modern AI / Claude editorial bên trái, có PIP zoom-out moments (slide full-screen, avatar shrink xuống corner thumbnail), breathing zoom + beat-driven punch-in trên avatar, optional cream-paper hand-drawn editorial infographic ở root layer (KHÔNG embed trong composition). Phase 3 fan-out N parallel LLM sub-agents (1 per scene) để author composition HTML từ visual-plan.json — không dùng Python template generator. Hỗ trợ listicle 6+ scenes (tip-1..tip-N) với scene-{num}.html naming. Resume mode: nếu MP3 + source.mp4 đã tồn tại thì skip Phase 1 + 2, vào thẳng Phase 3. USE WHEN user nói "tạo video 16:9", "video ngang", "video landscape", "podcast keynote video", "talking head + slide video", "slide + av

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

End-to-end short-video pipeline — từ kịch bản (Việt/Anh) ra MP4 TikTok/Reels 9:16 hoàn chỉnh. Orchestrator 3 phase ghép skill có sẵn — (1) TTS provider chọn được giữa `mkt-elevenlabs-tts-to-mp3` (default, voice của Hoàng) hoặc `mkt-video-script-to-mp3` (MiniMax speech-2.8-hd), (2) checkpoint user duyệt MP3, (3) `heygen-mp3-to-mp4` lip-sync avatar HeyGen, (4) delegate Phase 3 packaging cho sub-agent `mkt-full-video-phase3-packager` (transcribe + scene outline + checkpoint + fan-out N scene writers parallel + scaffold + preview Studio). API key + voice ID cho cả 2 provider lưu ở `.env`. USE WHEN user nói "tạo full video từ script", "script to tiktok video", "pipeline full video heygen + hyperframe", "tạo video từ kịch bản đến mp4", "elevenlabs heygen hyperframe full pipeline", "minimax heygen pipeline", "kịch bản ra video tiktok", hoặc có sẵn 1 script + (optional) ảnh b-roll và muốn ra MP4 9:16 đóng gói có captions, SFX, b-roll.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Build a TikTok/Reels 9:16 short video from a pre-recorded talking-head MP4 using HyperFrames — transcribe Vietnamese audio, auto-clean Whisper errors, generate synced caption groups, scaffold a complete preview-ready project with face-cam + 6 sound effects + 4 zoom hooks + ambient ken-burns drifts + full-screen b-roll scenes (each with rich GSAP effects: pulse rings, corner marks, word-slam titles, count-up numbers, light sweeps, scribble underlines, sparkles, particles) + caption track + CTA finale, then open the HyperFrames preview Studio for user review (NEVER auto-render MP4). USE WHEN user says "tạo video tiktok từ footage", "build hyperframe talking head", "tạo 9:16 video từ mp4 quay sẵn", "make tiktok video from face footage", "hyperframe video từ video quay", "tạo short video có caption + b-roll", "video chia sẻ kiến thức từ footage", "đóng gói video ngắn", or provides a 9:16 talking-head MP4 (with optional b-roll images/videos and stated purposes) asking to turn it into a fini

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Audit bài Facebook / Reels / YouTube để phát hiện 4 downward drivers (over-branding, over-production, stock imagery, standardized aesthetic) + frequency-over-quality. Mỗi anti-pattern bị drop ~75% performance nếu hiện diện. USE WHEN user says 'audit content', 'check anti pattern', 'content có lỗi gì không', 'kiểm tra over branding', 'vì sao video bị chết', 'vì sao post không ai xem', 'content audit', 'kiểm tra chất lượng content'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Tìm viral pattern ở ngành khác (bác sĩ, luật sư, tài chính, bất động sản, thủ công) có thể apply cho niche AI/automation của Hoang. Ngách AI educator VN còn ít format được khai thác — cross-industry adaptation là blue ocean. USE WHEN user says 'tìm format ngành khác', 'cross industry research', 'học format từ ngành khác', 'blue ocean format', 'tìm format chưa ai làm', 'adapt format từ niche khác', 'cross industry viral'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Rewrite CTA kiểu autocratic (Mua ngay! Follow ngay! Đăng ký liền!) sang 3 variants Democratic / Benevolent / Laissez-faire — reach 85% dân số thay vì chỉ 5% (action-based). Áp dụng cho landing page, caption FB, CTA video, email. USE WHEN user says 'rewrite cta', 'sửa cta', 'cta không autocratic', 'viết lại kêu gọi hành động', 'cta cho landing page', 'cta nhẹ nhàng hơn', 'inclusive cta', 'cta democratic benevolent'.

Related Skills