{"slug":"jimliu-baoyu-post-to-weibo-52807d","title":"\u5fae\u535a\u56fe\u6587\u4e0e\u5934\u6761\u6587\u7ae0\u53d1\u5e03","description":"\u901a\u8fc7\u771f\u5b9e Chrome \u6d4f\u89c8\u5668\uff08CDP\uff09\u628a\u6587\u5b57\u3001\u56fe\u7247\u3001\u89c6\u9891\u6216 Markdown \u5934\u6761\u6587\u7ae0\u586b\u5165\u5fae\u535a\u7f16\u8f91\u5668\uff0c\u7531\u7528\u6237\u4eba\u5de5\u590d\u6838\u5e76\u70b9\u51fb\u53d1\u5e03\u3002\u542b\u5360\u4f4d\u7b26\u6b8b\u7559\u4e0e\u56fe\u7247\u6570\u91cf\u6821\u9a8c\u3001Chrome \u8c03\u8bd5\u5b9e\u4f8b\u7684\u5b9a\u5411\u6e05\u7406\u8bf4\u660e\u3002\u4e0d\u81ea\u52a8\u63d0\u4ea4\uff0c\u4e0d\u4fdd\u8bc1\u5e73\u53f0\u5ba1\u6838\u7ed3\u679c\u3002","category":"\u53d1\u5e03\u4e0e\u8fd0\u8425","tags":["JimLiu","\u5b9d\u7389","\u53d1\u5e03\u4e0e\u8fd0\u8425"],"author":"\u5b9d\u7389 \u00b7 JimLiu","source_url":"https://github.com/JimLiu/baoyu-skills/blob/0a27d7d40e79cfe42334e2e9130a1e41a499ca54/skills/baoyu-post-to-weibo/SKILL.md","license":"MIT","status":"published","verification":"source_reviewed","verification_notes":"\u5df2\u6838\u5bf9\u539f\u59cb\u4ed3\u5e93\u3001\u56fa\u5b9a\u63d0\u4ea4\u3001\u8bb8\u53ef\u3001\u6280\u80fd\u6b63\u6587\u4e0e\u5305\u7ed3\u6784\uff0c\u5e76\u8865\u5145\u4e2d\u6587\u6267\u884c\u9a8c\u6536\u8bf4\u660e\uff1b\u672a\u8fd0\u884c\u5305\u5185\u811a\u672c\u3002","revision":"94fba0ef9c6a45468a4bfe89deae1ed9","created_at":"2026-11-02T14:47:08+00:00","updated_at":"2026-11-02T14:47:08+00:00","source_repo":"JimLiu/baoyu-skills","source_path":"skills/baoyu-post-to-weibo/SKILL.md","source_commit":"0a27d7d40e79cfe42334e2e9130a1e41a499ca54","source_updated_at":"2026-11-02T14:46:04+00:00","stars":0,"proxy_score":null,"score":null,"grade":null,"dimensions":{},"evaluation":{},"installs":0,"platforms":[],"formats":[],"category_slug":"publishing","category_name":"\u53d1\u5e03\u4e0e\u8fd0\u8425","quality":{"review_type":"text_and_package_review","readiness":"requires_setup","reviewed_at":"2026-11-02T14:46:04+00:00","review_summary":"\u4efb\u52a1\u94fe\u8def\u6e05\u6670\u3001\u6709\u53d1\u5e03\u524d\u5360\u4f4d\u7b26\u6821\u9a8c\uff0c\u5c5e\u53ef\u7528\u7684\u53d1\u5e03\u8f85\u52a9\u6280\u80fd\uff1b\u4f46\u9700\u7528\u6237\u81ea\u5907 Chrome\u3001bun \u4e0e\u5fae\u535a\u767b\u5f55\u6001\uff0cEXTEND.md \u914d\u7f6e\u8bf4\u660e\u7f3a\u5931\uff0c\u4e14\u6392\u969c\u4e2d\u7684\u81ea\u52a8\u6740\u8fdb\u7a0b\u9700\u6536\u655b\u3002","cost_notes":"\u811a\u672c\u672c\u8eab\u65e0\u4ed8\u8d39 API\uff1b\u5fae\u535a\u8d26\u53f7\u7c7b\u578b\u4e0e\u53d1\u5e03\u6743\u9650\u7531\u5e73\u53f0\u89c4\u5219\u51b3\u5b9a\uff0c\u5982\u9700\u4f1a\u5458\u80fd\u529b\u8bf7\u7528\u6237\u81ea\u884c\u786e\u8ba4\uff0c\u4e0d\u4ee3\u62a5\u4ef7\u3002","source_sha256":"255e0346f9ab22ac2b8ff88db5e6259eed56dbb9330a3de4d6a732be1f372bae","prerequisites":["\u672c\u673a\u5b89\u88c5 Google Chrome \u6216 Chromium","bun \u8fd0\u884c\u65f6\uff08\u7f3a\u5931\u65f6\u53ef\u7528 npx -y bun\uff0c\u6216\u5148\u5b89\u88c5 bun\uff09","\u9996\u6b21\u4f7f\u7528\u9700\u7528\u6237\u5728\u6d4f\u89c8\u5668\u4e2d\u624b\u52a8\u767b\u5f55\u5fae\u535a\u5e76\u4fdd\u6301\u4f1a\u8bdd","macOS/Linux/Windows \u684c\u9762\u73af\u5883\uff0c\u53ef\u8bbf\u95ee\u5fae\u535a\u7f51\u9875"],"checks":["\u811a\u672c\u7ed3\u675f\u65f6\u7684\u5360\u4f4d\u7b26\u62a5\u544a\u663e\u793a\u5269\u4f59 WBIMGPH_ \u4e3a 0\uff0c\u4e14\u671f\u671b\u56fe\u7247\u6570\u4e0e\u5b9e\u9645\u56fe\u7247\u6570\u4e00\u81f4","\u5934\u6761\u6587\u7ae0\u6807\u9898\u4e0d\u8d85\u8fc7 32 \u5b57\u3001\u5bfc\u8bed\u4e0d\u8d85\u8fc7 44 \u5b57\uff0c\u8d85\u957f\u65f6\u811a\u672c\u7ed9\u51fa\u7684\u622a\u65ad/\u91cd\u751f\u6210\u63d0\u793a\u5df2\u8f6c\u544a\u7528\u6237","\u666e\u901a\u5e16\u9644\u4ef6\u603b\u6570\u4e0d\u8d85\u8fc7 18 \u4e2a\uff0c\u56fe\u7247\u4e0e\u89c6\u9891\u8def\u5f84\u5747\u5b58\u5728\u4e14\u53ef\u8bfb","\u6d4f\u89c8\u5668\u505c\u7559\u5728\u7f16\u8f91\u9875\u4e14\u672a\u81ea\u52a8\u63d0\u4ea4\uff0c\u53d1\u5e03\u52a8\u4f5c\u7531\u7528\u6237\u672c\u4eba\u70b9\u51fb","\u6392\u969c\u65f6\u53ea\u6e05\u7406\u5e26 --remote-debugging-port \u4e0e baoyu-skills \u914d\u7f6e\u76ee\u5f55\u7684 Chrome \u5b9e\u4f8b\uff0c\u672a\u8bef\u6740\u7528\u6237\u65e5\u5e38 Chrome"],"limitations":["\u811a\u672c\u4ec5\u586b\u5145\u5185\u5bb9\uff0c\u4e0d\u4ee3\u66ff\u7528\u6237\u70b9\u51fb\u53d1\u5e03\uff0c\u4e5f\u4e0d\u6821\u9a8c\u5185\u5bb9\u662f\u5426\u7b26\u5408\u5fae\u535a\u793e\u533a\u89c4\u8303","\u4f9d\u8d56\u5fae\u535a\u7f51\u9875 DOM \u7ed3\u6784\uff0c\u9875\u9762\u6539\u7248\u53ef\u80fd\u5bfc\u81f4\u9009\u62e9\u5668\u5931\u6548\uff0c\u9700\u4eba\u5de5\u89c2\u5bdf","\u672a\u5728\u672c\u6b21\u5ba1\u9605\u4e2d\u8fd0\u884c\u4efb\u4f55\u811a\u672c\uff0c\u5b9e\u9645\u517c\u5bb9\u6027\u5f85\u7528\u6237\u73af\u5883\u9a8c\u8bc1","\u53cd\u81ea\u52a8\u5316\u89c4\u907f\u6548\u679c\u672a\u7ecf\u9a8c\u8bc1\uff0c\u4e0d\u627f\u8bfa\u4e0d\u88ab\u5e73\u53f0\u8bc6\u522b"],"issues":["SKILL.md \u63d0\u5230 EXTEND.md \u504f\u597d\u6587\u4ef6\u4e0e\u201cdefault Chrome profile\u201d\uff0c\u4f46\u5305\u5185\u672a\u63d0\u4f9b EXTEND.md \u793a\u4f8b\u6216\u5b57\u6bb5\u8bf4\u660e\uff0c\u7528\u6237\u4e0d\u77e5\u53ef\u914d\u7f6e\u4ec0\u4e48","\u6392\u969c\u6bb5\u843d\u8981\u6c42\u201c\u81ea\u52a8\u3001\u4e0d\u95ee\u5373\u6740\u201dCDP Chrome \u5b9e\u4f8b\uff0c\u4e0e\u8c28\u614e\u64cd\u4f5c\u539f\u5219\u6709\u5f20\u529b\uff0c\u5efa\u8bae\u6539\u4e3a\u5148\u5217\u51fa\u5339\u914d\u8fdb\u7a0b\u518d\u7ec8\u6b62","\u672a\u8bf4\u660e\u5fae\u535a\u767b\u5f55\u6001\u5931\u6548\u65f6\u7684\u5177\u4f53\u8868\u73b0\u4e0e\u6062\u590d\u6b65\u9aa4"],"missing_files":[]},"quality_url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/SHILIU-QUALITY.md","usage_guide":{"task":"\u628a\u5df2\u5199\u597d\u7684\u5fae\u535a\u6b63\u6587\uff08\u53ef\u5e26\u56fe\u7247/\u89c6\u9891\uff09\u6216 Markdown \u5934\u6761\u6587\u7ae0\u586b\u5165\u5fae\u535a\u7f51\u9875\u7f16\u8f91\u5668\uff0c\u4f9b\u7528\u6237\u4eba\u5de5\u786e\u8ba4\u540e\u53d1\u5e03\u3002","inputs":"\u5fae\u535a\u6b63\u6587\u6587\u672c\u6216 .md \u6587\u4ef6\uff1b\u53ef\u9009\u56fe\u7247/\u89c6\u9891\u672c\u5730\u8def\u5f84\uff08\u666e\u901a\u5e16\u5408\u8ba1\u4e0d\u8d85\u8fc7 18 \u4e2a\u6587\u4ef6\uff09\uff1b\u5934\u6761\u6587\u7ae0\u53ef\u9009\u5c01\u9762\u56fe\u3001\u6807\u9898\uff08\u226432 \u5b57\uff09\u3001\u5bfc\u8bed\uff08\u226444 \u5b57\uff09\uff1b\u672c\u673a\u5df2\u5b89\u88c5 Chrome/Chromium \u4e0e bun\uff08\u6216\u53ef\u7528 npx\uff09\uff1b\u7528\u6237\u5df2\u5728\u9996\u6b21\u8fd0\u884c\u65f6\u624b\u52a8\u767b\u5f55\u5fae\u535a\u3002","outputs":"\u6d4f\u89c8\u5668\u4e2d\u5df2\u586b\u597d\u5185\u5bb9\u7684\u5fae\u535a\u53d1\u5e03\u9875\u6216\u5934\u6761\u6587\u7ae0\u7f16\u8f91\u5668\uff1b\u811a\u672c\u8f93\u51fa\u7684\u5360\u4f4d\u7b26\u6b8b\u7559\u62a5\u544a\u4e0e\u671f\u671b/\u5b9e\u9645\u56fe\u7247\u6570\u91cf\u5bf9\u6bd4\uff1b\u7528\u6237\u4eba\u5de5\u53d1\u5e03\u540e\u7684\u6700\u7ec8\u5e16\u5b50\uff08\u7531\u7528\u6237\u64cd\u4f5c\u4ea7\u751f\uff09\u3002","example_input":"\u7528 baoyu-post-to-weibo \u628a ./draft/post.md \u53d1\u6210\u5fae\u535a\u5934\u6761\u6587\u7ae0\uff0c\u5c01\u9762\u7528 ./draft/cover.jpg\uff0c\u6807\u9898\u7528 frontmatter \u91cc\u7684\uff0c\u5148\u522b\u53d1\u5e03\uff0c\u586b\u597d\u540e\u628a\u5360\u4f4d\u7b26\u68c0\u67e5\u7ed3\u679c\u544a\u8bc9\u6211\u3002","example_output":"\uff08\u793a\u610f\uff0c\u975e\u771f\u5b9e\u8fd0\u884c\u7ed3\u679c\uff091) \u5df2\u6253\u5f00 card.weibo.com \u7f16\u8f91\u5668\u5e76\u586b\u5165\u6807\u9898\u4e0e\u5bfc\u8bed\uff1b2) \u6b63\u6587\u5df2\u7c98\u8d34\uff0c\u56fe\u7247\u5360\u4f4d\u7b26 WBIMGPH_1..3 \u5df2\u9010\u4e2a\u66ff\u6362\uff1b3) \u68c0\u67e5\u62a5\u544a\uff1a\u5269\u4f59\u5360\u4f4d\u7b26 0\uff0c\u671f\u671b\u56fe\u7247 3 / \u5b9e\u9645 3\uff1b4) \u7b49\u5f85\u4f60\u5728\u9875\u9762\u4e0a\u786e\u8ba4\u540e\u624b\u52a8\u70b9\u51fb\u53d1\u5e03\u3002"},"read_url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d","skill_url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/SKILL.md","download_url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/download","install_url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/install","files":[{"path":"LICENSE","bytes":1064,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/LICENSE"},{"path":"SHILIU-QUALITY.md","bytes":2311,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/SHILIU-QUALITY.md"},{"path":"SKILL.md","bytes":4106,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/SKILL.md"},{"path":"scripts/bun.lock","bytes":23715,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/scripts/bun.lock"},{"path":"scripts/copy-to-clipboard.ts","bytes":12179,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/scripts/copy-to-clipboard.ts"},{"path":"scripts/md-to-html.ts","bytes":5816,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/scripts/md-to-html.ts"},{"path":"scripts/package.json","bytes":167,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/scripts/package.json"},{"path":"scripts/paste-from-clipboard.ts","bytes":5659,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/scripts/paste-from-clipboard.ts"},{"path":"scripts/weibo-article.ts","bytes":46976,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/scripts/weibo-article.ts"},{"path":"scripts/weibo-post.ts","bytes":9788,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/scripts/weibo-post.ts"},{"path":"scripts/weibo-utils.ts","bytes":4557,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/scripts/weibo-utils.ts"},{"path":"shiliu-quality.json","bytes":2168,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/shiliu-quality.json"},{"path":"shiliu-source.json","bytes":275,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/shiliu-source.json"},{"path":"usage.json","bytes":1214,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-post-to-weibo-52807d/files/usage.json"}],"content":"---\nname: baoyu-post-to-weibo\ndescription: Posts content to Weibo (\u5fae\u535a). Supports regular posts with text, images, and videos, and headline articles (\u5934\u6761\u6587\u7ae0) with Markdown input via Chrome CDP. Use when user asks to \"post to Weibo\", \"\u53d1\u5fae\u535a\", \"\u53d1\u5e03\u5fae\u535a\", \"publish to Weibo\", \"share on Weibo\", \"\u5199\u5fae\u535a\", or \"\u5fae\u535a\u5934\u6761\u6587\u7ae0\".\nversion: 1.117.3\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-post-to-weibo\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Post to Weibo\n\nPosts via a real Chrome browser (CDP), which avoids anti-bot detection. Scripts only fill content in the browser \u2014 the user reviews and publishes manually.\n\n## Script Directory\n\n`{baseDir}` = this SKILL.md's directory; scripts are at `{baseDir}/scripts/<script-name>.ts`. Resolve `${BUN_X}`: `bun` if installed \u2192 else `npx -y bun` \u2192 else suggest installing bun.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/weibo-post.ts` | Regular posts (text + images) |\n| `scripts/weibo-article.ts` | Headline article publishing (Markdown) |\n| `scripts/copy-to-clipboard.ts` | Copy content to clipboard |\n| `scripts/paste-from-clipboard.ts` | Send real paste keystroke |\n\n## Preferences (EXTEND.md)\n\nFirst found wins:\n\n| Priority | Path | Scope |\n|----------|------|-------|\n| 1 | `.baoyu-skills/baoyu-post-to-weibo/EXTEND.md` | Project |\n| 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.md` | XDG |\n| 3 | `$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md` | User home |\n\nNone found \u2192 use defaults. Supported: default Chrome profile.\n\n## Prerequisites\n\nGoogle Chrome or Chromium; `bun`. First run: user logs in to Weibo manually (session persists). Works on macOS, Linux, Windows.\n\n## Post Type Selection\n\nUnless the user specifies: Markdown file (`.md`) \u2192 Headline Article (\u5934\u6761\u6587\u7ae0); plain text / text with images \u2192 Regular Post.\n\n## Regular Posts\n\nText + images/videos (max 18 files total), posted on the Weibo homepage.\n\n```bash\n${BUN_X} {baseDir}/scripts/weibo-post.ts \"Hello Weibo!\" --image ./photo.png\n${BUN_X} {baseDir}/scripts/weibo-post.ts \"Watch this\" --video ./clip.mp4\n```\n\n| Parameter | Description |\n|-----------|-------------|\n| `<text>` | Post content (positional) |\n| `--image <path>` | Image file (repeatable) |\n| `--video <path>` | Video file (repeatable) |\n| `--profile <dir>` | Custom Chrome profile |\n\n## Headline Articles (\u5934\u6761\u6587\u7ae0)\n\nEditor: `https://card.weibo.com/article/v3/editor`.\n\n```bash\n${BUN_X} {baseDir}/scripts/weibo-article.ts article.md\n${BUN_X} {baseDir}/scripts/weibo-article.ts article.md --cover ./cover.jpg\n```\n\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated with warning if longer) |\n| `--summary <text>` | Override summary/\u5bfc\u8bed (max 44 chars, auto-regenerated from content if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\nFrontmatter: `title`, `summary`, `cover_image`.\n\n**Markdown-to-HTML**: do NOT pass any `--theme` when converting; use the default theme.\n\nScript flow: opens the editor \u2192 clicks \"\u5199\u6587\u7ae0\" and waits until editable \u2192 fills title and summary \u2192 pastes HTML into the ProseMirror editor \u2192 replaces image placeholders one by one (copy image \u2192 select placeholder \u2192 paste).\n\n**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.\n\n## Troubleshooting\n\n**`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:\n\n```bash\npkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2\n```\n\n**Never kill all Chrome processes** (`pkill -f \"Google Chrome\"`) \u2014 the user may have regular Chrome windows open.\n\n## Extension Support\n\nCustom configuration via EXTEND.md \u2014 see Preferences.\n","usage":"\u8bfb\u53d6 SKILL.md\uff0c\u5e76\u6309\u9700\u8bfb\u53d6\u914d\u5957\u6587\u4ef6\uff1b\u4e0b\u8f7d ZIP \u83b7\u53d6\u5b8c\u6574\u5305\u3002\u6280\u80fd\u662f\u4efb\u52a1\u65b9\u6cd5\uff0c\u4e0d\u6388\u4e88\u65b0\u589e\u8d26\u6237\u3001\u4ed8\u8d39\u6216\u7cfb\u7edf\u6743\u9650\u3002"}
