/baoyu-post-to-wechat
Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-text posting (贴图, formerly 图文) with multiple images. Markdown article workflows default to converting ordinary external links
$ npx -y skills add guanyang/open-agent-hub --skill baoyu-post-to-wechat --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/baoyu-post-to-wechat
Context preview
The summary Claude sees to decide when to auto-load this skill.
Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-text posting (贴图, formerly 图文) with multiple images. Markdown article workflows default to converting ordinary external links
SKILL.md
baoyu-post-to-wechat.SKILL.mdname: baoyu-post-to-wechat
description: Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-text posting (贴图, formerly 图文) with multiple images. Markdown article workflows default to converting ordinary external links into bottom citations for WeChat-friendly output. Use when user mentions "发布公众号", "post to wechat", "微信公众号", or "贴图/图文/文章".
version: 1.118.2
metadata:
openclaw:
homepage: https://github.com/JimLiu/baoyu-skills#baoyu-post-to-wechat
requires:
anyBins:
- bun
- npxPost to WeChat Official Account
User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent. 2. **Fallback**: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question. 3. **Batching**: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.
Concrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.
Language
Respond in the user's language. If they write in Chinese, reply in Chinese; if English, English. Keep technical tokens (paths, flags, field names) in English.
Script Directory
`{baseDir}` = this SKILL.md's directory. Resolve `${BUN_X}`: prefer `bun`; else `npx -y bun`; else suggest `brew install oven-sh/bun/bun`.
| Script | Purpose | |--------|---------| | `scripts/wechat-browser.ts` | Image-text posts (图文) | | `scripts/wechat-article.ts` | Article posting via browser (文章) | | `scripts/wechat-api.ts` | Article posting via API (文章) | | `scripts/md-to-wechat.ts` | Markdown → WeChat-ready HTML with image placeholders | | `scripts/check-permissions.ts` | Verify environment & permissions |
Preferences (EXTEND.md)
Check these paths in order; first hit wins:
| Path | Scope | |------|-------| | `.baoyu-skills/baoyu-post-to-wechat/EXTEND.md` | Project | | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-wechat/EXTEND.md` | XDG | | `$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md` | User home |
Found → read, parse, apply. Not found → run first-time setup (`references/config/first-time-setup.md`) before anything else.
**Minimum keys** (case-insensitive, accept `1/0` or `true/false`):
| Key | Default | Mapping | |-----|---------|---------| | `default_author` | empty | Fallback for `author` when CLI/frontmatter not provided | | `need_open_comment` | `1` | `articles[].need_open_comment` in `draft/add` | | `only_fans_can_comment` | `0` | `articles[].only_fans_can_comment` in `draft/add` |
**Recommended EXTEND.md**:
default_theme: default
default_color: blue
default_publish_method: browser
default_author: 宝玉
need_open_comment: 1
only_fans_can_comment: 0
chrome_profile_path: /path/to/chrome/profile
# Remote API publishing (optional) — only set if WeChat's IP allowlist
# excludes your local machine. See "Remote API Method" below.
# remote_publish_host: server.example.com
# remote_publish_user: deploy
# remote_publish_port: 22
# remote_publish_identity_file: ~/.ssh/id_ed25519
# remote_publish_known_hosts_file: ~/.ssh/known_hosts
# remote_publish_strict_host_key_checking: accept-new
# remote_publish_connect_timeout: 10
# remote_publish_proxy_jump: bastion.example.com
Raw `ssh` / `scp` options are intentionally not supported; only the typed keys above are honored. Authentication is SSH key only (no passwords).
**Theme options**: default, grace, simple, modern. **Color presets**: blue, green, vermilion, yellow, purple, sky, rose, olive, black, gray, pink, red, orange (or hex).
**Value priority**: CLI args → frontmatter → EXTEND.md (account-level → global) → skill defaults.
Multi-Account Support
EXTEND.md supports an `accounts:` block for managing multiple Official Accounts. With 2+ entries, the workflow inserts a Step 0.5 to prompt for account selection (or auto-selects based on `default: true` or `--account <alias>`).
Full details — compatibility rules, per-account keys, credential resolution, per-account Chrome profiles, CLI usage — in `references/multi-account.md`.
Pre-flight Check (Optional)
Before first use, suggest the environment check (user can skip):
${BUN_X} {baseDir}/scripts/check-permissions.tsChecks: Chrome, profile isolation, Bun, Accessibility, clipboard, paste keystroke, API credentials, Chrome conflicts.
| Check fails | Fix | |-------------|-----| | Chrome | Install Chrome or set `WECHAT_BROWSER_CHROME_PATH` | | Profile dir | Shared profile at `baoyu-skills/chrome-profile` | | Bun runtime | `brew install oven-sh/bun/bun` or `npm install -g bun` | | Accessibility (macOS) | System Settings → Privacy & Security → Accessibility → enable terminal app | | Clipboard copy | Ensure Swift/AppKit (macOS: `xcode-select --install`) | | Paste keystroke (Linux) | Install `xdotool` (X11) or `ydotool` (Wayland) | | API credentials | Follow guided setup in Step 2, or set in `.baoyu-skills/.env` |
Image-Text Posting (图文)
Short posts with multiple images (up to 9):
${BUN_X} {baseDir}/scripts/wechat-browser.ts --markdown article.md --images ./images/
${BUN_X} {baseDir}/scripts/wechat-browser.ts --title "标题" --content "内容" --image img.png --submitDetails: `references/image-text-posting.md`.
Article Posting Workflow (文章)
- [ ] Step 0: Load preferences (EXTEND.md)
- [ ] Step 0.5: Resolve account (multi-account only — see references/multi-account.md)
- [ ] Step 1: Determine input type
- [ ] Step 2: Select method and configure credentials
- [ ] Step 3: Resolve theme/color and validate metadata
- [ ] Step 4: Publish to WeChat
- [ ] Step 5: Report com
Read more
name: baoyu-post-to-wechat
description: Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-text posting (贴图, formerly 图文) with multiple images. Markdown article workflows default to converting ordinary external links into bottom citations for WeChat-friendly output. Use when user mentions "发布公众号", "post to wechat", "微信公众号", or "贴图/图文/文章".
version: 1.118.2
metadata:
openclaw:
homepage: https://github.com/JimLiu/baoyu-skills#baoyu-post-to-wechat
requires:
anyBins:
- bun
- npxPost to WeChat Official Account
User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent. 2. **Fallback**: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question. 3. **Batching**: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.
Concrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.
Language
Respond in the user's language. If they write in Chinese, reply in Chinese; if English, English. Keep technical tokens (paths, flags, field names) in English.
Script Directory
`{baseDir}` = this SKILL.md's directory. Resolve `${BUN_X}`: prefer `bun`; else `npx -y bun`; else suggest `brew install oven-sh/bun/bun`.
| Script | Purpose | |--------|---------| | `scripts/wechat-browser.ts` | Image-text posts (图文) | | `scripts/wechat-article.ts` | Article posting via browser (文章) | | `scripts/wechat-api.ts` | Article posting via API (文章) | | `scripts/md-to-wechat.ts` | Markdown → WeChat-ready HTML with image placeholders | | `scripts/check-permissions.ts` | Verify environment & permissions |
Preferences (EXTEND.md)
Check these paths in order; first hit wins:
| Path | Scope | |------|-------| | `.baoyu-skills/baoyu-post-to-wechat/EXTEND.md` | Project | | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-wechat/EXTEND.md` | XDG | | `$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md` | User home |
Found → read, parse, apply. Not found → run first-time setup (`references/config/first-time-setup.md`) before anything else.
**Minimum keys** (case-insensitive, accept `1/0` or `true/false`):
| Key | Default | Mapping | |-----|---------|---------| | `default_author` | empty | Fallback for `author` when CLI/frontmatter not provided | | `need_open_comment` | `1` | `articles[].need_open_comment` in `draft/add` | | `only_fans_can_comment` | `0` | `articles[].only_fans_can_comment` in `draft/add` |
**Recommended EXTEND.md**:
default_theme: default default_color: blue default_publish_method: browser default_author: 宝玉 need_open_comment: 1 only_fans_can_comment: 0 chrome_profile_path: /path/to/chrome/profile # Remote API publishing (optional) — only set if WeChat's IP allowlist # excludes your local machine. See "Remote API Method" below. # remote_publish_host: server.example.com # remote_publish_user: deploy # remote_publish_port: 22 # remote_publish_identity_file: ~/.ssh/id_ed25519 # remote_publish_known_hosts_file: ~/.ssh/known_hosts # remote_publish_strict_host_key_checking: accept-new # remote_publish_connect_timeout: 10 # remote_publish_proxy_jump: bastion.example.com
Raw `ssh` / `scp` options are intentionally not supported; only the typed keys above are honored. Authentication is SSH key only (no passwords).
**Theme options**: default, grace, simple, modern. **Color presets**: blue, green, vermilion, yellow, purple, sky, rose, olive, black, gray, pink, red, orange (or hex).
**Value priority**: CLI args → frontmatter → EXTEND.md (account-level → global) → skill defaults.
Multi-Account Support
EXTEND.md supports an `accounts:` block for managing multiple Official Accounts. With 2+ entries, the workflow inserts a Step 0.5 to prompt for account selection (or auto-selects based on `default: true` or `--account <alias>`).
Full details — compatibility rules, per-account keys, credential resolution, per-account Chrome profiles, CLI usage — in `references/multi-account.md`.
Pre-flight Check (Optional)
Before first use, suggest the environment check (user can skip):
${BUN_X} {baseDir}/scripts/check-permissions.tsChecks: Chrome, profile isolation, Bun, Accessibility, clipboard, paste keystroke, API credentials, Chrome conflicts.
| Check fails | Fix | |-------------|-----| | Chrome | Install Chrome or set `WECHAT_BROWSER_CHROME_PATH` | | Profile dir | Shared profile at `baoyu-skills/chrome-profile` | | Bun runtime | `brew install oven-sh/bun/bun` or `npm install -g bun` | | Accessibility (macOS) | System Settings → Privacy & Security → Accessibility → enable terminal app | | Clipboard copy | Ensure Swift/AppKit (macOS: `xcode-select --install`) | | Paste keystroke (Linux) | Install `xdotool` (X11) or `ydotool` (Wayland) | | API credentials | Follow guided setup in Step 2, or set in `.baoyu-skills/.env` |
Image-Text Posting (图文)
Short posts with multiple images (up to 9):
${BUN_X} {baseDir}/scripts/wechat-browser.ts --markdown article.md --images ./images/
${BUN_X} {baseDir}/scripts/wechat-browser.ts --title "标题" --content "内容" --image img.png --submitDetails: `references/image-text-posting.md`.
Article Posting Workflow (文章)
- [ ] Step 0: Load preferences (EXTEND.md) - [ ] Step 0.5: Resolve account (multi-account only — see references/multi-account.md) - [ ] Step 1: Determine input type - [ ] Step 2: Select method and configure credentials - [ ] Step 3: Resolve theme/color and validate metadata - [ ] Step 4: Publish to WeChat - [ ] Step 5: Report com
A lightweight, zero-dependency CLI tool to manage and activate capabilities for AI coding assistants (such as Claude Code, Cursor, Trae, etc.).
Repo: guanyang/open-agent-hub
Other skills on open-agent-hub.
- /advanced-evaluation
This skill should be used for advanced LLM evaluation: LLM-as-judge systems, direct scoring, pairwise comparison, rubric calibration, evaluator bias mitigation, confidence scoring, and automated quality assessment.
Open skill - /algorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing
Open skill - /baoyu-article-illustrator
Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style × Palette three-dimension approach. Use when user asks to "illustrate article", "add images", "generate images for article", or "为文章配图".
Open skill - /baoyu-comic
Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts and batch-capable image generation. Use when user asks to create "知识漫画", "教育漫画", "biography comic", "tutorial comic", or "Logicomix-style comic".
Open skill - /baoyu-compress-image
Compresses images to WebP (default) or PNG with automatic tool selection. Use when user asks to "compress image", "optimize image", "convert to webp", or reduce image file size.
Open skill - /baoyu-cover-image
Generates article cover images with 5 dimensions (type, palette, rendering, text, mood) combining 11 color palettes and 7 rendering styles. Supports cinematic (2.35:1), widescreen (16:9), and square (1:1) aspects. Use when user asks to "generate cover image", "create article
Open skill

