Agent skill

Post to Weibo

by JimLiu in JimLiu/baoyu-skills

Publish text, image and video posts or long-form Markdown headline articles to Weibo through a real Chrome session, with the final review left to you.

MITAuto-check: warningsMarketing & SEO

Install Post to Weibo

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add JimLiu/baoyu-skills --skill baoyu-post-to-weibo -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JimLiu/baoyu-skills baoyu-post-to-weibo --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JimLiu/baoyu-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/baoyu-post-to-weibo .claude/skills/baoyu-post-to-weibo && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
baoyu-post-to-weibo
GitHub stars
27k
Used in
1 other repo
Token cost
~1.4k tokens
SKILL.md length
534 words
Files
9 (incl. scripts)
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Publish text, image and video posts or long-form Markdown headline articles to Weibo through a real Chrome session, with the final review left to you.

  • Works in 4 steps: Determine this SKILL.md file's directory… → Script path = {baseDir}/scripts/.ts → Replace all {baseDir} in this document… → …
  • Posting a text and image update to Weibo from the terminal
  • SKILL.md covers Script Directory, Preferences (EXTEND.md), Prerequisites and Regular Posts, plus 5 more sections
  • Runs TypeScript scripts from its folder; calls npx; reaches card.weibo.com

What it does

This skill drives Chrome over the DevTools protocol to put content onto Weibo. For regular posts, weibo-post.ts takes the text plus repeatable --image and --video options, with up to 18 files per post, and opens the browser with the post filled in so you review and publish it yourself. For headline articles, weibo-article.ts takes a Markdown file and an optional --cover image and uses Weibo's article editor.

Helper scripts handle Markdown-to-HTML conversion and clipboard copy and paste keystrokes. The scripts run under the bun runtime, or through npx when bun is not installed, and you log in to Weibo manually on the first run so the session is saved. An optional EXTEND.md file, looked up in the project, the XDG config folder and your home directory in that order, can set a default Chrome profile.

When your agent uses it

  • Posting a text and image update to Weibo from the terminal
  • Publishing a Markdown file as a Weibo headline article
  • Attaching a video to a Weibo post
  • Adding a cover image to a long-form Weibo article

Example prompts

  • “Post to Weibo that our new release is out, with ./screenshots/release.png attached.”
  • “Publish ./drafts/launch-notes.md as a Weibo headline article with ./cover.jpg as the cover.”
  • “Share ./clip.mp4 on Weibo with the caption Behind the scenes.”

Requirements

  • Google Chrome or Chromium
  • The bun runtime, or npx to fetch it
  • A Weibo account, logged in manually on first run

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Determine this SKILL.md file's directory path as {baseDir}
  2. Script path = {baseDir}/scripts/.ts
  3. Replace all {baseDir} in this document with the actual path
  4. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun

What it can do on your machine

Read from SKILL.md and the folder at commit 1567581. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 8 files in scripts/ (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • card.weibo.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Post to Weibo loads about 1.4k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 534 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningTells the agent its actions are pre-authorized / not to stop for confirmationSKILL.md:139
    Chrome instances and retry the command without asking the user.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from JimLiu/baoyu-skills at commit 1567581, republished under its MIT licence (© JimLiu). 534 words, ~1,359 tokens.

Download SKILL.mdSave it as .claude/skills/baoyu-post-to-weibo/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
baoyu-post-to-weibo
description
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 "微博头条文章".
version
1.117.3

Post to Weibo

Posts text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).

Script Directory

Important: All scripts are located in the scripts/ subdirectory of this skill.

Agent Execution Instructions:

  1. Determine this SKILL.md file's directory path as {baseDir}
  2. Script path = {baseDir}/scripts/<script-name>.ts
  3. Replace all {baseDir} in this document with the actual path
  4. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun

Script Reference:

ScriptPurpose
scripts/weibo-post.tsRegular posts (text + images)
scripts/weibo-article.tsHeadline article publishing (Markdown)
scripts/copy-to-clipboard.tsCopy content to clipboard
scripts/paste-from-clipboard.tsSend real paste keystroke

Preferences (EXTEND.md)

Check EXTEND.md in priority order — the first one found wins:

PriorityPathScope
1.baoyu-skills/baoyu-post-to-weibo/EXTEND.mdProject
2${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.mdXDG
3$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.mdUser home

If none found, use defaults.

EXTEND.md supports: Default Chrome profile

Prerequisites

  • Google Chrome or Chromium
  • bun runtime
  • First run: log in to Weibo manually (session saved)

Regular Posts

Text + images/videos (max 18 files total). Posted on Weibo homepage.

bash
${BUN_X} {baseDir}/scripts/weibo-post.ts "Hello Weibo!" --image ./photo.png
${BUN_X} {baseDir}/scripts/weibo-post.ts "Watch this" --video ./clip.mp4

Parameters:

ParameterDescription
<text>Post content (positional)
--image <path>Image file (repeatable)
--video <path>Video file (repeatable)
--profile <dir>Custom Chrome profile

Note: Script opens browser with content filled in. User reviews and publishes manually.


Headline Articles (头条文章)

Long-form Markdown articles published at https://card.weibo.com/article/v3/editor.

bash
${BUN_X} {baseDir}/scripts/weibo-article.ts article.md
${BUN_X} {baseDir}/scripts/weibo-article.ts article.md --cover ./cover.jpg

Parameters:

ParameterDescription
<markdown>Markdown file (positional)
--cover <path>Cover image
--title <text>Override title (max 32 chars, truncated if longer)
--summary <text>Override summary (max 44 chars, auto-regenerated if longer)
--profile <dir>Custom Chrome profile

Frontmatter: title, summary, cover_image supported in YAML front matter.

Character Limits:

  • Title: 32 characters max (truncated with warning if longer)
  • Summary/导语: 44 characters max (auto-regenerated from content if longer)

Markdown-to-HTML: Do NOT pass any --theme parameter when converting markdown to HTML. Use the default theme (no theme argument).

Article Workflow:

  1. Opens https://card.weibo.com/article/v3/editor
  2. Clicks "写文章" button, waits for editor to become editable
  3. Fills title (validated for 32-char limit)
  4. Fills summary/导语 (validated for 44-char limit)
  5. Inserts HTML content into ProseMirror editor via paste
  6. Replaces image placeholders one by one (copy image → select placeholder → paste)

Post-Composition Check: The script automatically verifies after all images are inserted:

  • Remaining WBIMGPH_ placeholders in editor content
  • Expected vs actual image count

If the check fails (warnings in output), alert the user with the specific issues before they publish.


Show full SKILL.md (152 more words)Show less

Post Type Selection

Unless the user explicitly specifies the post type:

  • Markdown file (.md) → Headline Article (头条文章)
  • Plain text / text with images → Regular Post

Troubleshooting

Chrome debug port not ready

If a script fails with Chrome debug port not ready or Unable to connect, kill only the CDP Chrome instances (those with --remote-debugging-port AND the baoyu-skills profile), then retry:

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

CRITICAL: Never kill all Chrome processes (pkill -f "Google Chrome"). Only kill Chrome instances launched by CDP with the baoyu-skills profile directory. The user may have regular Chrome windows open.

Important: This should be done automatically -- when encountering this error, kill the CDP Chrome instances and retry the command without asking the user.

Notes

  • First run: manual login required (session persists)
  • All scripts only fill content into the browser, user must review and publish manually
  • Cross-platform: macOS, Linux, Windows

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.

© JimLiu, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts) in skills/baoyu-post-to-weibo of JimLiu/baoyu-skills.

  • SKILL.md
  • scripts/bun.lock
  • scripts/copy-to-clipboard.ts
  • scripts/md-to-html.ts
  • scripts/package.json
  • scripts/paste-from-clipboard.ts
  • scripts/weibo-article.ts
  • scripts/weibo-post.ts
  • scripts/weibo-utils.ts

Open the folder on GitHubat commit 1567581

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in JimLiu/baoyu-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Post to Weibo next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Post to Weibo compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Post to Weibo this skillJimLiu/baoyu-skills27k1 repos~1.4kAutomated safety check: WarnMIT
Canghe Post To Xfreestylefly/canghe-skills4614 repos~1.7kAutomated safety check: WarnNone
Ops SocialsLifecycle-Innovations-Limited/claude-ops542—~3.6kAutomated safety check: NotesMIT
Bulkpublish Social Schedulingdavepoon/buildwithclaude3.6k—~1.3kAutomated safety check: PassMIT
Reddit Comment Automationrokpiy/auto-commenter585—~2.1kAutomated safety check: PassMIT
Social Publisheraffaan-m/ECC277k1 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Canghe Post To X

    freestylefly/canghe-skills

    Posts content and articles to X (Twitter). An agent skill from freestylefly/canghe-skills.

    461 GitHub starsUsed in 4 repos~1.7k tokens
    Marketing & SEOAuto-check: warnings
  • Ops Socials

    Lifecycle-Innovations-Limited/claude-ops

    OPS on-demand: This skill should be used when the user asks to "tweet", "post to linkedin", or…

    542 GitHub stars~3.6k tokensUpdated yesterday
    Marketing & SEOAuto-check: notes
  • Bulkpublish Social Scheduling

    davepoon/buildwithclaude

    Schedule, publish and analyze social posts across 15 networks via BulkPublish (MCP or REST) — Facebook, Instagram, X, TikTok, YouTube, Threads, Bluesky, Pinterest, Google Business, LinkedIn…

    3.6k GitHub stars~1.3k tokensUpdated 2 days ago
    Marketing & SEOAuto-check passed
  • Reddit Comment Automation

    rokpiy/auto-commenter

    Drafts, reviews, posts, and tracks Reddit comments for chosen subreddits end to end, using Playwright MCP to read and interact with the live page.

    585 GitHub stars~2.1k tokensUpdated 7 mo ago
    Productivity & AutomationAuto-check passed
  • Social Publisher

    affaan-m/ECC

    Agent-driven scheduling and publishing of social media posts across 13 platforms via SocialClaw.

    277k GitHub starsUsed in 1 repo~1.1k tokens
    Writing & ContentAuto-check passed
  • Eva Feature Demo

    vvedantb/eva

    Record a real agent-browser screencast of one eva feature being used end to end, convert it to an X-ready mp4, and write a tweet for it.

    101 GitHub stars~3.3k tokensUpdated today
    Productivity & AutomationAuto-check passed

More from JimLiu/baoyu-skills

All 22 skills in this repo
  • Markdown Article Formatter

    JimLiu/baoyu-skills

    Reformats plain text or Markdown articles with frontmatter, a title, a summary, headings, bold, lists and code blocks, and saves a separate formatted copy.

    27k GitHub starsUsed in 6 repos~3.5k tokens
    Auto-check passed
  • X to Markdown Converter

    JimLiu/baoyu-skills

    Saves tweets, threads and X Articles as Markdown files with YAML front matter, using an unofficial API that asks for your consent first.

    27k GitHub starsUsed in 4 repos~1.8k tokens
    Auto-check: warnings
  • SVG Diagram Generator

    JimLiu/baoyu-skills

    Creates standalone dark-themed SVG diagrams, including architecture, flowchart, sequence, structural, mind map, timeline and state machine types.

    27k GitHub starsUsed in 1 repo~3.1k tokens
    Auto-check passed
  • Publishes articles and image-text posts to a WeChat Official Account through the API or Chrome CDP, converting markdown to WeChat-ready HTML with link citations.

    27k GitHub starsUsed in 2 repos~3.6k tokens
    Auto-check: warnings
  • Image Compressor

    JimLiu/baoyu-skills

    Compresses images to WebP by default, or to PNG or JPEG, picking the best available tool on the machine and optionally processing whole folders.

    27k GitHub starsUsed in 5 repos~598 tokens
    Auto-check passed
  • Generates text and images through an unofficial, reverse-engineered Gemini Web API, supporting reference images and multi-turn conversations.

    27k GitHub starsUsed in 5 repos~1.6k tokens
    Auto-check passed

Questions about Post to Weibo

What does Post to Weibo do?

Publish text, image and video posts or long-form Markdown headline articles to Weibo through a real Chrome session, with the final review left to you. This skill drives Chrome over the DevTools protocol to put content onto Weibo.ts takes the text plus repeatable --image and --video options, with up to 18 files per post, and opens the browser with the post filled in so you review and publish it yourself.

When should I use Post to Weibo?

Post to Weibo fits situations like: posting a text and image update to Weibo from the terminal; publishing a Markdown file as a Weibo headline article; attaching a video to a Weibo post; adding a cover image to a long-form Weibo article.

How do I install Post to Weibo in Claude Code?

Run `npx skills add JimLiu/baoyu-skills --skill baoyu-post-to-weibo -a claude-code`. Or copy the skill folder (skills/baoyu-post-to-weibo in JimLiu/baoyu-skills) into .claude/skills/baoyu-post-to-weibo in your project. Claude Code loads it when a task matches its description.

How do I install Post to Weibo in Codex?

Run `npx skills add JimLiu/baoyu-skills --skill baoyu-post-to-weibo -a codex`. Or copy the skill folder (skills/baoyu-post-to-weibo in JimLiu/baoyu-skills) into .agents/skills/baoyu-post-to-weibo in your project. Codex loads it when a task matches its description.

Can I use Post to Weibo in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JimLiu/baoyu-skills --skill baoyu-post-to-weibo -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/baoyu-post-to-weibo, .gemini/skills/baoyu-post-to-weibo, .github/skills/baoyu-post-to-weibo and .opencode/skills/baoyu-post-to-weibo in your project.

What does Post to Weibo need to run?

Going by SKILL.md and its folder, Post to Weibo needs TypeScript for the scripts in its folder and the command-line tools its instructions call (npx). Our summary lists: Google Chrome or Chromium; The bun runtime, or npx to fetch it; A Weibo account, logged in manually on first run.

Does Post to Weibo access the network?

SKILL.md names 1 domain. In commands or code: card.weibo.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Post to Weibo safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): tells the agent its actions are pre-authorized / not to stop for confirmation. Read the flagged lines before installing; the check is not a guarantee either way. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Post to Weibo use?

Post to Weibo is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Post to Weibo use?

About 1.4k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Post to Weibo?

Skills that share tags, products or a category with Post to Weibo: Canghe Post To X (freestylefly/canghe-skills, 461 stars), Ops Socials (Lifecycle-Innovations-Limited/claude-ops, 542 stars), Bulkpublish Social Scheduling (davepoon/buildwithclaude, 3.6k stars) and Reddit Comment Automation (rokpiy/auto-commenter, 585 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Post to Weibo?

JimLiu (a GitHub user) maintains it in JimLiu/baoyu-skills, which has 26,507 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on September 10, 2026.

Source: JimLiu/baoyu-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.