/alemtuzlak-skills:youtube-publishfrom alemtuzlak-skills
Uploads and publishes a finished video to YouTube via Grok Bot. Builds the upload package, shows a review page, and hands off to Grok Bot after user confirms with 'publish'.
Ships in alemtuzlak-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Publish one finished video on YouTube with no manual upload. This skill builds the upload package, shows it on a review page, and hands it to Grok Bot after the user says "publish". Grok Bot is an xAI agent with its own cloud computer and browser. It uploads the video in YouTube Studio, applies every setting, publishes the video, and reports in its chat.
In the commands below, <SKILL_DIR> is the folder of this skill (the folder of this SKILL.md), and <OUT> is the output folder.
handoff.mjs without --dry-run only after the user says "publish" for the review page that is open now.review.html. Then wait for a new "publish". An earlier "publish" never covers a changed package.~/.config/youtube-publish/webhook.json) or its values. To test the setup, run the handoff with --dry-run. It shows only the host of the webhook URL.A run with --dry-run is safe at any time. It copies nothing and sends nothing.
All inputs are files in <OUT>. If an input is missing, make it. Go in the order of this table, because each input needs the one above it:
| File | Made by | If it is missing |
|---|---|---|
final.mp4: the finished video | the user, or /produce-video | For another file name, give --video to build (step 1). The video must be an .mp4 file. |
transcript.srt: the captions | transcribe-video | Run transcribe-video on the video with --out <OUT>. Then fix the misheard names and terms in transcript.srt and transcript.txt. Keep every time and every cue number. |
youtube.json: 3 titles, the description, the tags | youtube-copy | Run youtube-copy with <OUT>/transcript.srt. |
thumbnail-1.png to thumbnail-3.png (or .jpg) | youtube-thumbnail | Run youtube-thumbnail with the video and youtube.json. |
When /produce-video calls this skill, the output folder is <OUT>. When the user runs it alone, use the folder that the user names. If the user names no folder, use the folder of the video.
Check that the webhook file exists. This command prints only "found" or "missing", never the content:
node -e "const p=require('path').join(require('os').homedir(),'.config','youtube-publish','webhook.json');console.log(require('fs').existsSync(p)?'webhook file: found':'webhook file: missing')"
If the file is missing, continue. The build and the review work without it. Tell the user in one line that "publish" needs the one-time Grok Bot setup in <SKILL_DIR>/README.md first. If the user says "publish" and the file is still missing, do not run the handoff. Point to the setup again. The package stays ready in <OUT>.
node "<SKILL_DIR>/scripts/package.mjs" build "<OUT>"
It reads youtube.json and the 3 thumbnails in <OUT>, writes <OUT>/publish.json, and prints its path. If an input is missing, it lists the missing files and exits with code 1. Make them (see Inputs), then build again.
Options:
--video <file>: the video, relative to <OUT>. The default is final.mp4. Use a relative path, for example my-edit.mp4 or ../renders/my-edit.mp4, so that the review page can play the video.--captions <file>: the .srt captions, relative to <OUT>. The default is transcript.srt.--id <id>: the package id, YYYY-MM-DD-slug (lowercase letters, digits and -). The default is the local date and a slug of title 1. If title 1 has no letters or digits, give --id.build writes a new publish.json each time. adSuitability goes back to null, and publishAt goes back to "now". Each change that you made only in publish.json is gone too. After a build, do step 2 again, and make those changes again.
build leaves monetization.adSuitability empty (null). Draft the answers from the transcript. The user checks them on the review page.
<OUT>/transcript.txt, or transcript.srt when there is no .txt file. Read all of it, not a part.MM:SS in the final video) and the words.monetization.adSuitability of <OUT>/publish.json. Keep the file in UTF-8, and keep the emoji of the description. Use the Edit tool or Node (JSON.parse, then JSON.stringify). Do not use Windows PowerShell ConvertTo-Json: its default depth writes categories: [] as "".| Look for | name |
|---|---|
| Swearing or rude words | Inappropriate language |
| Violence, fights or injuries | Violence |
| Sexual or adult content | Adult content |
| Shocking content, for example gore | Shocking content |
| Harmful or dangerous acts, for example risky stunts | Harmful or dangerous acts |
| Hate or insults against a group of people | Hateful and derogatory content |
| Drugs or drug use | Recreational drugs and drug-related content |
| Guns or other firearms | Firearms-related content |
| Controversial topics, for example politics | Controversial issues |
| Sensitive events, for example a war, an attack or a disaster | Sensitive events |
| Dishonest behavior, for example cheating or hacking into accounts | Enabling dishonest behavior |
| Tobacco or vaping | Tobacco-related content |
The value of adSuitability, when the transcript has a finding:
{
"noneOfTheAbove": false,
"categories": [
{ "name": "Inappropriate language", "detail": "one mild swear word at 04:12" }
],
"notes": "One mild swear word at 04:12. No violence, adult content, drugs or firearms."
}
When the transcript has no finding:
{
"noneOfTheAbove": true,
"categories": [],
"notes": "No swearing, violence, drugs or adult content in the transcript."
}
detail, and name the spot in your chat note. The user decides on the review page.noneOfTheAbove is true only when categories is empty.notes has 1 or 2 sentences: what the video has, and what it does not have. Grok Bot uses notes to answer the Studio questions that categories does not answer.Publish time. If the user gave a date and time, set publishAt. Else keep "now".
Use ISO 8601 with an offset, for example "2026-12-03T17:00:00+01:00". The offset needs a colon. Z (UTC) also works.
The time must be in the future.
Summer time changes the offset. This command prints the date and time with the offset of this computer on that date:
node -e "const t=process.argv[1];const d=new Date(t);if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(t)||isNaN(d))throw new Error('give YYYY-MM-DDTHH:MM');const m=-d.getTimezoneOffset();const p=n=>String(Math.floor(n)).padStart(2,'0');console.log(t+':00'+(m<0?'-':'+')+p(Math.abs(m)/60)+':'+p(Math.abs(m)%60))" "2026-12-03T17:00"
If the user names another time zone, use the offset of that zone on that date.
node "<SKILL_DIR>/scripts/package.mjs" check "<OUT>"
It prints { "ok": true, "errors": [] } when the package is good. Else it prints "ok": false with the list of errors, and exits with code 1. It checks:
.mp4) and the captions (.srt)<, >, em dash or en dashadSuitability and publishAtFix each error, then check again:
adSuitability is not filled in: do step 2.<, >, an em dash or an en dash: fix that text (step 5).youtube-thumbnail again for that thumbnail.publishAt is not in the future: ask the user for a new time.node "<SKILL_DIR>/scripts/review.mjs" "<OUT>"
<OUT>/review.html and prints its absolute path.publish.json is missing or is not valid JSON, it writes no page and exits with code 1. Build again (step 1).Open the page yourself. Never ask the user to open it:
start "" "<OUT>\review.html"Start-Process "<OUT>\review.html"open "<OUT>/review.html"xdg-open "<OUT>/review.html"Then write a short chat note:
The user asks for changes in the chat. For each round:
| The user asks for | Do this |
|---|---|
| A new title, description or tags | Change the title in pairs, or description, or tags in publish.json. Make the same change in youtube.json and youtube.md, so that the 3 files agree. |
| Other pairs, for example "swap thumbnails 2 and 3" | Change pairs in publish.json. Title N goes with thumbnail N. Pair 1 is the main title and thumbnail of the upload. |
| A new thumbnail | Run youtube-thumbnail again for that thumbnail. It writes thumbnail-N.png again. |
| A publish date and time, or "now" | Set publishAt (step 2). |
| Other ad answers | Change monetization.adSuitability. |
| Another required answer | Change madeForKids, alteredContent or paidPromotion. true means "yes". |
| A change to the video | From /produce-video: go back to its P2. Alone: use the new video, and make a new transcript.srt. Update the chapters with youtube-copy (keep the 3 titles). Then build again (step 1). |
Run this step only under the publish gate. If the open review page shows errors, do not run the handoff. Fix the errors first (step 5).
node "<SKILL_DIR>/scripts/handoff.mjs" "<OUT>"
The script:
publish.json again, with the checks of step 3.--config <file> for another file.--onedrive <dir>, then oneDriveDir in the webhook file, then the environment variables OneDrive, OneDriveConsumer and OneDriveCommercial. It must be the top folder of OneDrive, because Grok Bot looks for YouTube Publish/<id> there.<OneDrive>/YouTube Publish/<id>/. The copies have flat names: video.mp4, captions.srt, and thumbnail-1 to thumbnail-3 with their extensions. It writes publish.json there last, with a files list (name, bytes, sha256).{ "id", "folder", "manifest", "files" }. It follows no redirects, so the secret header never goes to another place.The copy of a big video takes minutes. Run the command in the foreground, and allow 10 minutes.
The output never shows the full webhook URL or a header value. stdout is { "ok", "status", "folder", "host" }. The exit code tells you the next step:
0: the webhook replied with a 2xx status. Report (step 7).1: nothing was sent. stderr says why: the package, the webhook file, the OneDrive folder, the free space, or the copy. If the fix changes the package (for example a new publish time), go back to step 5. Else fix the cause (for example the free space), and run the handoff again.2: the webhook did not take the message (a status that is not 2xx, a redirect, a network error, or no reply in 30 s). The files are in OneDrive. Report (step 7).More options:
--dry-run: no copy and no POST. It prints the plan: { "ok", "dryRun", "folder", "copy", "files", "space", "host", "body" }. It works without the webhook file. Then host is null.--resend: if the OneDrive folder already has publish.json and each file with the right size, it skips the copy. Then it sends the POST again. If the user asks for a retry, run it. Never start a retry on your own. If the package changed after a handoff, run without --resend, because a complete folder keeps its old publish.json.After exit code 0, tell the user:
folder). OneDrive uploads it now. Keep the computer on and online until OneDrive finishes.host replied with status status.After exit code 2, tell the user:
folder), but the webhook did not take the message. Give the status or the reason from stderr.--resend. A resend of the same package needs no new "publish".build sets these values. The review page shows each one.
| Field | Default | Meaning |
|---|---|---|
pairs | title N with thumbnail-N | 3 pairs for the A/B test in "Test & compare". Pair 1 is the main title and thumbnail. |
captions | transcript.srt, language en | English captions, with timing. |
madeForKids, alteredContent, paidPromotion | false | "No" for each. |
categoryAndLanguage | copy-from-newest-long-video | The same category and language as the newest long video. |
monetization | enabled: true, midRolls: "youtube-places", adSuitability: null | Monetization on. YouTube places the mid-roll ads. The agent drafts the ad answers (step 2). |
endScreen | import-from-newest-long-video | Imported from the newest long video (not a Short). If that video has no end screen, from the video before it. |
cards | none | No cards. |
publishAt | now | The video goes public after Grok Bot applies all settings. |
The user pastes references/grok-routine.md into a Grok Bot routine one time (see README.md). In short, Grok Bot:
publish.json, with the A/B test of the 3 pairs.publishAt.If a step fails before the video is public or scheduled, the video stays private. The OneDrive folder stays, and Grok Bot reports the failure.
README.md (opens in a new tab)references/grok-routine.md (opens in a new tab)scripts/handoff.mjs (opens in a new tab)scripts/handoff.test.mjs (opens in a new tab)scripts/package.mjs (opens in a new tab)scripts/package.test.mjs (opens in a new tab)scripts/review.mjs (opens in a new tab)scripts/review.test.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
youtube-upload, video-publishing, grok-bot, content-publishing
Generated from the plugin's indexed repository (alemtuzlak/skills) — no native marketplace selected
npx claudepluginhub p/alemtuzlak-alemtuzlak-skills41 skills in this plugin
/accessible-htmlUse whenever writing, editing, or reviewing markup or UI code — HTML, JSX/TSX, Vue/Svelte/Angular templates, web components, email HTML, or CSS that affects text size, color, focus, motion, layout order, or hit area. Also use when adding a button, link, form, input, modal, dropdown, menu, tabs, tooltip, toast, icon, image, iframe, table, list, keyboard shortcut, drag interaction, or any click handler; when a design has to become code; and when the user says "accessibility", "a11y", "WCAG", "screen reader", "keyboard navigation", "focus", "aria", "contrast", "alt text", or "axe"./amazing-videoUse only when the user runs /amazing-video or names the amazing-video skill. The text after the command is the video topic, such as a PR, a feature, or an API./Other plugins' skills for the same job