Skip to content

Guide · Agent skill

How to use the Post to Weibo agent skill (baoyu-post-to-weibo)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The Post to Weibo agent skill lets an AI agent prepare content for Weibo, the Chinese social network. It can fill a regular post with text, images and videos, or build a headline article (头条文章) from a Markdown file, by driving a Chrome browser you are logged into. This guide explains what the skill does, how to install it, how to trigger it with plain requests, and what to check for safety before you run it.

Post to WeiboJimLiu/baoyu-skills · MIT

Quick start

  1. 1Download and unzip the skill. Download the ZIP from this page and unzip it. Keep the baoyu-post-to-weibo folder intact.
  2. 2Place it in your skills folder. Move the folder into ~/.claude/skills/ or a project's .claude/skills/, or upload it under Settings → Capabilities → Skills in the Claude apps.
  3. 3Install the requirements. Make sure Google Chrome or Chromium and a bun runtime (or npx) are available on your computer.
  4. 4Make a first run and log in. Ask the agent to post something. When the browser opens, log in to Weibo manually; the session is saved for later runs.
  5. 5Ask for a post or article. Use a natural request such as "Post to Weibo" or "Publish article.md to Weibo", naming any image, video or cover files.
  6. 6Review and publish. Check the filled-in content and any warnings in the output, then publish manually in the browser.

What the skill makes the agent do

The skill gives an agent two publishing paths. Regular posts take text plus up to 18 images or videos in total and are placed on the Weibo homepage. Headline articles take a Markdown file, convert it to HTML, and insert it into Weibo's article editor at card.weibo.com.

The scripts only fill in content. The browser opens with everything entered, and you review the draft and press publish yourself. The skill is a helper for composing and uploading, not an autonomous poster.

  • Regular post: text with optional images or videos
  • Headline article: Markdown with optional cover image, title and summary
  • Uses a real Chrome browser, which the skill says helps it avoid anti-bot detection

Install the Post to Weibo skill

Download the ZIP for this skill from our page and unzip it. Place the folder in ~/.claude/skills/ for your user account, or in a project's .claude/skills/ folder if you want it limited to one project.

You can also upload the skill in the Claude apps under Settings → Capabilities → Skills.

  • Personal install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your project folder
  • Claude apps: Settings → Capabilities → Skills

Check the requirements before you start

You need Google Chrome or Chromium, a bun runtime (or npx, which can run bun), and a Weibo account. The first time you run the skill, you log in to Weibo manually in the browser it opens, and the session is saved for later runs.

The scripts depend on Node packages listed in scripts/package.json, which include baoyu-md and baoyu-chrome-cdp.

  • Google Chrome or Chromium
  • bun runtime, or npx to run bun
  • A Weibo account, logged in manually on first run
  • Node packages from scripts/package.json

Trigger the skill with natural requests

You do not need to call scripts yourself. Ask the agent in plain language. The skill's description lists phrases such as "post to Weibo", "发微博", "发布微博", "publish to Weibo", "share on Weibo", "写微博", and "微博头条文章".

If you do not specify a type, the skill picks one: a Markdown (.md) file becomes a headline article, while plain text or text with images becomes a regular post. Say so explicitly if you want a different type.

  • "Post to Weibo: Hello from my new blog post, with photo.png attached"
  • "Publish article.md to Weibo as a headline article with cover.jpg as the cover"
  • "发微博:今天的新品发布,附上 photo.png"

Post a regular Weibo post with text, images or video

For a regular post, the agent runs weibo-post.ts with your text as a positional argument. Use --image or --video for files; both can be repeated. The browser opens with the content filled in, and you publish manually.

  • <text>: post content (positional)
  • --image <path>: image file, repeatable
  • --video <path>: video file, repeatable
  • --profile <dir>: custom Chrome profile
bun {baseDir}/scripts/weibo-post.ts "Hello Weibo!" --image ./photo.png

Publish a Markdown headline article

For long-form content, pass a Markdown file to weibo-article.ts. The script opens the Weibo article editor, clicks the write button, fills the title and summary, pastes the HTML into the editor, and then replaces image placeholders one by one.

Titles are limited to 32 characters and summaries to 44. A longer title is truncated with a warning, and a longer summary is regenerated from the content. You can set title, summary and cover_image in YAML front matter, or override them with flags. Do not pass a --theme parameter when converting Markdown; use the default theme.

  • <markdown>: Markdown file (positional)
  • --cover <path>: cover image
  • --title <text>: override title (max 32 characters)
  • --summary <text>: override summary (max 44 characters)
  • --profile <dir>: custom Chrome profile
bun {baseDir}/scripts/weibo-article.ts article.md --cover ./cover.jpg

Review the draft and check the warnings

After inserting images, the article script checks for leftover WBIMGPH_ placeholders and compares the expected and actual image count. If the check fails, the output shows warnings. Read them and fix the issues before you publish. Nothing is posted automatically.

  • Look for remaining WBIMGPH_ placeholders in the editor
  • Confirm the image count matches what you expected
  • Check the title and summary lengths

Safety notes: scripts, network and your Weibo session

This skill runs Bun scripts on your machine and uses the network. It drives a Chrome browser that holds your Weibo login, and the source notes that the scripts read the clipboard (copy-to-clipboard.ts and paste-from-clipboard.ts send a real paste keystroke). Read the scripts in the scripts/ folder if you need to be sure what runs.

The troubleshooting section says that on a "Chrome debug port not ready" or "Unable to connect" error, the skill kills only Chrome instances that were launched with its own baoyu-skills profile and retries. It states it must never kill all Chrome processes, because you may have regular Chrome windows open. Save any work in your normal Chrome before running it.

Because this works by automating the Weibo website, it can stop working if the site changes. It is not an official API integration.

  • Runs scripts: yes
  • Uses network: yes
  • Reads and writes the clipboard during paste steps
  • Keeps a saved Weibo login in a Chrome profile

Tips for better results

Keep article titles within 32 characters and summaries within 44 so the script does not truncate or rewrite them. Put your cover image path in the front matter so you do not need to repeat it.

If you use a custom browser profile, pass it with --profile or set a default Chrome profile in an EXTEND.md preferences file. The skill checks project, XDG and home-folder locations in that order.

  • Use the Markdown file type for long articles and plain text for short posts
  • Set a custom profile with --profile to keep the Weibo login separate
  • Always read the output warnings before publishing

What people use it for

  • Share a photo or short video with a caption on your Weibo homepage
  • Turn a Markdown blog post into a Weibo headline article with a cover image
  • Draft a Chinese or bilingual long-form article from notes you keep in Markdown
  • Prepare a batch of regular posts with images, reviewing each before you publish

Frequently asked questions

How do I install the baoyu-post-to-weibo skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for your user account, or into a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings → Capabilities → Skills.

What do I need to run the Post to Weibo skill?

You need Google Chrome or Chromium, a bun runtime (or npx to run bun), and a Weibo account. The Node packages in scripts/package.json are also required. On first run, log in to Weibo manually in the browser.

Does the skill publish posts automatically?

No. The scripts fill the content into the browser and you review it and press publish yourself. The skill is designed for composing and uploading, not unattended posting.

Is the Post to Weibo skill free to use?

The source lists the skill under the MIT licence. It does not state any pricing, so check the repository for licence terms and any other conditions.

Does it use the official Weibo API?

No. It works by browser automation of the Weibo website through Chrome, so it can break when the site changes. Use an official API route if you need stable, unattended posting.

Why does the skill say Chrome debug port not ready?

That error means the browser debug connection did not start. The skill kills only the Chrome instances it launched with its baoyu-skills profile and retries automatically. Your regular Chrome windows are not closed.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits creators, marketers and developers who post to Weibo often and want faster drafting from Markdown, especially for long Chinese or bilingual articles. Pick something else if you need fully unattended posting, want to avoid scripts and a browser session holding your login, or need stable official API access.

Download the skill

Find exactly what
you're looking for