SkillsGrove
SkillsGrove/Vidéo courte et créateurs/terryso/ego-skills/kuaishou-video

kuaishou-video

Installation

$npx skills add https://github.com/terryso/ego-skills --skill kuaishou-video
$git clone --depth 1 https://github.com/terryso/ego-skills.git /tmp/ego-skills && mkdir -p ~/.claude/skills && cp -r /tmp/ego-skills/skills/kuaishou-video ~/.claude/skills/kuaishou-video
Installe pour moi cette Agent Skill : https://github.com/terryso/ego-skills/tree/b0890f92e3ea5fa63daca8a792c645115431a4e5/skills/kuaishou-video — lis d’abord son SKILL.md et ses scripts, et ne l’installe dans mon dossier de compétences qu’après avoir vérifié qu’elle est sûre.

Résumé

Description d’origine · MITPublish a local video to the Kuaishou creator platform (cp.kuaishou.com) with Ego Lite via ego-browser. Login-check first. Success means the work shows 审核中. Optional comment from the creator comment manager. The caller supplies a local video file and a description. This skill does not download video. Use when the user asks to post to 快手, 快手发视频, 发布到快手创作者平台, or comment on a Kuaishou work from the creator backend.
Le SKILL.md ci-dessous est reproduit depuis terryso/ego-skills (commit b0890f9) sous licence MIT. Le texte est inchangé ; seules les métadonnées d’en-tête du fichier sont omises, les images sont affichées sous forme de liens et les fichiers très longs sont tronqués. Copyright 2026 NEE / ego-skills contributors. Licence : LICENSE. Seul le fichier d’instructions est affiché ; consultez le dépôt d’origine pour les éventuels scripts.

kuaishou-video

用 Ego Lite 会话把本地视频发到 快手创作者服务平台。终点是作品进入**「审核中」**。

Publish a local video file to the Kuaishou creator platform. The endpoint is 审核中. This skill does not download video.

先装 Ego

先装 Ego Lite,保证 ego-browser 在 PATH。缺失则 soft-fail / 告知用户去装,不要硬调浏览器。

Install Ego Lite and put ego-browser on PATH. If it is missing, soft-fail and tell the user. Do not hard-require the browser.

每次发布前:登录闸门(必做)

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 扫码后再跑 check-login
1 其它错误 报告 JSON error,不要假装已发布

详见 references/login.md。不要另做 cookie-healthcheck 技能。

默认 finish({ keep: [] })。--keep 才把登录页留着并 handOff()。

输入(通用,无本机产品路径)

调用方提供本地文件和文案。见 references/inputs.md。本技能不绑定任何产品系列、播客或业务目录,也不下载视频。

最少需要:本机 video 绝对路径、desc(话题写在描述字符串里,如 描述 #话题1 #话题2)。

CLI

ego-browser nodejs 不继承 shell 环境变量,也不转发 shell argv。publish.sh / comment.sh 先把 JSON 写到 /tmp,再交给 ego。

# 仓库根目录
node skills/kuaishou-video/scripts/check-login.mjs
node skills/kuaishou-video/scripts/check-login.mjs --keep
bash skills/kuaishou-video/scripts/publish.sh /absolute/path/to/video.mp4 "描述 #话题1 #话题2"
# 登录 handOff 或中断后,用 spaceId 续跑;最后一个 1 表示保留浏览器页
bash skills/kuaishou-video/scripts/publish.sh /absolute/path/to/video.mp4 "描述" 4 1

# 可选:后台评论管理(不是 www 公开页)
bash skills/kuaishou-video/scripts/comment.sh "评论内容"
bash skills/kuaishou-video/scripts/comment.sh "评论内容" "标题片段" 4 1

已安装的技能目录里用相对路径:node scripts/check-login.mjs、bash scripts/publish.sh …。

退出码 含义
0 成功。发布 stdout 含 {"ok":true,"status":"审核中",...}
1 参数或流程错误
2 需要登录。发布/评论脚本在登录墙上会 handOff()

创作者表单没有 wujie,所以上传、描述、点击发布由 publish.js 做完。Agent 不要另写一套填表脚本,除非脚本报了 flow error 并留下 spaceId。

发布脚本在做什么

  1. 打开 https://cp.kuaishou.com/article/publish/video。
  2. 用正文判断登录:出现「扫码登录 / 二维码登录 / 请登录」且没有创作者后台,则 exit 2 并 handOff()。
  3. 先 waitForFileChooser,再点 loc=role:button[name='上传视频']。
  4. 等到「重新上传」,再等到「上传中」消失并隔 2 秒复核。超时、等待次数用尽、出现上传失败文案,或读不到稳定状态时退出码 1。这时不会打印「上传完成」,也不会点「发布」。
  5. 写入 contenteditable 描述,回读 innerText,必须和 desc 一致。
  6. 用元素**自身文本精确等于「发布」**定位(不是「立即发布 / 定时发布」),scrollIntoView 后坐标点击。
  7. 成功:URL 含 article/manage/video,且页面有「审核中」。

成功时默认 finish({ keep: [] })。第 4 个参数 1 才保留页面。

评论(可选)

comment.sh 打开 https://cp.kuaishou.com/article/comment。该页默认选中最新作品。占位是「有爱评论,说点儿好听的」,发送按钮用精确文本「发送」。

成功:toast「发送成功」,且评论出现在列表里。标题片段对不上就 exit 1,不要发错作品。

cp.kuaishou.com 和 www.kuaishou.com 不共享登录态。不要去公开页评论。

避坑

完整清单在 references/pitfalls.md。发布前先 login-check;exit 2 必须停。

手动兜底

publish.js / comment.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。

测试

npm test
Voir le texte intégral de la licence (MIT)
MIT License

Copyright (c) 2026 NEE / ego-skills contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.