Loading...
Loading...
Automatically publish HTML articles to WeChat Official Account draft box (Crayfish Adaptation Version). Automatically guide users to configure IP whitelist for first-time use. Trigger when users say "Push to WeChat", "Publish to Official Account", or "Upload Draft".
npx skill4agent add bnd-1/wechat_article_mini wechat-draft-publisherpip3 install -r skills/wechat-draft-publisher/requirements.txtpython publisher.py --query-ip>>> Your public IP is: x.x.x.x
Please add this IP to the WeChat Official Account backend:
1. Log in to https://developers.weixin.qq.com/platform
2. Settings & Development → Basic Configuration → IP Whitelist
3. Add IP: x.x.x.xTwo configurations are required for first-time use:
1. IP Whitelist: I have found your server IP is x.x.x.x
Please log in to the WeChat Official Account backend, and add this IP in Settings & Development→Basic Configuration→IP Whitelist
2. AppID and AppSecret:
Copy AppID and AppSecret from the same page (Basic Configuration)
The publishing tool will automatically guide you to fill them in when running
Let me know once configured, and I will help you publish!python publisher.py --title "Article Title" --content article.htmlpython publisher.py \
--title "Article Title" \
--content xxx_formatted.html \
--cover cover.png \
--author "Crayfish"*_formatted.html.htmlcover.png✅ Article has been pushed to the draft box!
Next steps:
1. Log in to https://developers.weixin.qq.com/platform
2. Enter "Draft Box"
3. Preview the effect, then publish after confirmation
⚠️ Drafts will not be published automatically, you can edit them in the backend before publishing| Error | Cause | Solution |
|---|---|---|
| IP is not in whitelist | Run |
| Invalid credential | Check |
| Title is too long | The tool will automatically truncate it, no manual handling needed |
| Official Account type does not support | Authenticated service account is required |
~/.wechat-publisher/config.json{
"appid": "xxx",
"appsecret": "xxx"
}Write article(tech-writer/pm-writer) → Format beautification(formatter) → Push to WeChat(this skill)