TikTok Automation: Publishing Articles, Text-and-Image Posts, and Videos via OpenCLI

Preface

Douyin Creator Center (creator.douyin.com) is the official publishing entry point, but the page is built with React + Semi Design, and interactions such as cover upload, SMS verification, and contenteditable body text are hard to handle reliably with a single fixed script. Common approaches are hand-written Playwright or ad-hoc screen recording, which carry high maintenance costs—any change in login state or popups requires code changes.

The following introduces a community Skill on SkillHub, @user_401e3080/opencli-douyin (OpenCLI Douyin automated content publishing). It bakes OpenCLI browser automation and the practical steps of Douyin Creator Center into SKILL.md, letting an Agent follow defined commands to navigate, fill forms, upload, and publish, while separately handling pitfalls such as Semi cover upload and SMS verification.

What Is This

One-line positioning: A Skill in the style of a Douyin Creator Center content publishing guide based on OpenCLI, controlling creator.douyin.com through an already-logged-in browser, supporting three publishing flows: articles, image-text posts, and videos.

Maintenance and source: Community publisher user_401e3080 (the SkillHub page labels the author as 封修九 / Feng Xiujiu), coordinate @user_401e3080/opencli-douyin, current version 1.0.0, category business-ops, tag requires_api_key=false (no API Key required). SkillHub stats: rating 100000, 841 downloads (as shown on the page at the time).

Official entry points:

  • Skill URL: https://api.skillhub.cn/user_401e3080/opencli-douyin
  • SkillHub page: https://www.skillhub.cn/skills/user_401e3080/opencli-douyin

Core Features

The following capabilities are all drawn from the Skill description and the SKILL.md documentation:

Content type Supported method Description
Image-text Step-by-step opencli browser operations, or opencli douyin image-post (requires adapter) Standard image upload, relatively low complexity
Article Step-by-step browser flow + a dedicated cover-upload script, or opencli douyin article Semi Design cover requires monkey-patching to intercept the file input
Video Browser upload and waiting for transcoding, or opencli douyin draft to save a draft Requires a longer wait time

Automation focus:

  1. Use opencli browser --session dy to manage sessions (open, state, click, fill, upload, eval, wait).
  2. React forms: browser fill applies to inputs such as the title; for the body text, use eval to inject <p> paragraphs into the contenteditable (to avoid \n becoming a literal).
  3. Article cover upload: intercept document.createElement and HTMLInputElement.click, then run upload against the input carrying data-oc-cov, and click “Finish” (完成).
  4. SMS verification: publishing may pop up a verification code; the type=number verification input must use the native value setter and cannot rely on browser fill.
  5. Optionally, after installing the douyin adapter (placed in ~/.opencli/clis/douyin/), one-line commands such as opencli douyin image-post, article, and draft are supported.

Installation and Activation

1. Install This Skill (SkillHub)

The SkillHub page recommends letting the AI install the coordinate package according to the SkillHub installation instructions. Command-line example (--dir must point to the current Agent’s skills directory; otherwise the default ./skills/ may not be recognized):

command -v skillhub && skillhub --version

skillhub install opencli-douyin --namespace user_401e3080 --dir ~/.cursor/skills/

Common paths for other clients (from the SkillHub installation docs): Claude Code uses ~/.claude/skills/; Codex uses ~/.codex/skills/ or .agents/skills/ under the project. Just change --dir to the corresponding directory; the install command form is the same.

You can also send this to the Agent:

Please install `@user_401e3080/opencli-douyin` according to https://skillhub.cn/install/skillhub.md.

2. Runtime Environment (Required by the Skill; must be done on first use)

This Skill depends on the OpenCLI ecosystem. Configure it in the order of “Environment setup” in SKILL.md:

Node.js (>= 21):

node --version

Install OpenCLI globally:

npm install -g @jackwener/opencli
opencli doctor

OpenCLI companion Skills for Claude Code (the docs note that Claude Code requires this command knowledge):

npx skills add jackwener/opencli
npx skills add opencli-browser

It is also recommended to install opencli-adapter-author, opencli-autofix, and opencli-usage; verify with npx skills list.

Browser: Install the OpenCLI extension in Chrome/Chromium (search OpenCLI in the extension store, or download the extension zip from https://github.com/jackwener/opencli/releases and load it manually).

Login: Open https://creator.douyin.com in the browser with the extension installed and complete login.

Optional adapter: Place article.js, image-post.js, and _shared/ into ~/.opencli/clis/douyin/ (the docs state that the video draft draft.js already ships with OpenCLI).

Known OpenCLI 1.7.18 issue: Repeated browser upload / fill calls may throw an error due to a duplicate const declaration in evaluateWithArgs; SKILL.md provides a concrete patch to modify dist/src/browser/base-page.js inside the @jackwener/opencli package. Before deployment, check the docs to see whether the patch is still needed.

Typical Usage

Start a Session and Publish an Image-Text Post (Step-by-step Browser Flow)

The session name dy is used as the example in the docs. First open the upload page, close popups, switch tabs, upload, fill the title and body text, and finally click Publish:

opencli browser --session dy open "https://creator.douyin.com/creator-micro/content/upload"
opencli browser --session dy wait time 3
opencli browser --session dy state
opencli browser --session dy click <N>
opencli browser --session dy upload "input[type=file][accept*=image]" "<图片路径>"
opencli browser --session dy wait time 4
opencli browser --session dy fill "input[placeholder*=填写作品标题]" "<标题>"

The docs provide eval snippets for the body text and the “Publish” button (injecting <p> into the contenteditable, and finding the button whose text is “Publish”). On Windows, URLs containing & may be truncated by cmd; use the base URL without query parameters.

Publish an Article and Upload the Cover

After navigating to the article page, fill in the title and body text; cover upload follows the four steps in the docs: intercept input creation → upload → trigger change → click “Finish”. Example entry URL:

opencli browser --session dy open "https://creator.douyin.com/creator-micro/content/post/article"

One-line Adapter Commands (when ~/.opencli/clis/douyin/ is installed)

opencli douyin image-post "<图片路径>" --title "标题" --caption "正文"
opencli douyin article --title "标题" --content "正文" --cover "<封面路径>"
opencli douyin draft "<视频路径>" --title "标题"

Collaboration with the Agent

After installing this Skill, in environments such as Cursor, describe in natural language the type to publish, the local asset paths, the title, and the body text; the Agent should read the selectors, wait times, and troubleshooting table in the Skill, and execute opencli browser or adapter commands as needed. The SMS verification step requires a human to provide the code; the Skill already documents the interaction sequence.

Suitable Scenarios and Notes

Suitable for:

  • Teams or individuals who already have a stable login state in Creator Center and want to use an Agent + OpenCLI to repeatedly publish image-text posts, articles, or save video drafts.
  • Those who do not want to maintain Playwright from scratch but need documented references for Semi cover upload, React form filling, and verification flows.
  • Operations and content production pipelines classified as business-ops (this Skill does not provide the Douyin Open Platform API; it uses browser automation instead).

Limitations and cautions:

  • Heavily dependent on the browser extension and login state; see the docs’ troubleshooting table for errors such as Extension not connected and Unauthorized.
  • Page redesigns will change placeholders and tab indices; use opencli browser --session dy state to re-locate elements.
  • Publishing may trigger SMS verification; automation cannot bypass this—a human must be in the loop.
  • Video requires waiting for upload and transcoding; the docs recommend longer wait time values.
  • This is a community Skill, version 1.0.0; you can use SkillHub CLI’s verify and other capabilities to check upgrade and signature consistency yourself (as described in the installation docs).

Closing

opencli Douyin automated content publishing consolidates the most time-consuming browser details in Douyin Creator Center (React forms, Semi covers, verification codes) into executable OpenCLI steps and optional adapter commands, making it suitable as a publishing playbook on the Agent side. Installation and coordinates are based on SkillHub:

  • https://www.skillhub.cn/skills/user_401e3080/opencli-douyin
  • https://api.skillhub.cn/user_401e3080/opencli-douyin
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye