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-tex... Skill: Baoyu Post To Wechat Owner: jimliu Summary: Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-tex... Tags: latest:1.118.2 Version history: v1.118.2 | 2026-06-13T05:01:20.839Z | auto baoyu-post-to-wechat v1.118.2 - Updated internal logic in wechat-api.ts for improved API handling. - Documentation improvements
Rank
62
Safety
84
Downloads
5.4k
Updated
Oct 9, 2026
Version
1.118.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 5.4K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 5.4K downloadsadoption · observed Oct 9, 2026
- Latest release
- 1.118.2release · observed Jun 13, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17dfbhg0khk4fvtnx0stqg0yx83j25z:baoyu-post-to-wechat- 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: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-wechat/snapshot"
Documentation
CLAWHUB
159,115 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
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
- npx
---
# Post 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**:
```md
default_theme: default
default_color: bl_meta.json
{
"ownerId": "kn7csrrndw79hpke5d0gsnx93d82k67r",
"slug": "baoyu-post-to-wechat",
"version": "1.118.2",
"publishedAt": 1781326880839
}references/api-setup.md
# API Credential Setup Guided setup when `WECHAT_APP_ID` / `WECHAT_APP_SECRET` are missing. Invoked by Step 2 of the article-posting workflow. ## Detection Look for the credentials in this order: 1. Env vars `WECHAT_APP_ID` / `WECHAT_APP_SECRET` 2. `<cwd>/.baoyu-skills/.env` with `WECHAT_APP_ID=...` 3. `$HOME/.baoyu-skills/.env` with `WECHAT_APP_ID=...` If none are present, run the guided setup below. ## Guided Setup Show this message to the user and ask where to save: ``` WeChat API credentials not found. To obtain credentials: 1. Visit https://mp.weixin.qq.com 2. Go to: 开发 → 基本配置 3. Copy AppID and AppSecret Where to save? A) Project-level: .baoyu-skills/.env (this project only) B) User-level: ~/.baoyu-skills/.env (all projects) ``` After they choose a location, collect the values (prefer a user-input tool, fall back to a numbered prompt per the User Input Tools rule in SKILL.md) and append: ``` WECHAT_APP_ID=<user_input> WECHAT_APP_SECRET=<user_input> ``` ## Multi-Account Variant If the user has multiple accounts configured (`accounts:` block in EXTEND.md), use prefixed keys instead — see `multi-account.md` → "Credential Resolution".
references/article-posting.md
# Article Posting (文章发表)
Post markdown articles to WeChat Official Account with full formatting support.
## Usage
```bash
# Post markdown article
${BUN_X} ./scripts/wechat-article.ts --markdown article.md
# With theme
${BUN_X} ./scripts/wechat-article.ts --markdown article.md --theme grace
# Disable bottom citations for ordinary external links
${BUN_X} ./scripts/wechat-article.ts --markdown article.md --no-cite
# With explicit options
${BUN_X} ./scripts/wechat-article.ts --markdown article.md --author "作者名" --summary "摘要"
```
## Parameters
| Parameter | Description |
|-----------|-------------|
| `--markdown <path>` | Markdown file to convert and post |
| `--theme <name>` | Theme: default, grace, simple, modern |
| `--no-cite` | Keep ordinary external links inline instead of converting them to bottom citations |
| `--title <text>` | Override title (auto-extracted from markdown) |
| `--author <name>` | Author name |
| `--summary <text>` | Article summary |
| `--html <path>` | Pre-rendered HTML file (alternative to markdown) |
| `--profile <dir>` | Chrome profile directory |
## Markdown Format
```markdown
---
title: Article Title
author: Author Name
---
# Title (becomes article title)
Regular paragraph with **bold** and *italic*.
## Section Header

- List item 1
- List item 2
> Blockquote text
[Link text](https://example.com)
```
Markdown mode converts ordinary external links into bottom citations by default for WeChat-friendly output. Use `--no-cite` to disable that behavior.
## Image Handling
1. **Parse**: Images in markdown are replaced with `WECHATIMGPH_N`
2. **Render**: HTML is generated with placeholders in text
3. **Paste**: HTML content is pasted into WeChat editor
4. **Replace**: For each placeholder:
- Find and select the placeholder text
- Scroll into view
- Press Backspace to delete the placeholder
- Paste the image from clipboard
## Scripts
| Script | Purpose |
|--------|---------|
| `wechat-article.ts` | Main article publishing script |
| `md-to-wechat.ts` | Markdown to HTML with placeholders |
| `md/render.ts` | Markdown rendering with themes |
## Example Session
```
User: /post-to-wechat --markdown ./article.md
Claude:
1. Parses markdown, finds 5 images
2. Generates HTML with placeholders
3. Opens Chrome, navigates to WeChat editor
4. Pastes HTML content
5. For each image:
- Selects WECHATIMGPH_1
- Scrolls into view
- Presses Backspace to delete
- Pastes image
6. Reports: "Article composed with 5 images."
```references/config/first-time-setup.md
---
name: first-time-setup
description: First-time setup flow for baoyu-post-to-wechat preferences
---
# First-Time Setup
## Overview
When no EXTEND.md is found, guide user through preference setup.
**BLOCKING OPERATION**: This setup MUST complete before ANY other workflow steps. Do NOT:
- Ask about content or files to publish
- Ask about themes or publishing methods
- Proceed to content conversion or publishing
ONLY ask the questions in this setup flow, save EXTEND.md, then continue.
## Setup Flow
```
No EXTEND.md found
|
v
+---------------------+
| AskUserQuestion |
| (all questions) |
+---------------------+
|
v
+---------------------+
| Create EXTEND.md |
+---------------------+
|
v
Continue to Step 1
```
## Questions
**Language**: Use user's input language or saved language preference.
Use AskUserQuestion with ALL questions in ONE call:
### Question 1: Default Theme
```yaml
header: "Theme"
question: "Default theme for article conversion?"
options:
- label: "default (Recommended)"
description: "Classic layout - centered title with border, white-on-color H2 (default: blue)"
- label: "grace"
description: "Elegant - text shadows, rounded cards, refined blockquotes (default: purple)"
- label: "simple"
description: "Minimal modern - asymmetric rounded corners, clean whitespace (default: green)"
- label: "modern"
description: "Large rounded corners, pill headings, spacious (default: orange)"
```
### Question 2: Default Color
```yaml
header: "Color"
question: "Default color preset? (theme default if not set)"
options:
- label: "Theme default (Recommended)"
description: "Use the theme's built-in default color"
- label: "blue"
description: "#0F4C81 经典蓝"
- label: "red"
description: "#A93226 中国红"
- label: "green"
description: "#009874 翡翠绿"
```
Note: User can choose "Other" to type any preset name (vermilion, yellow, purple, sky, rose, olive, black, gray, pink, orange) or hex value.
### Question 3: Default Publishing Method
```yaml
header: "Method"
question: "Default publishing method?"
options:
- label: "api (Recommended)"
description: "Fast, requires API credentials (AppID + AppSecret)"
- label: "browser"
description: "Slow, requires Chrome and login session"
- label: "remote-api"
description: "Fast, tunnels WeChat API calls through SSH to a server whose IP is on the WeChat allowlist"
```
If the user selects `remote-api`, prompt for `remote_publish_host` and (optionally) `remote_publish_user`, `remote_publish_identity_file`. These can also be filled in later by editing EXTEND.md.
### Question 4: Default Author
```yaml
header: "Author"
question: "Default author name for articles?"
options:
- label: "No default"
description: "Leave empty, specify per article"
```
Note: User will likely choose "Other" to type their author name.
### Question 5: Open Comments
```yaml
header: "Comments"
question: "EnablAionUi
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!
activepieces
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
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/jimliu/skills/baoyu-post-to-wechat",
"sourceUrl": "https://clawhub.ai/jimliu/skills/baoyu-post-to-wechat",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T04:04:41.627Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-wechat/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-wechat/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T04:04:41.627Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "5.4K downloads",
"href": "https://clawhub.ai/jimliu/baoyu-post-to-wechat",
"sourceUrl": "https://clawhub.ai/jimliu/baoyu-post-to-wechat",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T04:04:41.627Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.118.2",
"href": "https://clawhub.ai/jimliu/baoyu-post-to-wechat",
"sourceUrl": "https://clawhub.ai/jimliu/baoyu-post-to-wechat",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-06-13T05:01:20.839Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-wechat/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-jimliu-baoyu-post-to-wechat/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.118.2",
"description": "baoyu-post-to-wechat v1.118.2 - Updated internal logic in wechat-api.ts for improved API handling. - Documentation improvements in SKILL.md for clarity and accuracy. - Removed legacy file skill-card.md.",
"href": "https://clawhub.ai/jimliu/baoyu-post-to-wechat",
"sourceUrl": "https://clawhub.ai/jimliu/baoyu-post-to-wechat",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-06-13T05:01:20.839Z",
"isPublic": true
}
]
}Record generated Oct 9, 2026.
