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 (图文) with multiple images. Use when user mentions "发布公众号", "post to wechat", "微信公众号", or "图文/文章".
Author
Category
Office AutomationInstall
Download and extract to your skills directory
Copy command and send to OpenClaw for auto-install:
WeChat Official Account Auto-Publishing Tool - baoyu-post-to-wechat
Skill Overview
baoyu-post-to-wechat is a Claude skill that automatically publishes content to WeChat Official Accounts. It supports publishing articles and multi-image posts using either an API or a Chrome browser automation workflow. It is compatible with HTML, Markdown, and plain text input.
Use Cases
1. Daily Publishing for Content Creators
When you need to regularly publish Markdown notes or blog posts to your Official Account, you can simply provide a Markdown file. The skill will automatically convert it into a themed HTML article and publish it—no manual formatting required.
2. Automated Content Operations
For operations scenarios that require bulk management of drafts or scheduled publishing, you can use the API method to quickly push content to the Official Account draft box, where it can later be managed and published on the WeChat Official Platform.
3. Short-Form Multi-Image Posts
Suitable for publishing short content containing multiple images (up to 9 images). Using Chrome browser automation, it performs the edit and publish steps for you, helping keep your Official Account updated at its usual cadence.
Core Features
Article Publishing (supports both API and browser methods)
Multi-Image Publishing (browser method)
Configuration and Extensions
.env files; they are read automatically according to priority.Frequently Asked Questions
How do I obtain the WeChat Official Account API credentials?
Log in to WeChat Official Platform, go to Develop → Basic Configuration, and get your AppID and AppSecret. Save the credentials to a .baoyu-skills/.env file:
WECHAT_APP_ID=YourAppID
WECHAT_APP_SECRET=YourAppSecretWhat’s the difference between API publishing and browser publishing?
API publishing: Fast, suitable for batch publishing and automation. Requires API credentials. Supports advanced features like draft management and comment control.
Browser publishing: Slower, does not require API credentials. The first run requires QR-code login. Suitable for simple scenarios where you don’t want to configure API.
Does WeChat Official Account support Markdown?
The WeChat Official Platform itself does not support publishing Markdown directly. This skill uses the markdown-to-html skill to convert Markdown into themed HTML, then publishes it. It also supports automatically extracting the title, summary, author, and inline images.
How do I configure the comment switch for an article?
When using the API publishing method, set it in the EXTEND.md configuration file:
need_open_comment: 1 # Whether comments are enabled (1/0)
only_fans_can_comment: 0 # Whether only followers can comment (1/0)Or specify it in CLI arguments. Priority order: CLI arguments > Frontmatter > EXTEND.md.
Where is the article cover image obtained during publishing?
The cover image is searched in the following priority order:
CLI --cover parameter > Frontmatter (featureImage/coverImage/cover/image) > Article directory imgs/cover.png > The first inline image in the content.
If none are found, you must provide the cover image manually.