Switches every call site to `node scripts/newsletter` and, in the same pass, fixes three structural problems in the skill layer. The seven subcommands were spelled out in five files; they are now enumerated once in docs/newsletter/engine-commands.md, and every other mention is a link except where a skill inlines the one or two commands it actually invokes. The shared post mechanics move out of mt-add-url's directory into docs/newsletter/, so no skill owns another skill's documentation and both runtimes reach it by a repository-relative path. The Codex adapters become symlinks to their canonical counterparts, which removes the parallel frontmatter that could drift. Two skills are renamed for a uniform mt-<verb>-<object> scheme: mt-add-post becomes mt-add-article, since it adds an article to a post, and mt-webfetch becomes mt-fetch-url. The other four already conformed. Note that $mt-add-post and mt-webfetch no longer resolve; no alias directories are left behind, because two names for one skill is the duplication this change removes. Trigger wording in the frontmatter descriptions is left alone apart from the renamed tokens and the corrected fetch-tier summary: those strings are how the runtimes decide whether to invoke a skill. Setup documentation now states the npm ci prerequisite. The engine has dependencies, so unlike its predecessor it does not run on a bare clone.
3.0 KiB
name, description
| name | description |
|---|---|
| mt-add-video | YouTube video handler for the Hugo blog newsletter. Adds a YouTube link to the target newsletter post's Bonus → Videos section as a Vietnamese title link plus a 1-2 sentence Vietnamese summary. Normally invoked by the mt-add-url meta skill after classification, but can be used directly for a known YouTube URL. Handles YouTube links only (not direct video files). |
Overview
mt-add-video is the YouTube handler: given a YouTube link, it adds the video to the target newsletter post's Bonus → Videos (today's post unless the user pinned another one) as a Vietnamese title link with a 1-2 sentence Vietnamese summary. It does not classify or route — that is mt-add-url's job.
Scope: YouTube links only (watch, youtu.be, shorts). Direct video files (.mp4 etc.) are not handled here — they go through mt-add-url's fallback.
Shared scripts: scripts/newsletter/. Shared procedure: docs/newsletter/post-mechanics.md — follow it for post find/create, numbering, Bonus insertion, and language rules.
Input
A clean YouTube URL (passed by mt-add-url, or given directly).
Workflow
-
Classify / fetch title — run the router to get the canonical URL + title:
node scripts/newsletter add-url "<url>"Confirm
route: youtube; skip ifduplicateor notaccessible. Use the returnedclean_url(canonicalwatch?v=ID) andtitle.- If
titleis missing (oEmbed failed), fetch the title via WebFetch on the watch URL.
- If
-
Localize title — render the title in Vietnamese where natural; keep proper nouns (product/company/channel names) as-is.
-
Write a 1-2 sentence Vietnamese summary. Source for the summary content, in order:
- WebFetch the watch URL for the video description.
- If thin/unavailable, optionally use the
ai-multimodal(Gemini) skill to analyze the video — only if available. - Worst case, derive a single sentence from the title. Keep it to 1-2 sentences (KISS).
-
Post mechanics — follow
docs/newsletter/post-mechanics.mdto resolve/create the target post and locate the Bonus section. -
Insert under Bonus → Videos:
**Videos:** [Tiêu đề video tiếng Việt](https://www.youtube.com/watch?v=ID) > Tóm tắt 1-2 câu về nội dung video.- If
### Bonusdoesn't exist yet, create it (there's now an asset to put in it). - If
**Videos:**already exists, append the new entry under it; otherwise create the**Videos:**subsection.
- If
-
Report:
✅ Video added to Newsletter #[number] (Bonus → Videos) 📄 content/post/YYYY/MM/DD/index.md 🎬 [Vietnamese title] — [clean_url] 📊 [tally]The tally comes from
post-stats— see Post tally in the shared post mechanics.
Checklist
route: youtubeconfirmed; not a duplicate- Title in Vietnamese (proper nouns kept)
- 1-2 sentence Vietnamese summary present
- Entry under Bonus → Videos (section/subsection created if missing)
- Vietnamese content ≥99%