agentleFS
gug007gug007/lpm/.claude/skills/lesson-publish/SKILL.md

lesson-publish

Skill150 starsChanged 4 days agoMITView on GitHub

Publish a finished lesson MP4 from ~/Movies/lpm-lessons/<slug>/ to the lpm YouTube channel through Chrome (YouTube Studio): search-optimized title and description with chapters, tags, category, the title-card thumbnail, Public, then added to the lesson playlist. Use when the user asks to upload, publish or post a lesson video to YouTube. Vertical videos from ~/Movies/lpm-lessons/tiktok/ go to YouTube Shorts through short-publish instead.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    never press Escape inside the upload dialog: it closes the dialog.

    line 21

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Upload a lesson video to YouTube and publish it.

  • run node scripts/prepare.js <slug or lesson folder> <scratchpad-dir> first. It refuses a lesson whose checks failed or are older than the MP4 (qa/report.json, written by lesson's make.js); show the user the FAIL lines, and only with their go-ahead pass --accept "<their reason>". It copies the MP4 into the scratchpad under the video title (the file name becomes the initial title in Studio; it warns when that dropped a ":" to retype), the thumbnail (the opening card, rendered by make.js), the captions (<slug>.srt), and writes <slug>-description.txt and <slug>-tags.txt, and prints the chapters. Chrome's file_upload only accepts files inside the scratchpad and under 10,000,000 bytes; when the master is larger, prepare.js writes a 1080p HEVC two-pass copy that fits instead (H.264 at that bitrate smears terminal text). YouTube gets the smaller copy; the master stays in the lesson folder.
  • the description and tags come from lesson.json "youtube": { "hook": [two lines], "learn": [...], "sections": [...], "tags": [...], "hashtags": [...] }: write that block first when the lesson has none (prepare.js says so), then run prepare.js again, so a replacement upload reuses the same words.
  • captions: in the Details step's "Subtitles" (or later under Subtitles in Studio), Add language → English → Add subtitles → Upload file → With timing → the .srt from the scratchpad → Publish. They carry the script's own words (lpm, Claude Code, Codex), which YouTube's auto-captions get wrong. In the current dialog Subtitles sits under Video elements and its Add stays greyed until Details → Show more → Video language is set (English); after "With timing", do not press Continue (it opens the macOS file picker): file_upload the .srt into the #captions-file-loader input, then Done.
  • thumbnail: the lesson's own thumbnail.jpg, never YouTube's auto-pick: with a cover in lesson.json it is that cover (words beside a crop of the take on the card canvas, approved 2026-09-30), otherwise the opening title card; prepare.js copies it and it is uploaded in the Thumbnail step. A new channel gets a few custom thumbnails a day; past that the upload answers "Build your channel history" and nothing is set: leave the video a private draft (untick the playlist so no private row shows) and publish the next day with the thumbnail, unless the user says otherwise.
  • title: the lesson title from lesson.json, nothing appended (no "(Mac Tutorial)"), brand is lowercase lpm, 100 characters max.
  • description: prepare.js assembles it in this order: a two-line keyword hook (what the video shows, for whom), one line on what lpm is (starts, stops, duplicates and switches between local dev projects on a Mac, with a built-in terminal for AI coding agents such as Claude Code and Codex), the link https://lpm.cx (never the demo link lpm.cx/demo, user rule 2026-09-19), "What you'll learn" bullets, any sections ([{ "heading", "lines" }]: what a viewer needs first, what to do when a step doesn't match), "Chapters" (first at 0:00, at least three, each 10 s or longer: topic cards and "chapter" narration lines in lesson.json), one series line, 5–6 hashtags (#lpm #macOS #devtools …). No @ anywhere (it opens a mention popup) and no next-lesson teaser.
  • tags: 15–20 comma-separated (lpm, lpm.cx, the lesson's own verbs and nouns, Claude Code, Codex, mac dev tools, tutorial), under 500 characters. Category Science & Technology. Audience "No, it's not made for kids". Visibility Public. Playlist: the one in YOUTUBE_PLAYLIST.md (repo root: heading = playlist title, then its URL, then the lesson titles in series order).
  • browser (Claude in Chrome MCP on the user's logged-in Chrome; channel "LPM"): navigate https://studio.youtube.com/channel/UCIxcL1wPIlFT-4cahfHZJig/videos/upload?d=ud (LPM's own Studio; youtube.com/upload can open the personal channel instead) and check the sidebar reads "Your channel · LPM" → find the file input → file_upload the MP4 → wait ~5 s → find the title and description textboxes, click + type → Thumbnail "Upload file" input → file_upload the JPEG → Audience radio → "Show more" → Tags textbox (type a comma after every tag) → Category: open the menu, take a full-scale screenshot, click the option by coordinate and zoom to verify (a click by find ref lands on the hovered row) → Playlists box (coordinate click) → tick the playlist → Done → Next ×3 → Public radio → Publish → copy the link from the "Video published" dialog.
  • replacing a published lesson: YouTube cannot swap the file on an existing video, so upload the new cut as a new video (same title, description recipe and thumbnail), then set the old one to Private on studio.youtube.com/video/<id>/edit (Visibility box → Private → Done → Save; the Save button stays active until the change is saved). Deleting the old video is the user's call.
  • never press Escape inside the upload dialog: it closes the dialog. The upload is already saved as a private draft; reopen it with "Edit draft" on the row. Later edits go through studio.youtube.com/video/<id>/edit, then Save.
  • playlist, after Publish: the video must end up in the playlist from YOUTUBE_PLAYLIST.md, at the position its title has in that list. Preferred path is inside the upload dialog's Details step: the Playlists box ("Select") sits under the description; open it with a coordinate click (a ref click after scroll_to did not open it), tick the playlist, Done. If it was skipped, use studio.youtube.com/video/<id>/edit → Playlists → tick → Done → Save. The playlist is manually sorted and a new video is appended last, so uploading in series order needs nothing more; otherwise open https://www.youtube.com/playlist?list=<id> on the logged-in account, and use the row's ⋮ menu (Move to top / Move to bottom) or drag the ≡ handle until the order matches the file. Then run node scripts/register.js <slug> <youtu.be link>: it records the upload in the lesson folder (published.json), puts the link on the lesson's line in YOUTUBE_PLAYLIST.md (appending the line when it is missing; move it to its series position if needed) — that file is the order of record — and prints the entry for website/lib/youtube-lessons.ts; add it there and link it from the page about that feature. It also prints the entry for desktop/frontend/src/lessons.ts: add it at the top of LESSONS, so the app's Send feedback window lists the new lesson. Then run node website/scripts/import-lesson-transcripts.mjs: it copies the captions into website/lib/lesson-transcripts.json for the lesson's page (lpm.cx/lessons/<slug>, which needs the lesson filed in website/app/lessons/_components/lesson-topics.ts and lesson-reading.ts), and lists every lesson whose length or chapters in website/lib/youtube-chapters.ts differ from what was published, so fix those entries from its output. Studio's playlist page (studio.youtube.com/playlist/<id>/videos) lists and removes videos but cannot reorder them.
  • verify before reporting: the row in Channel content shows Public, the thumbnail is the beige title card, the title has no suffix, and the playlist page shows the video in the right position. Report the youtu.be link, the title, the description text and the playlist position. External links stay plain text until the channel completes YouTube's one-time verification (a phone step only the user can do); say so once.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.