Index of every page on this site: llms.txt
All skills
jimliu avatar

/baoyu-post-to-weibo

@bf1ff07 official
by Jim Liu 宝玉jimliu/baoyu-skills28k stars
3,011
Run it yourself

Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when user asks to "post to Weibo", "发微博", "发布微博", "publish to Weibo", "share on Weibo", "写微博", or "微博头条文章".

Use this Skill: https://skilld.dev/gh/jimliu/baoyu-skills/baoyu-post-to-weibo

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈81 tokens for metadata: the name and description. ≈896 when used: this file. ≈42 more on demand in 1 file.

Description uses 3.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈281 characters, or 3.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Post to Weibo

Posts via a real Chrome browser (CDP), which avoids anti-bot detection. Scripts only fill content in the browser — the user reviews and publishes manually.

Script Directory

{baseDir} = this SKILL.md's directory; scripts are at {baseDir}/scripts/<script-name>.ts. Resolve ${BUN_X}: bun if installed → else npx -y bun → else suggest installing bun.

Script Purpose
scripts/weibo-post.ts Regular posts (text + images)
scripts/weibo-article.ts Headline article publishing (Markdown)
scripts/copy-to-clipboard.ts Copy content to clipboard
scripts/paste-from-clipboard.ts Send real paste keystroke

Preferences (EXTEND.md)

First found wins:

Priority Path Scope
1 .baoyu-skills/baoyu-post-to-weibo/EXTEND.md Project
2 ${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.md XDG
3 $HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md User home

None found → use defaults. Supported: default Chrome profile.

Prerequisites

Google Chrome or Chromium; bun. First run: user logs in to Weibo manually (session persists). Works on macOS, Linux, Windows.

Post Type Selection

Unless the user specifies: Markdown file (.md) → Headline Article (头条文章); plain text / text with images → Regular Post.

Regular Posts

Text + images/videos (max 18 files total), posted on the Weibo homepage.

${BUN_X} {baseDir}/scripts/weibo-post.ts "Hello Weibo!" --image ./photo.png
${BUN_X} {baseDir}/scripts/weibo-post.ts "Watch this" --video ./clip.mp4
Parameter Description
<text> Post content (positional)
--image <path> Image file (repeatable)
--video <path> Video file (repeatable)
--profile <dir> Custom Chrome profile

Headline Articles (头条文章)

Editor: https://card.weibo.com/article/v3/editor.

${BUN_X} {baseDir}/scripts/weibo-article.ts article.md
${BUN_X} {baseDir}/scripts/weibo-article.ts article.md --cover ./cover.jpg
Parameter Description
<markdown> Markdown file (positional)
--cover <path> Cover image
--title <text> Override title (max 32 chars, truncated with warning if longer)
--summary <text> Override summary/导语 (max 44 chars, auto-regenerated from content if longer)
--profile <dir> Custom Chrome profile

Frontmatter: title, summary, cover_image.

Markdown-to-HTML: do NOT pass any --theme when converting; use the default theme.

Script flow: opens the editor → clicks "写文章" and waits until editable → fills title and summary → pastes HTML into the ProseMirror editor → replaces image placeholders one by one (copy image → select placeholder → paste).

Post-composition check: the script then reports remaining WBIMGPH_ placeholders and expected vs actual image count. If it prints warnings, tell the user the specific issues before they publish.

Troubleshooting

Chrome debug port not ready / Unable to connect: automatically, without asking, kill only the CDP Chrome instances (with --remote-debugging-port AND the baoyu-skills profile), then retry:

pkill -f "remote-debugging-port.*baoyu-skills/chrome-profile" 2>/dev/null; sleep 2

Never kill all Chrome processes (pkill -f "Google Chrome") — the user may have regular Chrome windows open.

Extension Support

Custom configuration via EXTEND.md — see Preferences.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings18d5 checks · Risk SAFE
  • Gen Agent Trust Hub18d

    The skill automates posting text, images, and Markdown articles to Weibo by controlling a Chrome browser via CDP. It uses cross-platform utility scripts that execute platform-specific commands (Swift, PowerShell, AppleScript) to manage the system clipboard.

  • Socket18d

    2 alerts: gptSecurity, gptAnomaly

  • Snyk18d

    Risk: LOW · No issues

  • Runlayer8mo

    76/119 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at bf1ff07. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 weeks ago
version
1.117.3
Other metadata
metadata
{
  "openclaw": {
    "homepage": "https://github.com/JimLiu/baoyu-skills#baoyu-post-to-weibo",
    "requires": {
      "anyBins": [
        "bun",
        "npx"
      ]
    }
  }
}
  • weibo
  • social-media
  • posting
  • markdown
  • chrome
  • cdp
  • automation
  • chinese

README badge

README badge for jimliu/baoyu-skills/baoyu-post-to-weibo

Posts text, images, and videos to Weibo via Chrome browser automation, as well as long-form Markdown articles to Weibo's headline platform. Requires manual login on first run and user confirmation before publishing; supports custom Chrome profiles and up to 18 media files per regular post.

Generated from the current SKILL.md.

Does this skill require me to be logged in to Weibo?
Yes. On first run, you must log in to Weibo manually in the Chrome browser. The session is then saved and reused for subsequent posts.
Do the scripts publish automatically or do I need to review first?
The scripts fill content into the browser and open the Weibo editor, but you must review and click publish manually. The skill does not auto-submit posts.
What are the character limits for headline articles?
Titles are limited to 32 characters (truncated with a warning if longer) and summaries to 44 characters (auto-regenerated from content if longer).
Does this skill support both regular posts and long-form articles?
Yes. Regular posts support text, images, and videos via weibo-post.ts. Long-form articles in Markdown are published as headline articles (头条文章) via weibo-article.ts.
What happens if I have Chrome open already?
The skill uses Chrome DevTools Protocol (CDP) with its own profile, so it won't interfere with your existing Chrome windows. Only the CDP Chrome instances started by the skill should be killed if there are connection issues.

Generated from the current SKILL.md. These answers refresh after source changes.