{"id":"319b2903-7dde-4efa-976a-599d2c0d4c7d","entityType":"agent","slug":"clawhub-jimliu-baoyu-post-to-weibo","name":"Baoyu Post To Weibo","canonicalUrl":"https://www.xpersona.co/agent/clawhub-jimliu-baoyu-post-to-weibo","canonicalPath":"/agent/clawhub-jimliu-baoyu-post-to-weibo","generatedAt":"2026-10-10T01:06:11.127Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T08:04:30.670Z","emptyReason":null},"description":"Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when... Skill: Baoyu Post To Weibo Owner: jimliu Summary: Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when... Tags: latest:1.117.3 Version history: v1.117.3 | 2026-06-01T03:31:21.726Z | user Fix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1. v1.117.2 | 2026-05-18T02:15:51.591Z | user","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 3.5K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17dfbhg0khk4fvtnx0stqg0yx83j25z:baoyu-post-to-weibo","sourceUrl":"https://clawhub.ai/jimliu/baoyu-post-to-weibo","homepage":"https://clawhub.ai/jimliu/skills/baoyu-post-to-weibo","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/jimliu/baoyu-post-to-weibo","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/jimliu/skills/baoyu-post-to-weibo","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when... "},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T08:04:30.670Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T08:04:30.670Z","emptyReason":null},"stars":null,"forks":null,"downloads":3451,"packageName":null,"latestVersion":"1.117.3","tractionLabel":"3.5K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T08:04:30.669Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T08:04:30.670Z","lastCrawledAt":"2026-10-09T08:04:30.669Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T08:04:30.669Z","lastVerifiedAt":null,"highlights":[{"version":"1.117.3","createdAt":"2026-06-01T03:31:21.726Z","changelog":"Fix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1.","fileCount":11,"zipByteSize":37033},{"version":"1.117.2","createdAt":"2026-05-18T02:15:51.591Z","changelog":"## 1.117.2 - 2026-05-17 ### Documentation - `baoyu-cover-image`: ban programmatic text repair on generated bitmaps — disallow ImageMagick / Pillow / Canvas / SVG / HTML overlays to cover, rewrite, or replace title/subtitle text; regenerate from a corrected prompt or switch to a lower-text or no-title variant instead - `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-image-cards`, `baoyu-xhs-images`, `baoyu-infographic`, `baoyu-slide-deck`: sync the same text-repair ban with skill-specific text categories (labels/captions, dialogue/sound effects, titles/body/tags, headings/data values, slide titles/bullets)","fileCount":11,"zipByteSize":36690},{"version":"1.115.4","createdAt":"2026-05-11T23:49:35.932Z","changelog":"### Documentation - Image generation backend selection: emphasize Codex `imagegen` as the priority runtime-native tool (invoke via the `Skill` tool with `skill: \"imagegen\"`) and forbid SVG/HTML/canvas substitution when no raster backend can be resolved — fall through to asking the user instead of silently emitting code-based art. Updated in `docs/image-generation-tools.md` and inlined into `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-cover-image`, `baoyu-image-cards`, `baoyu-infographic`, `baoyu-slide-deck`, and `baoyu-xhs-images`.","fileCount":10,"zipByteSize":35459},{"version":"1.103.2","createdAt":"2026-04-21T22:03:30.778Z","changelog":"- Removed 105 vendor files, including dependencies for Chrome CDP and Markdown processing, to reduce repository size and maintenance overhead. - Updated SKILL.md: streamlined and simplified the Preferences section, clarifying EXTEND.md lookup order and formats. - No changes to core functionality or user-facing scripts; posting workflow and parameters remain the same. - Scripts and runtime dependencies are now managed externally rather than bundled within the repository.","fileCount":10,"zipByteSize":35458},{"version":"1.103.1","createdAt":"2026-04-13T16:16:46.694Z","changelog":"## 1.103.1 - 2026-04-13 ### Fixes - `baoyu-markdown-to-html`: decode HTML entities and strip tags from article summary - `baoyu-post-to-weibo`: decode HTML entities and strip tags from article summary","fileCount":115,"zipByteSize":134668},{"version":"1.103.0","createdAt":"2026-04-13T01:21:36.832Z","changelog":"## 1.103.0 - 2026-04-12 ### Features - baoyu-diagram: add multi-diagram mode for article-wide diagram generation ### Fixes - baoyu-article-illustrator: prevent color names and hex codes from appearing as visible text in generated images - baoyu-cover-image: prevent color names and hex codes from appearing as visible text in generated images - baoyu-image-cards: prevent color names from appearing as visible text in generated images - baoyu-post-to-wechat: decode HTML entities and strip tags from article summary","fileCount":115,"zipByteSize":134669},{"version":"1.76.3","createdAt":"2026-04-09T16:29:16.823Z","changelog":"- Removes all test files from vendor submodules (`baoyu-chrome-cdp` and `baoyu-md`), reducing codebase size. - Updates troubleshooting instructions: now only CDP Chrome instances with the baoyu-skills profile are killed, avoiding termination of unrelated browser sessions. - Adds automatic post type selection logic: Markdown files trigger headline article publishing; plain text or text with images posts as a regular Weibo post. - No changes to existing script usage instructions or main feature set.","fileCount":113,"zipByteSize":124032},{"version":"1.76.2","createdAt":"2026-03-25T21:33:54.406Z","changelog":"- Removed the files scripts/bun.lock and scripts/vendor/baoyu-md/src/LICENSE. - Updated SKILL.md with instruction: when converting markdown to HTML for articles, do NOT pass a --theme parameter—always use the default theme.","fileCount":119,"zipByteSize":132834}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17dfbhg0khk4fvtnx0stqg0yx83j25z:baoyu-post-to-weibo","setupComplexity":"low","setupSteps":["Node.js workspace detected. Install dependencies securely: run `npm ci --ignore-scripts` to prevent post-install lifecycle triggers from running arbitrary code, then selectively audit the dependency tree.","Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T01:06:11.124Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-weibo/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T08:04:30.670Z","emptyReason":null},"readme":"Skill: Baoyu Post To Weibo\n\nOwner: jimliu\n\nSummary: Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when...\n\nTags: latest:1.117.3\n\nVersion history:\n\nv1.117.3 | 2026-06-01T03:31:21.726Z | user\n\nFix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1.\n\nv1.117.2 | 2026-05-18T02:15:51.591Z | user\n\n## 1.117.2 - 2026-05-17\n\n### Documentation\n- `baoyu-cover-image`: ban programmatic text repair on generated bitmaps — disallow ImageMagick / Pillow / Canvas / SVG / HTML overlays to cover, rewrite, or replace title/subtitle text; regenerate from a corrected prompt or switch to a lower-text or no-title variant instead\n- `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-image-cards`, `baoyu-xhs-images`, `baoyu-infographic`, `baoyu-slide-deck`: sync the same text-repair ban with skill-specific text categories (labels/captions, dialogue/sound effects, titles/body/tags, headings/data values, slide titles/bullets)\n\nv1.115.4 | 2026-05-11T23:49:35.932Z | user\n\n### Documentation\n- Image generation backend selection: emphasize Codex `imagegen` as the priority runtime-native tool (invoke via the `Skill` tool with `skill: \"imagegen\"`) and forbid SVG/HTML/canvas substitution when no raster backend can be resolved — fall through to asking the user instead of silently emitting code-based art. Updated in `docs/image-generation-tools.md` and inlined into `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-cover-image`, `baoyu-image-cards`, `baoyu-infographic`, `baoyu-slide-deck`, and `baoyu-xhs-images`.\n\nv1.103.2 | 2026-04-21T22:03:30.778Z | auto\n\n- Removed 105 vendor files, including dependencies for Chrome CDP and Markdown processing, to reduce repository size and maintenance overhead.\n- Updated SKILL.md: streamlined and simplified the Preferences section, clarifying EXTEND.md lookup order and formats.\n- No changes to core functionality or user-facing scripts; posting workflow and parameters remain the same.\n- Scripts and runtime dependencies are now managed externally rather than bundled within the repository.\n\nv1.103.1 | 2026-04-13T16:16:46.694Z | user\n\n## 1.103.1 - 2026-04-13\n\n### Fixes\n- `baoyu-markdown-to-html`: decode HTML entities and strip tags from article summary\n- `baoyu-post-to-weibo`: decode HTML entities and strip tags from article summary\n\nv1.103.0 | 2026-04-13T01:21:36.832Z | user\n\n## 1.103.0 - 2026-04-12\n\n### Features\n- baoyu-diagram: add multi-diagram mode for article-wide diagram generation\n\n### Fixes\n- baoyu-article-illustrator: prevent color names and hex codes from appearing as visible text in generated images\n- baoyu-cover-image: prevent color names and hex codes from appearing as visible text in generated images\n- baoyu-image-cards: prevent color names from appearing as visible text in generated images\n- baoyu-post-to-wechat: decode HTML entities and strip tags from article summary\n\nv1.76.3 | 2026-04-09T16:29:16.823Z | auto\n\n- Removes all test files from vendor submodules (`baoyu-chrome-cdp` and `baoyu-md`), reducing codebase size.\n- Updates troubleshooting instructions: now only CDP Chrome instances with the baoyu-skills profile are killed, avoiding termination of unrelated browser sessions.\n- Adds automatic post type selection logic: Markdown files trigger headline article publishing; plain text or text with images posts as a regular Weibo post.\n- No changes to existing script usage instructions or main feature set.\n\nv1.76.2 | 2026-03-25T21:33:54.406Z | auto\n\n- Removed the files scripts/bun.lock and scripts/vendor/baoyu-md/src/LICENSE.\n- Updated SKILL.md with instruction: when converting markdown to HTML for articles, do NOT pass a --theme parameter—always use the default theme.\n\nv1.76.1 | 2026-03-22T04:24:50.772Z | auto\n\n- Improved Markdown to HTML conversion and handling within the article workflow.\n- Updated tests and logic in the Markdown module for better accuracy and coverage.\n- Refined theming support for article rendering.\n- Minor fixes and refactoring in Chrome CDP integration for reliability.\n\nv1.69.1 | 2026-03-16T18:01:56.991Z | user\n\n## 1.69.1 - 2026-03-16\n\n### Fixes\n- `baoyu-chrome-cdp`: tighten chrome auto-connect logic to reduce false positives\n\nv1.60.0 | 2026-03-12T03:45:47.115Z | user\n\n## 1.60.0 - 2026-03-11\n\n### Features\n- `baoyu-url-to-markdown`: support reusing existing Chrome CDP instances and fix port detection order\n\n### Fixes\n- `baoyu-post-to-x`: add missing `fs` import in x-article\n\n### Refactor\n- Unify all CDP skills to use shared `baoyu-chrome-cdp` package with vendored copies\n- Simplify CLAUDE.md, move detailed documentation to `docs/` directory\n- Publish skills directly from synced vendor, removing separate artifact preparation step\n\nv1.0.0 | 2026-03-09T19:41:00.386Z | auto\n\nInitial version with Weibo posting capabilities:\n\n- Post regular Weibo updates with text, images, and videos using real Chrome for anti-bot bypass.\n- Publish long-form Weibo headline articles from Markdown, handling frontmatter and image insertion.\n- Scripts open browser, prefill content, and prompt for user review/publishing.\n- Supports user preferences and configurations via EXTEND.md in multiple locations.\n- Includes troubleshooting steps for Chrome debug issues and cross-platform compatibility.\n\nArchive index:\n\nArchive v1.117.3: 11 files, 37033 bytes\n\nFiles: scripts/bun.lock (23715b), scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (5816b), scripts/package.json (167b), scripts/paste-from-clipboard.ts (5659b), scripts/weibo-article.ts (46976b), scripts/weibo-post.ts (9788b), scripts/weibo-utils.ts (4557b), skill-card.md (2293b), SKILL.md (5521b), _meta.json (140b)\n\nFile v1.117.3:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md in priority order — the first one 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\nIf none found, use defaults.\n\n**EXTEND.md supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Markdown-to-HTML**: Do NOT pass any `--theme` parameter when converting markdown to HTML. Use the default theme (no theme argument).\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Post Type Selection\n\nUnless the user explicitly specifies the post type:\n- **Markdown file** (`.md`) → **Headline Article** (头条文章)\n- **Plain text** / text with images → **Regular Post**\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf 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:\n\n```bash\npkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2\n```\n\n**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.\n\n**Important**: This should be done automatically -- when encountering this error, kill the CDP Chrome instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.117.3:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.117.3\",\n  \"publishedAt\": 1780284681726\n}\n\nFile v1.117.3:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"^0.1.1\",\n    \"baoyu-md\": \"^0.1.1\"\n  }\n}\n\nFile v1.117.3:skill-card.md\n\n## Description:\n\nPosts content to Weibo (微博), including regular text, image, and video posts, and headline articles (头条文章) from Markdown input via Chrome CDP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[jimliu](https://clawhub.ai/user/jimliu)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to prepare Weibo posts and long-form Weibo headline articles from text, media files, or Markdown. The browser remains open so the user can review and publish manually.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill uses an authenticated browser session, system clipboard automation, real paste keystrokes, and process control.\n\nMitigation: Review the skill before installing, run it with an isolated Chrome profile, and verify all browser content before publishing.\n\nRisk: The npx fallback can download and run the Bun runtime path at execution time.\n\nMitigation: Prefer a locally installed trusted Bun runtime instead of the npx fallback.\n\nRisk: Clipboard contents, authenticated Weibo session state, and the predictable temporary article file may be exposed on shared machines.\n\nMitigation: Avoid running the skill on shared machines or clear sensitive clipboard and temporary content after use.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/jimliu/skills/baoyu-post-to-weibo)\n- [Skill homepage](https://github.com/JimLiu/baoyu-skills#baoyu-post-to-weibo)\n- [Weibo homepage](https://weibo.com/)\n- [Weibo article editor](https://card.weibo.com/article/v3/editor)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown with inline shell commands and browser-composition guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Produces browser-filled Weibo drafts for manual user review and publishing.]\n\n## Skill Version(s):\n\n1.117.3 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.117.2: 11 files, 36690 bytes\n\nFiles: scripts/bun.lock (23715b), scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (4929b), scripts/package.json (167b), scripts/paste-from-clipboard.ts (5659b), scripts/weibo-article.ts (46976b), scripts/weibo-post.ts (9788b), scripts/weibo-utils.ts (4557b), skill-card.md (2354b), SKILL.md (5520b), _meta.json (140b)\n\nFile v1.117.2:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\nversion: 1.56.1\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md in priority order — the first one 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\nIf none found, use defaults.\n\n**EXTEND.md supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Markdown-to-HTML**: Do NOT pass any `--theme` parameter when converting markdown to HTML. Use the default theme (no theme argument).\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Post Type Selection\n\nUnless the user explicitly specifies the post type:\n- **Markdown file** (`.md`) → **Headline Article** (头条文章)\n- **Plain text** / text with images → **Regular Post**\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf 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:\n\n```bash\npkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2\n```\n\n**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.\n\n**Important**: This should be done automatically -- when encountering this error, kill the CDP Chrome instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.117.2:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.117.2\",\n  \"publishedAt\": 1779070551591\n}\n\nFile v1.117.2:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"^0.1.0\",\n    \"baoyu-md\": \"^0.1.0\"\n  }\n}\n\nFile v1.117.2:skill-card.md\n\n## Description: <br>\nPosts content to Weibo, supporting regular posts with text, images, and videos, plus headline articles from Markdown through Chrome CDP. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[jimliu](https://clawhub.ai/user/jimliu) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to prepare Weibo posts or headline articles from text, media files, or Markdown while retaining manual review before publishing. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill opens a real Chrome session and uses a saved Weibo login profile. <br>\nMitigation: Use a dedicated Chrome profile for this workflow and keep normal browsing sessions separate. <br>\nRisk: Article composition can overwrite the system clipboard and paste content into the active browser. <br>\nMitigation: Review clipboard-sensitive work before running the article workflow and verify the final browser draft before publishing. <br>\nRisk: Provided images or videos may be uploaded to Weibo during draft preparation. <br>\nMitigation: Confirm the selected local files are intended for Weibo before running the skill. <br>\nRisk: Recovery can terminate stuck Chrome instances tied to the skill's CDP profile. <br>\nMitigation: Use the dedicated profile and avoid reusing it for unrelated browser work. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/jimliu/baoyu-post-to-weibo) <br>\n- [Metadata homepage](https://github.com/JimLiu/baoyu-skills#baoyu-post-to-weibo) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown instructions with shell command examples and browser-based draft composition] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [The scripts fill Weibo browser drafts for user review; publication remains manual.] <br>\n\n## Skill Version(s): <br>\n1.117.2 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.115.4: 10 files, 35459 bytes\n\nFiles: scripts/bun.lock (23715b), scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (4929b), scripts/package.json (167b), scripts/paste-from-clipboard.ts (5659b), scripts/weibo-article.ts (46976b), scripts/weibo-post.ts (9788b), scripts/weibo-utils.ts (4557b), SKILL.md (5520b), _meta.json (140b)\n\nFile v1.115.4:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\nversion: 1.56.1\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md in priority order — the first one 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\nIf none found, use defaults.\n\n**EXTEND.md supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Markdown-to-HTML**: Do NOT pass any `--theme` parameter when converting markdown to HTML. Use the default theme (no theme argument).\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Post Type Selection\n\nUnless the user explicitly specifies the post type:\n- **Markdown file** (`.md`) → **Headline Article** (头条文章)\n- **Plain text** / text with images → **Regular Post**\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf 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:\n\n```bash\npkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2\n```\n\n**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.\n\n**Important**: This should be done automatically -- when encountering this error, kill the CDP Chrome instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.115.4:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.115.4\",\n  \"publishedAt\": 1778543375932\n}\n\nFile v1.115.4:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"^0.1.0\",\n    \"baoyu-md\": \"^0.1.0\"\n  }\n}\n\nArchive v1.103.2: 10 files, 35458 bytes\n\nFiles: scripts/bun.lock (23715b), scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (4929b), scripts/package.json (167b), scripts/paste-from-clipboard.ts (5659b), scripts/weibo-article.ts (46976b), scripts/weibo-post.ts (9788b), scripts/weibo-utils.ts (4557b), SKILL.md (5520b), _meta.json (140b)\n\nFile v1.103.2:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\nversion: 1.56.1\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md in priority order — the first one 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\nIf none found, use defaults.\n\n**EXTEND.md supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Markdown-to-HTML**: Do NOT pass any `--theme` parameter when converting markdown to HTML. Use the default theme (no theme argument).\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Post Type Selection\n\nUnless the user explicitly specifies the post type:\n- **Markdown file** (`.md`) → **Headline Article** (头条文章)\n- **Plain text** / text with images → **Regular Post**\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf 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:\n\n```bash\npkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2\n```\n\n**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.\n\n**Important**: This should be done automatically -- when encountering this error, kill the CDP Chrome instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.103.2:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.103.2\",\n  \"publishedAt\": 1776809010778\n}\n\nFile v1.103.2:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"^0.1.0\",\n    \"baoyu-md\": \"^0.1.0\"\n  }\n}\n\nArchive v1.103.1: 115 files, 134668 bytes\n\nFiles: scripts/bun.lock (23587b), scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (4929b), scripts/package.json (207b), scripts/paste-from-clipboard.ts (5659b), scripts/vendor/baoyu-chrome-cdp/package.json (168b), scripts/vendor/baoyu-chrome-cdp/src/index.ts (17982b), scripts/vendor/baoyu-md/package.json (478b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b)\n\nFile v1.103.1:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\nversion: 1.56.1\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-post-to-weibo/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-post-to-weibo/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────┬───────────────────┐\n│                       Path                       │     Location      │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-post-to-weibo/EXTEND.md      │ Project directory │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md│ User home         │\n└──────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Markdown-to-HTML**: Do NOT pass any `--theme` parameter when converting markdown to HTML. Use the default theme (no theme argument).\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Post Type Selection\n\nUnless the user explicitly specifies the post type:\n- **Markdown file** (`.md`) → **Headline Article** (头条文章)\n- **Plain text** / text with images → **Regular Post**\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf 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:\n\n```bash\npkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2\n```\n\n**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.\n\n**Important**: This should be done automatically -- when encountering this error, kill the CDP Chrome instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.103.1:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.103.1\",\n  \"publishedAt\": 1776097006694\n}\n\nFile v1.103.1:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"file:./vendor/baoyu-chrome-cdp\",\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.103.1:scripts/vendor/baoyu-chrome-cdp/package.json\n\n{\n  \"name\": \"baoyu-chrome-cdp\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"src\"\n  ],\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  }\n}\n\nFile v1.103.1:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"src\"\n  ],\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nFile v1.103.1:scripts/vendor/baoyu-md/src/LICENSE\n\nThis directory contains code adapted from the doocs/md project.\n\nOriginal project: https://github.com/doocs/md\nLicense: WTFPL (Do What The Fuck You Want To Public License)\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2025 Doocs <admin@doocs.org>\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.\n\nArchive v1.103.0: 115 files, 134669 bytes\n\nFiles: scripts/bun.lock (23587b), scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (4929b), scripts/package.json (207b), scripts/paste-from-clipboard.ts (5659b), scripts/vendor/baoyu-chrome-cdp/package.json (168b), scripts/vendor/baoyu-chrome-cdp/src/index.ts (17982b), scripts/vendor/baoyu-md/package.json (478b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b)\n\nFile v1.103.0:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\nversion: 1.56.1\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-post-to-weibo/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-post-to-weibo/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────┬───────────────────┐\n│                       Path                       │     Location      │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-post-to-weibo/EXTEND.md      │ Project directory │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md│ User home         │\n└──────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Markdown-to-HTML**: Do NOT pass any `--theme` parameter when converting markdown to HTML. Use the default theme (no theme argument).\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Post Type Selection\n\nUnless the user explicitly specifies the post type:\n- **Markdown file** (`.md`) → **Headline Article** (头条文章)\n- **Plain text** / text with images → **Regular Post**\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf 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:\n\n```bash\npkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2\n```\n\n**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.\n\n**Important**: This should be done automatically -- when encountering this error, kill the CDP Chrome instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.103.0:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.103.0\",\n  \"publishedAt\": 1776043296832\n}\n\nFile v1.103.0:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"file:./vendor/baoyu-chrome-cdp\",\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.103.0:scripts/vendor/baoyu-chrome-cdp/package.json\n\n{\n  \"name\": \"baoyu-chrome-cdp\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"src\"\n  ],\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  }\n}\n\nFile v1.103.0:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"src\"\n  ],\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nFile v1.103.0:scripts/vendor/baoyu-md/src/LICENSE\n\nThis directory contains code adapted from the doocs/md project.\n\nOriginal project: https://github.com/doocs/md\nLicense: WTFPL (Do What The Fuck You Want To Public License)\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2025 Doocs <admin@doocs.org>\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.\n\nArchive v1.76.3: 113 files, 124032 bytes\n\nFiles: scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (4929b), scripts/package.json (207b), scripts/paste-from-clipboard.ts (5659b), scripts/vendor/baoyu-chrome-cdp/package.json (168b), scripts/vendor/baoyu-chrome-cdp/src/index.ts (17982b), scripts/vendor/baoyu-md/package.json (478b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b), scripts/vendor/baoyu-md/src/code-themes/xcode.min.css (945b)\n\nFile v1.76.3:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\nversion: 1.56.1\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-post-to-weibo/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-post-to-weibo/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────┬───────────────────┐\n│                       Path                       │     Location      │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-post-to-weibo/EXTEND.md      │ Project directory │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md│ User home         │\n└──────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Markdown-to-HTML**: Do NOT pass any `--theme` parameter when converting markdown to HTML. Use the default theme (no theme argument).\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Post Type Selection\n\nUnless the user explicitly specifies the post type:\n- **Markdown file** (`.md`) → **Headline Article** (头条文章)\n- **Plain text** / text with images → **Regular Post**\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf 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:\n\n```bash\npkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2\n```\n\n**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.\n\n**Important**: This should be done automatically -- when encountering this error, kill the CDP Chrome instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.76.3:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.76.3\",\n  \"publishedAt\": 1775752156823\n}\n\nFile v1.76.3:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"file:./vendor/baoyu-chrome-cdp\",\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.76.3:scripts/vendor/baoyu-chrome-cdp/package.json\n\n{\n  \"name\": \"baoyu-chrome-cdp\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"src\"\n  ],\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  }\n}\n\nFile v1.76.3:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"files\": [\n    \"src\"\n  ],\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nArchive v1.76.2: 119 files, 132834 bytes\n\nFiles: scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (4929b), scripts/package.json (207b), scripts/paste-from-clipboard.ts (5659b), scripts/vendor/baoyu-chrome-cdp/package.json (140b), scripts/vendor/baoyu-chrome-cdp/src/index.test.ts (9557b), scripts/vendor/baoyu-chrome-cdp/src/index.ts (17190b), scripts/vendor/baoyu-md/package.json (450b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b), scripts/vendor/baoyu-md/src/code-themes/vs2015.min.css (1088b)\n\nFile v1.76.2:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\nversion: 1.56.1\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-post-to-weibo/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-post-to-weibo/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────┬───────────────────┐\n│                       Path                       │     Location      │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-post-to-weibo/EXTEND.md      │ Project directory │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md│ User home         │\n└──────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Markdown-to-HTML**: Do NOT pass any `--theme` parameter when converting markdown to HTML. Use the default theme (no theme argument).\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf a script fails with `Chrome debug port not ready` or `Unable to connect`, kill existing Chrome CDP instances first, then retry:\n\n```bash\npkill -f \"Chrome.*remote-debugging-port\" 2>/dev/null; pkill -f \"Chromium.*remote-debugging-port\" 2>/dev/null; sleep 2\n```\n\n**Important**: This should be done automatically -- when encountering this error, kill Chrome CDP instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.76.2:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.76.2\",\n  \"publishedAt\": 1774474434406\n}\n\nFile v1.76.2:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"file:./vendor/baoyu-chrome-cdp\",\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.76.2:scripts/vendor/baoyu-chrome-cdp/package.json\n\n{\n  \"name\": \"baoyu-chrome-cdp\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  }\n}\n\nFile v1.76.2:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nArchive v1.76.1: 121 files, 142923 bytes\n\nFiles: scripts/bun.lock (23565b), scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (4929b), scripts/package.json (207b), scripts/paste-from-clipboard.ts (5659b), scripts/vendor/baoyu-chrome-cdp/package.json (140b), scripts/vendor/baoyu-chrome-cdp/src/index.test.ts (9557b), scripts/vendor/baoyu-chrome-cdp/src/index.ts (17190b), scripts/vendor/baoyu-md/package.json (450b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b)\n\nFile v1.76.1:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\nversion: 1.56.1\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-post-to-weibo/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-post-to-weibo/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────┬───────────────────┐\n│                       Path                       │     Location      │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-post-to-weibo/EXTEND.md      │ Project directory │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md│ User home         │\n└──────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf a script fails with `Chrome debug port not ready` or `Unable to connect`, kill existing Chrome CDP instances first, then retry:\n\n```bash\npkill -f \"Chrome.*remote-debugging-port\" 2>/dev/null; pkill -f \"Chromium.*remote-debugging-port\" 2>/dev/null; sleep 2\n```\n\n**Important**: This should be done automatically -- when encountering this error, kill Chrome CDP instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.76.1:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.76.1\",\n  \"publishedAt\": 1774153490772\n}\n\nFile v1.76.1:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"file:./vendor/baoyu-chrome-cdp\",\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.76.1:scripts/vendor/baoyu-chrome-cdp/package.json\n\n{\n  \"name\": \"baoyu-chrome-cdp\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  }\n}\n\nFile v1.76.1:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nFile v1.76.1:scripts/vendor/baoyu-md/src/LICENSE\n\nThis directory contains code adapted from the doocs/md project.\n\nOriginal project: https://github.com/doocs/md\nLicense: WTFPL (Do What The Fuck You Want To Public License)\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2025 Doocs <admin@doocs.org>\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.\n\nArchive v1.69.1: 121 files, 142069 bytes\n\nFiles: scripts/bun.lock (23565b), scripts/copy-to-clipboard.ts (12179b), scripts/md-to-html.ts (4929b), scripts/package.json (207b), scripts/paste-from-clipboard.ts (5659b), scripts/vendor/baoyu-chrome-cdp/package.json (140b), scripts/vendor/baoyu-chrome-cdp/src/index.test.ts (9557b), scripts/vendor/baoyu-chrome-cdp/src/index.ts (17001b), scripts/vendor/baoyu-md/package.json (450b), scripts/vendor/baoyu-md/src/cli.ts (5831b), scripts/vendor/baoyu-md/src/code-themes/1c-light.min.css (1123b), scripts/vendor/baoyu-md/src/code-themes/a11y-dark.min.css (1158b), scripts/vendor/baoyu-md/src/code-themes/a11y-light.min.css (1146b), scripts/vendor/baoyu-md/src/code-themes/agate.min.css (1357b), scripts/vendor/baoyu-md/src/code-themes/an-old-hope.min.css (961b), scripts/vendor/baoyu-md/src/code-themes/androidstudio.min.css (611b), scripts/vendor/baoyu-md/src/code-themes/arduino-light.min.css (844b), scripts/vendor/baoyu-md/src/code-themes/arta.min.css (673b), scripts/vendor/baoyu-md/src/code-themes/ascetic.min.css (454b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark-reasonable.min.css (1193b), scripts/vendor/baoyu-md/src/code-themes/atom-one-dark.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/atom-one-light.min.css (856b), scripts/vendor/baoyu-md/src/code-themes/brown-paper.min.css (656b), scripts/vendor/baoyu-md/src/code-themes/codepen-embed.min.css (600b), scripts/vendor/baoyu-md/src/code-themes/color-brewer.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/dark.min.css (625b), scripts/vendor/baoyu-md/src/code-themes/default.min.css (1144b), scripts/vendor/baoyu-md/src/code-themes/devibeans.min.css (1080b), scripts/vendor/baoyu-md/src/code-themes/docco.min.css (837b), scripts/vendor/baoyu-md/src/code-themes/far.min.css (669b), scripts/vendor/baoyu-md/src/code-themes/felipec.min.css (1181b), scripts/vendor/baoyu-md/src/code-themes/foundation.min.css (779b), scripts/vendor/baoyu-md/src/code-themes/github-dark-dimmed.min.css (1251b), scripts/vendor/baoyu-md/src/code-themes/github-dark.min.css (1315b), scripts/vendor/baoyu-md/src/code-themes/github.min.css (1309b), scripts/vendor/baoyu-md/src/code-themes/gml.min.css (787b), scripts/vendor/baoyu-md/src/code-themes/googlecode.min.css (835b), scripts/vendor/baoyu-md/src/code-themes/gradient-dark.min.css (1089b), scripts/vendor/baoyu-md/src/code-themes/gradient-light.min.css (1112b), scripts/vendor/baoyu-md/src/code-themes/grayscale.min.css (1674b), scripts/vendor/baoyu-md/src/code-themes/hybrid.min.css (897b), scripts/vendor/baoyu-md/src/code-themes/idea.min.css (906b), scripts/vendor/baoyu-md/src/code-themes/intellij-light.min.css (1051b), scripts/vendor/baoyu-md/src/code-themes/ir-black.min.css (694b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-dark.min.css (971b), scripts/vendor/baoyu-md/src/code-themes/isbl-editor-light.min.css (952b), scripts/vendor/baoyu-md/src/code-themes/kimbie-dark.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/kimbie-light.min.css (652b), scripts/vendor/baoyu-md/src/code-themes/lightfair.min.css (831b), scripts/vendor/baoyu-md/src/code-themes/lioshi.min.css (715b), scripts/vendor/baoyu-md/src/code-themes/magula.min.css (642b), scripts/vendor/baoyu-md/src/code-themes/mono-blue.min.css (631b), scripts/vendor/baoyu-md/src/code-themes/monokai-sublime.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/monokai.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/night-owl.min.css (1421b), scripts/vendor/baoyu-md/src/code-themes/nnfx-dark.min.css (1411b), scripts/vendor/baoyu-md/src/code-themes/nnfx-light.min.css (1412b), scripts/vendor/baoyu-md/src/code-themes/nord.min.css (2684b), scripts/vendor/baoyu-md/src/code-themes/obsidian.min.css (882b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-dark.min.css (1095b), scripts/vendor/baoyu-md/src/code-themes/panda-syntax-light.min.css (1069b), scripts/vendor/baoyu-md/src/code-themes/paraiso-dark.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/paraiso-light.min.css (637b), scripts/vendor/baoyu-md/src/code-themes/pojoaque.min.css (814b), scripts/vendor/baoyu-md/src/code-themes/purebasic.min.css (734b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-dark.min.css (815b), scripts/vendor/baoyu-md/src/code-themes/qtcreator-light.min.css (810b), scripts/vendor/baoyu-md/src/code-themes/rainbow.min.css (826b), scripts/vendor/baoyu-md/src/code-themes/routeros.min.css (862b), scripts/vendor/baoyu-md/src/code-themes/school-book.min.css (664b), scripts/vendor/baoyu-md/src/code-themes/shades-of-purple.min.css (854b), scripts/vendor/baoyu-md/src/code-themes/srcery.min.css (795b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-dark.min.css (1271b), scripts/vendor/baoyu-md/src/code-themes/stackoverflow-light.min.css (1285b), scripts/vendor/baoyu-md/src/code-themes/sunburst.min.css (950b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-dark.min.css (1234b), scripts/vendor/baoyu-md/src/code-themes/tokyo-night-light.min.css (1235b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-blue.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/tomorrow-night-bright.min.css (648b), scripts/vendor/baoyu-md/src/code-themes/vs.min.css (640b)\n\nFile v1.69.1:SKILL.md\n\n---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\nversion: 1.56.1\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md existence (priority order):\n\n```bash\n# macOS, Linux, WSL, Git Bash\ntest -f .baoyu-skills/baoyu-post-to-weibo/EXTEND.md && echo \"project\"\ntest -f \"${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"xdg\"\ntest -f \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\" && echo \"user\"\n```\n\n```powershell\n# PowerShell (Windows)\nif (Test-Path .baoyu-skills/baoyu-post-to-weibo/EXTEND.md) { \"project\" }\n$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { \"$HOME/.config\" }\nif (Test-Path \"$xdg/baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"xdg\" }\nif (Test-Path \"$HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md\") { \"user\" }\n```\n\n┌──────────────────────────────────────────────────┬───────────────────┐\n│                       Path                       │     Location      │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ .baoyu-skills/baoyu-post-to-weibo/EXTEND.md      │ Project directory │\n├──────────────────────────────────────────────────┼───────────────────┤\n│ $HOME/.baoyu-skills/baoyu-post-to-weibo/EXTEND.md│ User home         │\n└──────────────────────────────────────────────────┴───────────────────┘\n\n┌───────────┬───────────────────────────────────────────────────────────────────────────┐\n│  Result   │                                  Action                                   │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Found     │ Read, parse, apply settings                                               │\n├───────────┼───────────────────────────────────────────────────────────────────────────┤\n│ Not found │ Use defaults                                                              │\n└───────────┴───────────────────────────────────────────────────────────────────────────┘\n\n**EXTEND.md Supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Override title (max 32 chars, truncated if longer) |\n| `--summary <text>` | Override summary (max 44 chars, auto-regenerated if longer) |\n| `--profile <dir>` | Custom Chrome profile |\n\n**Frontmatter**: `title`, `summary`, `cover_image` supported in YAML front matter.\n\n**Character Limits**:\n- Title: 32 characters max (truncated with warning if longer)\n- Summary/导语: 44 characters max (auto-regenerated from content if longer)\n\n**Article Workflow**:\n1. Opens `https://card.weibo.com/article/v3/editor`\n2. Clicks \"写文章\" button, waits for editor to become editable\n3. Fills title (validated for 32-char limit)\n4. Fills summary/导语 (validated for 44-char limit)\n5. Inserts HTML content into ProseMirror editor via paste\n6. Replaces image placeholders one by one (copy image → select placeholder → paste)\n\n**Post-Composition Check**: The script automatically verifies after all images are inserted:\n- Remaining `WBIMGPH_` placeholders in editor content\n- Expected vs actual image count\n\nIf the check fails (warnings in output), alert the user with the specific issues before they publish.\n\n---\n\n## Troubleshooting\n\n### Chrome debug port not ready\n\nIf a script fails with `Chrome debug port not ready` or `Unable to connect`, kill existing Chrome CDP instances first, then retry:\n\n```bash\npkill -f \"Chrome.*remote-debugging-port\" 2>/dev/null; pkill -f \"Chromium.*remote-debugging-port\" 2>/dev/null; sleep 2\n```\n\n**Important**: This should be done automatically -- when encountering this error, kill Chrome CDP instances and retry the command without asking the user.\n\n## Notes\n\n- First run: manual login required (session persists)\n- All scripts only fill content into the browser, user must review and publish manually\n- Cross-platform: macOS, Linux, Windows\n\n## Extension Support\n\nCustom configurations via EXTEND.md. See **Preferences** section for paths and supported options.\n\nFile v1.69.1:_meta.json\n\n{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.69.1\",\n  \"publishedAt\": 1773684116991\n}\n\nFile v1.69.1:scripts/package.json\n\n{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"file:./vendor/baoyu-chrome-cdp\",\n    \"baoyu-md\": \"file:./vendor/baoyu-md\"\n  }\n}\n\nFile v1.69.1:scripts/vendor/baoyu-chrome-cdp/package.json\n\n{\n  \"name\": \"baoyu-chrome-cdp\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  }\n}\n\nFile v1.69.1:scripts/vendor/baoyu-md/package.json\n\n{\n  \"name\": \"baoyu-md\",\n  \"private\": true,\n  \"version\": \"0.1.0\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": \"./src/index.ts\"\n  },\n  \"dependencies\": {\n    \"fflate\": \"^0.8.2\",\n    \"front-matter\": \"^4.0.2\",\n    \"highlight.js\": \"^11.11.1\",\n    \"juice\": \"^11.0.1\",\n    \"marked\": \"^15.0.6\",\n    \"reading-time\": \"^1.5.0\",\n    \"remark-cjk-friendly\": \"^1.1.0\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"unified\": \"^11.0.5\"\n  }\n}\n\nFile v1.69.1:scripts/vendor/baoyu-md/src/LICENSE\n\nThis directory contains code adapted from the doocs/md project.\n\nOriginal project: https://github.com/doocs/md\nLicense: WTFPL (Do What The Fuck You Want To Public License)\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2025 Doocs <admin@doocs.org>\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.","readmeExcerpt":"Skill: Baoyu Post To Weibo Owner: jimliu Summary: Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when... Tags: latest:1.117.3 Version history: v1.117.3 | 2026-06-01T03:31:21.726Z | user Fix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1. v1.117.2 | 2026-05-18T02:15:51.591Z | user ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"${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"},{"language":"bash","snippet":"${BUN_X} {baseDir}/scripts/weibo-article.ts article.md\n${BUN_X} {baseDir}/scripts/weibo-article.ts article.md --cover ./cover.jpg"},{"language":"bash","snippet":"pkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2"},{"language":"bash","snippet":"${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"},{"language":"bash","snippet":"${BUN_X} {baseDir}/scripts/weibo-article.ts article.md\n${BUN_X} {baseDir}/scripts/weibo-article.ts article.md --cover ./cover.jpg"},{"language":"bash","snippet":"pkill -f \"remote-debugging-port.*baoyu-skills/chrome-profile\" 2>/dev/null; sleep 2"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: baoyu-post-to-weibo\ndescription: 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 \"微博头条文章\".\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 text, images, videos, and long-form articles to Weibo via real Chrome browser (bypasses anti-bot detection).\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\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\nCheck EXTEND.md in priority order — the first one 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\nIf none found, use defaults.\n\n**EXTEND.md supports**: Default Chrome profile\n\n## Prerequisites\n\n- Google Chrome or Chromium\n- `bun` runtime\n- First run: log in to Weibo manually (session saved)\n\n---\n\n## Regular Posts\n\nText + images/videos (max 18 files total). Posted on 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**Parameters**:\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**Note**: Script opens browser with content filled in. User reviews and publishes manually.\n\n---\n\n## Headline Articles (头条文章)\n\nLong-form Markdown articles published at `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**Parameters**:\n| Parameter | Description |\n|-----------|-------------|\n| `<markdown>` | Markdown file (positional) |\n| `--cover <path>` | Cover image |\n| `--title <text>` | Overri"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7csrrndw79hpke5d0gsnx93d82k67r\",\n  \"slug\": \"baoyu-post-to-weibo\",\n  \"version\": \"1.117.3\",\n  \"publishedAt\": 1780284681726\n}"},{"path":"scripts/package.json","content":"{\n  \"name\": \"baoyu-post-to-weibo-scripts\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"baoyu-chrome-cdp\": \"^0.1.1\",\n    \"baoyu-md\": \"^0.1.1\"\n  }\n}"},{"path":"skill-card.md","content":"## Description:\n\nPosts content to Weibo (微博), including regular text, image, and video posts, and headline articles (头条文章) from Markdown input via Chrome CDP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[jimliu](https://clawhub.ai/user/jimliu)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to prepare Weibo posts and long-form Weibo headline articles from text, media files, or Markdown. The browser remains open so the user can review and publish manually.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill uses an authenticated browser session, system clipboard automation, real paste keystrokes, and process control.\n\nMitigation: Review the skill before installing, run it with an isolated Chrome profile, and verify all browser content before publishing.\n\nRisk: The npx fallback can download and run the Bun runtime path at execution time.\n\nMitigation: Prefer a locally installed trusted Bun runtime instead of the npx fallback.\n\nRisk: Clipboard contents, authenticated Weibo session state, and the predictable temporary article file may be exposed on shared machines.\n\nMitigation: Avoid running the skill on shared machines or clear sensitive clipboard and temporary content after use.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/jimliu/skills/baoyu-post-to-weibo)\n- [Skill homepage](https://github.com/JimLiu/baoyu-skills#baoyu-post-to-weibo)\n- [Weibo homepage](https://weibo.com/)\n- [Weibo article editor](https://card.weibo.com/article/v3/editor)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown with inline shell commands and browser-composition guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Produces browser-filled Weibo drafts for manual user review and publishing.]\n\n## Skill Version(s):\n\n1.117.3 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when... Skill: Baoyu Post To Weibo Owner: jimliu Summary: Posts content to Weibo (微博). Supports regular posts with text, images, and videos, and headline articles (头条文章) with Markdown input via Chrome CDP. Use when... Tags: latest:1.117.3 Version history: v1.117.3 | 2026-06-01T03:31:21.726Z | user Fix stale npm shared package dependency pins for baoyu-md and baoyu-chrome-cdp 0.1.1. v1.117.2 | 2026-05-18T02:15:51.591Z | user","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1557,"uniquenessScore":45,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T08:04:30.670Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T08:04:30.670Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T01:06:11.127Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}