/ego-skills:youtube-videofrom ego-skills
Uploads a local video file to YouTube Studio via Ego Lite browser automation. Handles login checks, sets visibility (default private), and returns video URL/ID with processing status.
Ships in ego-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.
用 Ego Lite 会话把本地视频发到 YouTube Studio。成功是拿到视频链接 / 视频 ID,并读到处理状态(Uploading、Upload complete、Processing、Checks complete、Saved 或 Published)。
Publish a local video file to YouTube Studio. Success is a video URL or ID plus a processing status. This skill does not download video and does not call yt-dlp.
先装 Ego Lite,保证 ego-browser 在 PATH。缺失则 soft-fail / 告知用户去装,不要硬调浏览器。
Install Ego Lite and put ego-browser on PATH. If either is missing, soft-fail and tell the user. Do not hard-require the browser.
在 Ego 里已经登录 YouTube 时效果最好。每次发布前把这句话告诉用户。
Being logged in to YouTube inside Ego gives the best results. Say that to the user before every publish.
Agent 在上传之前必须跑:
node scripts/check-login.mjs
# 需要把窗口留给人登录时:
node scripts/check-login.mjs --keep
| 退出码 | 含义 | Agent 做什么 |
|---|---|---|
0 | 已登录 | 把 login_tip 告诉用户,继续发布 |
2 | 未登录 / 无 ego-browser | 展示 how_to_login / how_to_login_zh,停。请人在 Ego 登录 YouTube 后再跑 check-login |
1 | 其它错误 | 报告 JSON error,不要假装已发布 |
详见 references/login.md。不要另做 cookie-healthcheck 技能。
默认 finish({ keep: [] })。--keep 才把登录页留着并 handOff()。
调用方提供本地文件和文案。见 references/inputs.md。本技能不绑定任何产品系列、播客或业务目录,也不下载视频。
最少需要:本机 video 路径、title。description 可空。tags、thumbnail 可选。visibility 默认 private(unlisted / public 必须调用方明确要求)。Made for kids 默认 No。
ego-browser nodejs 不继承 shell 环境变量,也不转发 shell argv。publish.sh 先把 JSON 写到 /tmp/youtube-video-publish.json,再交给 ego。
# 仓库根目录
node skills/youtube-video/scripts/check-login.mjs
node skills/youtube-video/scripts/check-login.mjs --keep
bash skills/youtube-video/scripts/publish.sh /absolute/path/to/video.mp4 "Title" "Description"
bash skills/youtube-video/scripts/publish.sh \
--video /absolute/path/to/video.mp4 \
--title "Title" \
--description "Description" \
--tags "one,two" \
--visibility private \
--thumbnail /absolute/path/to/thumbnail.jpg \
--made-for-kids no \
--space-id 4 \
--keep
已安装的技能目录里用相对路径:node scripts/check-login.mjs、bash scripts/publish.sh …。
| 退出码 | 含义 |
|---|---|
0 | 成功。stdout 含 {"ok":true,"videoId":"…","videoUrl":"https://youtu.be/…","status":"Processing",…} |
1 | 参数或流程错误 |
2 | 需要登录,或本机没有 ego-browser |
不要为了排查再开一个上传。登录 handOff 或中断后,用 --space-id 回到原来的 space。
https://studio.youtube.com/。accounts.google.com / /signin,或正文是 Google 登录 / 选择账号,则 exit 2。文档标题里的 “YouTube Studio” 不算已登录。#create-icon),再点「Upload videos / 上传视频」,直到出现 #select-files-button。waitForFileChooser,再点选择文件,把调用方的本地视频交给文件选择器。youtu.be 链接出现。#textbox 里,写完要回读,必须和传入标题一致。#file-loader(或 Upload thumbnail / 上传缩略图)。#tags-container。VIDEO_MADE_FOR_KIDS_NOT_MFK)。只有调用方明确要求才点 Yes。public 只有调用方传入才选,按钮文案这时是 Publish;private / unlisted 是 Save。#done-button。成功和失败默认都 finish({ keep: [] })。只有 --keep 才把页面留着。
完整清单在 references/pitfalls.md。发布前先 login-check;exit 2 必须停。不要把未登录当成已发布。
publish.js 报错后,JSON 里的 spaceId 可以回到原 space。不要为了排查再开一个 space。
ego-browser nodejs <<'EOF'
const task = await taskSpace(4);
const page = task.page("p1");
console.log({ url: await page.url() });
console.log(await page.snapshot());
EOF
把 4 换成实际 spaceId。看完执行 finish({ keep: [] })。
npm test
agents/openai.yaml (opens in a new tab)references/inputs.md (opens in a new tab)references/login.md (opens in a new tab)references/pitfalls.md (opens in a new tab)scripts/check-login.mjs (opens in a new tab)scripts/lib/config-file.mjs (opens in a new tab)scripts/lib/ego-deps.mjs (opens in a new tab)scripts/lib/launch-check.mjs (opens in a new tab)scripts/lib/publish-flow.mjs (opens in a new tab)scripts/lib/pure.mjs (opens in a new tab)scripts/lib/run-check.mjs (opens in a new tab)scripts/lib/run-ego.mjs (opens in a new tab)scripts/lib/studio-dom.mjs (opens in a new tab)scripts/publish.js (opens in a new tab)scripts/publish.sh (opens in a new tab)scripts/run-ego-module.mjs (opens in a new tab)scripts/test/cli.test.mjs (opens in a new tab)scripts/test/config-file.test.mjs (opens in a new tab)scripts/test/dom-fixture.mjs (opens in a new tab)scripts/test/launch-check.test.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 skills in this plugin
/bilibili-videoPublish a local video to the Bilibili creator platform (member.bilibili.com) with Ego Lite via ego-browser. Login-check first. Bilibili wants TWO covers uploaded separately: --cover-4x3 (首页推荐) and --cover-16x9 (个人空间). Nothing is submitted without --yes: that run only prints a local plan and exits 3. --type selects a partition from the human-type list and reads it back; a missing name stops before 立即投稿. Success is 投稿成功 / 审核中, with a BV URL or identity unconfirmed. Bilibili has no private visibility on web upload: approved submissions go public. Use when the user asks to post to B站, 哔哩哔哩, B站投稿, or publish a video to bilibili./chatgpt-image-genExpand a rough image idea with the six-axis domain engine from codex-imagegen, then create one image on the free ChatGPT website inside Ego Lite. Login-check first. Soft-fail with exit 2 when ego-browser is missing, chatgpt.com is logged out, or login cannot be proven. enrich and generate without --yes are offline. --yes sends one prompt and saves the image to --out. Flowcharts and timelines are SVG, not images. Does not call codex exec and does not use an API key. Use when the user asks to generate an image, enrich a prompt, or use ChatGPT Images without a Codex subscription./douyin-videoPublish a local video to the Douyin creator center (creator.douyin.com) with Ego Lite via ego-browser. Login-check first. Title is a separate field of at most 30 characters. Success is a redirect to content management or a publish-success message. The caller supplies a local video file. This skill does not download video. Use when the user asks to post to 抖音, 抖音发视频, 发布到抖音创作者中心, or creator.douyin.com.npx claudepluginhub terryso/ego-skills --plugin ego-skillsOther plugins' skills for the same job