← Back to Skills Marketplace
nengnengz

Baoyu Post To Weibo

by nengnengZ · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ suspicious
267
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install baoyu-post-to-weibo-2
Description
Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when...
README (SKILL.md)

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/\x3Cscript-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:

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)

Check EXTEND.md existence (priority order):

# macOS, Linux, WSL, Git Bash
test -f .baoyu-skills/baoyu-post-to-weibo/EXTEND.md && echo "project"
test -f "${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.md" && echo "xdg"
test -f "$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md" && echo "user"
# PowerShell (Windows)
if (Test-Path .baoyu-skills/baoyu-post-to-weibo/EXTEND.md) { "project" }
$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { "$HOME/.config" }
if (Test-Path "$xdg/baoyu-skills/baoyu-post-to-weibo/EXTEND.md") { "xdg" }
if (Test-Path "$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md") { "user" }

┌──────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-post-to-weibo/EXTEND.md │ Project directory │ ├──────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md│ User home │ └──────────────────────────────────────────────────┴───────────────────┘

┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not 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.

${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:

Parameter Description
\x3Ctext> Post content (positional)
--image \x3Cpath> Image file (repeatable)
--video \x3Cpath> Video file (repeatable)
--profile \x3Cdir> 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.

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

Parameters:

Parameter Description
\x3Cmarkdown> Markdown file (positional)
--cover \x3Cpath> Cover image
--title \x3Ctext> Override title (max 32 chars, truncated if longer)
--summary \x3Ctext> Override summary (max 44 chars, auto-regenerated if longer)
--profile \x3Cdir> 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)

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.


Troubleshooting

Chrome debug port not ready

If a script fails with Chrome debug port not ready or Unable to connect, kill existing Chrome CDP instances first, then retry:

pkill -f "Chrome.*remote-debugging-port" 2>/dev/null; pkill -f "Chromium.*remote-debugging-port" 2>/dev/null; sleep 2

Important: This should be done automatically -- when encountering this error, kill Chrome CDP 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.

Usage Guidance
This skill appears to be what it claims (automating Weibo posts via a real Chrome session) but it performs powerful local actions: it reads Chrome profile files, may terminate Chrome/CDP processes, manipulates the system clipboard, and sends real paste keystrokes. Before installing or letting agents invoke it autonomously: 1) only use if you trust the skill source and code; review scripts weibo-post.ts and weibo-article.ts yourself — especially any network calls or hard-coded endpoints; 2) run the scripts manually once in a safe environment (temporary Chrome profile or VM) to observe behavior; 3) do not grant it always-enabled/autonomous invocation if you need to limit risk; prefer user-invoked runs so you can confirm each publish; 4) be aware it accesses your Chrome profile paths and may kill Chrome instances — back up important profiles and close Chrome if you want to avoid unintended terminations; 5) if you are uncomfortable, reject installation or sandbox it (separate user account, container, or disposable VM). Additional useful info to change this assessment: any explicit README or publisher identity, evidence of network endpoints beyond Weibo, or a minimal build that reduces need for process-killing/keystroke automation.
Capability Analysis
Type: OpenClaw Skill Name: baoyu-post-to-weibo-2 Version: 0.1.1 The skill bundle automates Weibo posting by controlling a Chrome browser via CDP and system-level utilities. It includes high-risk behaviors such as simulating real keystrokes (Cmd+V/Ctrl+V) using 'osascript', 'powershell.exe', and 'xdotool' in 'paste-from-clipboard.ts', and managing system processes via 'pkill' as instructed in 'SKILL.md'. Furthermore, the 'baoyu-md' library dynamically imports and executes remote JavaScript from a CDN (cdn-doocs.oss-cn-shenzhen.aliyuncs.com) to load syntax highlighters in 'languages.ts', which presents a remote code execution risk. While these capabilities are aligned with the stated purpose of bypassing anti-bot measures and rendering rich content, the combination of system-level interaction and remote code execution warrants a suspicious classification.
Capability Assessment
Purpose & Capability
Name/description (post to Weibo via Chrome/CDP) align with the included scripts. Required binaries (bun or npx) and typescript/node-based helper libraries are appropriate for running the provided scripts. Bundled markdown/Chrome-CDP helper libraries are consistent with article publishing and browser automation.
Instruction Scope
SKILL.md and the scripts instruct the agent to: locate and read Chrome user-data directories (DevToolsActivePort), spawn local commands (ps, osascript, powershell, xdotool, wl-copy, xclip, etc.), manipulate the system clipboard, send real paste keystrokes to the frontmost app, and (per troubleshooting) kill existing Chrome CDP instances automatically (pkill). These are broad local actions that go beyond simple API calls and can affect other running processes and system state. The troubleshooting instruction explicitly says to kill Chrome CDP instances and retry without asking the user, which is a notable scope escalation.
Install Mechanism
There is no install spec (instruction-only), so nothing is automatically downloaded from remote URLs — the agent will execute bundled TypeScript using bun or npx. Bundling many source files but not declaring an install step is unusual but not inherently malicious; it does mean the skill will run arbitrary local code when invoked.
Credentials
The registry metadata declares no required environment variables or credentials, which matches that the skill runs locally. However the code optionally reads environment overrides (e.g., BAOYU_CHROME_PATH, BAOYU_SHARED_PROFILE, TEST_FIXED_PORT, etc.) and probes standard user-data dirs (~/.config, AppData, Library/Application Support). This is proportionate to finding/using a local Chrome profile but means the skill will access local configuration and profile files. No external service credentials are requested by the skill.
Persistence & Privilege
always:false and no install modifications to other skills or system-wide agent settings were found. The skill can be invoked autonomously (default), which is normal, but combined with its ability to manipulate clipboard, send keystrokes, and kill processes increases potential impact if invoked without user supervision.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install baoyu-post-to-weibo-2
  3. After installation, invoke the skill by name or use /baoyu-post-to-weibo-2
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.1
Initial release of the baoyu-post-to-weibo-2 skill. - Added 117 scripts and vendor files for posting to Weibo via Chrome CDP. - Supports posting regular text, images, and videos to Weibo. - Supports publishing headline articles (Markdown) with image/cover support. - Includes clipboard utility scripts for robust content transfer. - Vendor code for Chrome CDP and Markdown processing is bundled within.
v0.1.0
- Initial release of baoyu-post-to-weibo skill. - Supports posting text, images, and videos to Weibo via Chrome browser. - Allows publishing long-form headline articles with Markdown, including frontmatter for title, summary, and cover image. - Scripts open browser, fill in content, and let the user manually review and publish. - Includes EXTEND.md support for custom configurations (e.g., Chrome profile). - Automatic troubleshooting for Chrome debug port connectivity issues.
Metadata
Slug baoyu-post-to-weibo-2
Version 0.1.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is Baoyu Post To Weibo?

Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when... It is an AI Agent Skill for Claude Code / OpenClaw, with 267 downloads so far.

How do I install Baoyu Post To Weibo?

Run "/install baoyu-post-to-weibo-2" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Baoyu Post To Weibo free?

Yes, Baoyu Post To Weibo is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Baoyu Post To Weibo support?

Baoyu Post To Weibo is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Baoyu Post To Weibo?

It is built and maintained by nengnengZ (@nengnengz); the current version is v0.1.1.

💬 Comments