baoyu-post-to-wechat

Publishes markdown and HTML articles to WeChat Official Accounts via API or Chrome automation.

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-post-to-wechat-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-post-to-wechat
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/assignment-generator/antigravity-skills-main/antigravity-skills-main/skills/baoyu-post-to-wechat
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-post-to-wechat-virahitvin8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @jsquash/webp, baoyu-chrome-cdp, baoyu-md, jimp, socks, and includes scripts (resource) and references (resource) components.

What problem does it solve? Publishing content to WeChat Official Accounts (微信公众号) normally requires manual copy-pasting into the web editor, re-uploading images one by one, and reformatting markdown. This Skill automates the entire publishing pipeline from a local markdown or HTML file to a saved WeChat draft. ## Core Features & Use Cases - Dual Publishing Methods: Post articles (文章) through the official WeChat API for speed, or drive Chrome via CDP when API credentials are unavailable; a remote-api mode tunnels API calls through an SSH SOCKS5 proxy when your IP is not on WeChat's allowlist. - Markdown-to-WeChat Rendering: Converts markdown to themed HTML (default, grace, simple, modern) with color presets, automatic title/summary extraction, mermaid diagram rendering, and bottom-citation conversion for external links. - Image-Text Posts (贴图): Uploads up to 9 images with auto-compressed titles and content for short-form posts. - Multi-Account Support: Manages multiple Official Accounts via EXTEND.md with per-account credentials, Chrome profiles, and publishing defaults. - Use Case: A blogger writes a technical article in markdown with inline images and runs one command to have it rendered with a theme, images uploaded, and saved as a draft in their WeChat Official Account. ## Quick Start Ask the assistant to publish your markdown article to your WeChat Official Account, for example: "Post article.md to my WeChat Official Account using the API method with the grace theme."

Frequently Asked Questions about baoyu-post-to-wechat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish a markdown article to a WeChat Official Account?

Run the wechat-api.ts script with your markdown file and a theme, such as wechat-api.ts article.md --theme grace. The script renders the markdown to themed HTML, uploads inline images, and saves the result as a draft via the WeChat API.

What is the difference between the API and browser publishing methods for WeChat?

The API method is fast and requires WECHAT_APP_ID and WECHAT_APP_SECRET credentials with your IP on WeChat's allowlist. The browser method drives Chrome via CDP with a logged-in session, which is slower but needs no API credentials.

Can I post to WeChat if my IP is not on the API allowlist?

Yes, use the remote-api method, which tunnels only the outbound calls to api.weixin.qq.com through an SSH SOCKS5 proxy on a server whose IP is allowlisted. All rendering and image processing still happen locally, and the AppSecret never leaves your machine.

How do I manage multiple WeChat Official Accounts in one configuration?

Add an accounts block to EXTEND.md with an alias, credentials, and defaults per account. Publishing scripts accept an --account flag, and with two or more accounts the workflow prompts you to select one before publishing.

Why does my WeChat article need a cover image?

The WeChat draft/add API requires a thumb_media_id for news-type articles. Provide one via the --cover flag, frontmatter coverImage field, an imgs/cover.png file, or let the script fall back to the first inline image.

What are the limits for WeChat image-text posts?

Image-text posts (贴图) support up to 9 images, a title of at most 20 characters, and content of at most 1000 characters. The browser script auto-compresses titles and content that exceed these limits.