← 返回 Skills 市场
15027302155

douyin push video

作者 15027302155 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
113
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install douyin-push-video
功能描述
协助用户将本地或用户提供的视频发布到抖音账号。包含上传流程说明、开放平台 API 使用指引及发布前检查。Use when: 用户要发抖音、上传视频到抖音、把视频发到抖音、post to Douyin、抖音发布。NOT for: 抖音视频下载、抖音数据分析、非发布类抖音操作。
使用说明 (SKILL.md)

\r \r

douyin posting Skill 使用指南\r

\r

抖音视频发布\r

\r

何时使用\r

\r

  • 用户说「帮我把这个视频发到抖音」「上传到抖音」「发抖音」\r
  • 用户提供视频文件并希望发布到抖音\r
  • 用户询问如何用代码/脚本把视频发到抖音\r
  • 用户说「这是抖音 openId / accessToken,配置上去」或「记录下来」「保存一下」\r
  • 用户问「怎么获取 openId / accessToken」「如何授权」「怎么拿到 token」等\r \r

配置并记录 openId、accessToken\r

\r 当用户提供 openId 和 accessToken 并要求「配置上去」或「记录下来」时:\r \r

  1. 将用户提供的 openIdaccessToken 写入项目根目录的 .env 文件。\r
  2. 格式为(不要有多余引号或空格):\r
    DOUYIN_OPEN_ID=用户提供的openId\r
    DOUYIN_ACCESS_TOKEN=用户提供的accessToken\r
    ```\r
    
  3. .env 已存在,则只更新上述两个变量,保留其它变量不变。\r
  4. 告知用户:「已把 openId 和 accessToken 写入项目下的 .env,会一直保留,之后发抖音会优先用这份配置。」\r \r 项目中的 index.js 会自动读取 .env,无需用户再手动设置环境变量。\r \r

使用前必须检查\r

\r 在协助发布(尤其是调用 API/脚本)之前,必须先确认用户是否具备:\r \r

  • openId:用户唯一标识(通过抖音开放平台 OAuth 获取)\r
  • accessToken:用户授权 access_token(同上)\r \r 若用户尚未提供或未获取这两项,应先引导用户按下面「如何获取 openId 与 accessToken」完成授权;若用户表示要「配置上去」「记录下来」,则按上节「配置并记录 openId、accessToken」写入 .env,不要直接执行上传/发布代码。\r \r

如何获取 openId 与 accessToken(直接引导)\r

\r 当用户没有 openId/accessToken 且需要发抖音时,按以下步骤引导用户完成授权并拿到凭证。可逐条回复或给出链接与命令。\r \r

第一步:创建应用并配置(若尚未有)\r

\r

  1. 打开 抖音开放平台 并登录。\r
  2. 进入「管理中心」→「应用管理」→「创建应用」,选择「移动应用」或「网站应用」等(根据实际类型)。\r
  3. 在应用详情里找到 client_key(应用唯一标识)和 client_secret(密钥),后续要用。\r
  4. 在应用里配置 重定向地址 redirect_uri:必须是 HTTPS 的完整 URL(不支持 http、localhost)。若本地开发,可用 ngrokcpolar 等把本机端口映射为 https 地址,并把该地址填到开放平台「重定向地址」中。\r
  5. 申请发布视频能力:在「能力管理」→「能力实验室」中申请「代替用户发布内容到抖音」,审核通过后才有发布权限。授权时需勾选对应 scope(见下)。\r \r

第二步:让用户打开授权页拿到 code\r

\r 6. 拼出授权 URL(把下面参数换成用户自己的值):\r

https://open.douyin.com/platform/oauth/connect/?client_key=你的client_key&response_type=code&scope=user_info,video.create&redirect_uri=你的redirect_uri的URL编码&state=任意字符串\r
```\r
- `scope` 至少包含 `user_info,video.create`(发布视频需要)。\r
- `redirect_uri` 必须与开放平台里配置的完全一致,若含特殊字符需做 URL 编码。\r
7. 让用户用浏览器打开该 URL,扫码或登录抖音并同意授权。\r
8. 授权成功后页面会跳转到 `redirect_uri?code=xxx&state=xxx`,从地址栏或回调页拿到 **code**(code 约 10 分钟有效,且只能用一次)。\r
\r
### 第三步:用 code 换 openId 和 accessToken\r
\r
9. 调用接口用 code 换 token:\r
- 接口:`POST https://open.douyin.com/oauth/access_token/`\r
- Content-Type:`application/x-www-form-urlencoded`\r
- Body 参数:`client_key`、`client_secret`、`code`、`grant_type=authorization_code`\r
10. 响应里会包含 **open_id**、**access_token**、**refresh_token**、**expires_in**(access_token 约 15 天有效)。把 **open_id** 和 **access_token** 给用户,或按用户要求写入项目 `.env`(见上节「配置并记录 openId、accessToken」)。\r
\r
**项目内已提供脚本**:用户若已配置好 `.env` 中的 `DOUYIN_CLIENT_KEY`、`DOUYIN_CLIENT_SECRET`、`REDIRECT_URI`,拿到 code 后可在项目根目录执行:\r
```bash\r
node scripts/get-douyin-token.js \x3C用户拿到的code>\r
```\r
脚本会输出 open_id 和 access_token,并询问是否写入 `.env`,从而完成「直接引导」获取并记录凭证。\r
\r
### 官方文档链接(可发给用户)\r
\r
- [抖音获取授权码](https://developer.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/account-permission/douyin-get-permission-code)\r
- [获取 access_token](https://developer.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/account-permission/get-access-token)\r
\r
## 核心流程\r
\r
1. **确认 openId 与 accessToken**(见上「使用前必须检查」)\r
2. **确认素材**\r
- 视频文件路径或用户已提供的视频\r
- 标题、话题、封面(可选)、可见范围等发布参数\r
\r
3. **发布方式二选一**\r
- **手动发布**:引导用户使用抖音/抖音创作者中心网页或 App,按步骤上传并填写标题、话题等。\r
- **开放平台发布**:若用户需要自动化,指引使用抖音开放平台(创作服务平台)的「发布视频」相关 API;需先完成企业/个人开发者认证与授权。\r
\r
4. **发布前检查**\r
- 视频格式与时长符合抖音规范(常见:MP4,建议时长与尺寸参考当前平台规则)\r
- 标题、话题无违规词\r
- 若用 API,确认已获取有效 access_token 及发布权限\r
\r
## 开放平台 API 要点\r
\r
- 抖音创作服务平台/开放平台提供「发布视频」类 API,需 OAuth 授权。\r
- 典型步骤:获取用户授权 → 换取 access_token → 调用上传接口(先上传视频文件得到 video_id,再调用发布接口传入 video_id 与标题、封面等)。\r
- 具体 endpoint、参数以官方文档为准;回复用户时给出文档链接与关键参数说明,不编造 API 路径。\r
\r
## 回复原则\r
\r
- 用户仅问「怎么发抖音」:优先给出**手动发布**的简短步骤(App/网页入口 + 上传、填标题、选话题、发布)。\r
- 用户明确要**自动化/脚本/API**:说明需用开放平台,并列出步骤(认证、授权、上传接口、发布接口),可写示例调用流程(伪代码或示例请求),并提醒查阅最新官方文档。\r
- **若用户没有 openId 或 accessToken**:按本 Skill 中「如何获取 openId 与 accessToken(直接引导)」逐步引导(创建应用、配置 redirect_uri、拼授权链接、用户扫码拿 code、用 code 换 token);必要时可代用户拼好授权 URL 或说明运行 `node scripts/get-douyin-token.js \x3Ccode> --write` 完成换取并写入 .env。\r
- 若用户未提供视频文件,先提示准备视频再继续。\r
\r
## 示例话术\r
\r
- 「要发抖音的话,可以:1)在抖音 App 里点「+」选本地上传;2)或用电脑打开抖音创作者中心网页上传。你这段视频打算用啥标题和话题?」\r
- 「用接口发抖音需要先在抖音开放平台创建应用并拿到授权,然后用上传接口拿到 video_id,再调发布接口。」\r
- 用户提供 openId/accessToken 并说配置上去时:「已把 openId 和 accessToken 写入项目下的 .env,会一直保留,之后发抖音会优先用这份配置。」\r
安全使用建议
This skill implements Douyin upload and publish workflows and includes scripts that will read and write OAuth credentials to a .env file in the project. Before installing or using it: 1) Be aware you will need to supply client_key/client_secret and user open_id/access_token to publish; the skill does not declare these requirements in its registry metadata — treat that as a warning. 2) Understand the skill will persist user tokens in a .env file (they will remain on disk). If you are uncomfortable storing tokens, do not use the --write option and avoid having the agent automatically persist credentials. 3) Inspect the included code (index.js and scripts/get-douyin-token.js) yourself — they call only https://open.douyin.com endpoints; confirm those are acceptable. 4) Run this code in an isolated environment or container, and rotate/revoke tokens after testing. 5) If you need tighter control, prefer manual publishing steps or supply short-lived tokens only when needed. If the author can update the registry metadata to declare the required env vars and document persistence explicitly, that would reduce the current inconsistency.
功能分析
Type: OpenClaw Skill Name: douyin-push-video Version: 1.0.0 The skill facilitates Douyin video uploads but contains a potential arbitrary file read vulnerability in index.js, as the uploadVideo function accepts and reads unvalidated file paths. Additionally, SKILL.md and scripts/get-douyin-token.js instruct the agent to write sensitive OAuth credentials (openId and accessToken) directly into a local .env file. While these capabilities are aligned with the stated purpose of automating social media posts, the lack of path sanitization and the handling of secrets in plain text pose a security risk if the agent is manipulated.
能力评估
Purpose & Capability
Name/description claim: publish videos to Douyin. Code and SKILL.md implement that (upload + create endpoints) and include helper to exchange OAuth code. However, the registry metadata lists no required env vars or config paths even though the skill clearly expects and uses DOUYIN_OPEN_ID, DOUYIN_ACCESS_TOKEN, and (for token exchange) DOUYIN_CLIENT_KEY/DOUYIN_CLIENT_SECRET and REDIRECT_URI. The omission of those required credentials/config declarations is an incoherence.
Instruction Scope
SKILL.md explicitly instructs the agent to write user-provided openId/accessToken into a project .env and to run node scripts that read/write that .env. Persisting user credentials to the project directory is within the publishing purpose, but it expands scope (long-term credential storage) and gives the skill the ability to reuse tokens without reauthorization — this should be made explicit to users. The instructions otherwise stay on-topic (OAuth flow, upload/publish steps) and only call Douyin endpoints.
Install Mechanism
No installation spec; skill is instruction + small Node.js implementation using standard npm dependencies (dotenv, form-data) from public registry. No remote downloads or obscure install steps observed.
Credentials
The skill reads/writes sensitive variables (DOUYIN_OPEN_ID, DOUYIN_ACCESS_TOKEN, DOUYIN_CLIENT_KEY, DOUYIN_CLIENT_SECRET, REDIRECT_URI) but the package/registry metadata declares no required env vars or primary credential. That mismatch hides the fact that the skill needs OAuth client credentials and user tokens. Persisting access tokens in .env without explicit manifest declaration increases risk if users assume no secrets are required.
Persistence & Privilege
The skill persists credentials to a project .env file and will reuse them for future uploads. always is false and it does not request permanent system-wide presence or modify other skills. Persisting tokens is functionally convenient for publishing, but users should be aware tokens remain on disk until removed/rotated.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install douyin-push-video
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /douyin-push-video 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
自动登录抖音账号,上传并发布视频到抖音创作者平台,支持视频标签管理和登录状态检查。
元数据
Slug douyin-push-video
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

douyin push video 是什么?

协助用户将本地或用户提供的视频发布到抖音账号。包含上传流程说明、开放平台 API 使用指引及发布前检查。Use when: 用户要发抖音、上传视频到抖音、把视频发到抖音、post to Douyin、抖音发布。NOT for: 抖音视频下载、抖音数据分析、非发布类抖音操作。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 113 次。

如何安装 douyin push video?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install douyin-push-video」即可一键安装,无需额外配置。

douyin push video 是免费的吗?

是的,douyin push video 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

douyin push video 支持哪些平台?

douyin push video 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 douyin push video?

由 15027302155(@15027302155)开发并维护,当前版本 v1.0.0。

💬 留言讨论