iamzifei/wechat-article-publisher-skill
Claude Skill that publish on Wechat articles (微信公众号发布)
35 stars6 forksUpdated Jan 16, 2026
npx skills add iamzifei/wechat-article-publisher-skillREADME
WeChat Article Publisher Skill
English | 中文
Publish Markdown or HTML articles to WeChat Official Account drafts with one command. Say goodbye to tedious copy-paste-format workflows.
v1.1.0 — API-based publishing for reliability and speed
The Problem
If you write in Markdown, publishing to WeChat Official Account (公众号) is a painful process:
| Pain Point | Description |
|---|---|
| Format Loss | Copy from Markdown editor -> Paste to WeChat -> All formatting gone |
| Manual Formatting | Re-apply each H2, bold, link manually — 15-20 min per article |
| Image Upload Hassle | Upload images one by one through WeChat's media library |
| Multiple Steps | Switch between markdown editor, image uploads, and WeChat admin panel |
Time Comparison
| Task | Manual | With This Skill |
|---|---|---|
| Format conversion | 15-20 min | 0 (automatic) |
| Image upload | 5-10 min | 0 (automatic) |
| Copy & paste content | 2-3 min | 0 (automatic) |
| Total | 20-30 min | < 1 min |
30x efficiency improvement
The Solution
This skill uses WeChat's API for direct, reliable publishing:
Markdown/HTML File
| Python parsing
v
Structured Data (title, content, images)
| WeChat API
v
Draft in WeChat Official Account (never auto-publishes)
Key Features
- API-Based: Direct API calls, no browser automation needed
- Cross-Platform: Works on macOS, Linux, and Windows
- Dual Format: Supports both Markdown (.md) and HTML (.html) files
- Format Preserved: HTML formatting preserved, Markdown auto-converted
- Image Auto-Upload: Images in your content are automatically uploaded
- Safe by Design: Only saves as draft, never publishes automatically
- 小绿书 Support: Publish as image-text format (newspic) for visual content
Requirements
| Requirement | Details |
|---|---|
| Claude Code | claude.ai/code |
| Python 3.9+ | Standard library only (no extra dependencies) |
| WECHAT_API_KEY | Get from wx.limyai.com |
| WeChat Account | Authorized on wx.limyai.com |
Installation
Step 1: Clone the Repository
git clone https://github.com/iamzifei/wechat-article-publisher-skill.git
Step 2: Copy Skill to Claude
cp -r wechat-article-publisher-skill/skills/wechat-article-publisher ~/.claude/skills/
Step 3: Configure API Key
cd wechat-article-publisher-skill
cp .env.example .env
# Edit .env and set your WECHAT_API_KEY
Usage
Natural Language
把 /path/to/article.md 发布到微信公众号
Publish ~/Documents/my-post.md to WeChat
帮我把这篇文章发到公众号:~/articles/ai-tools.md
把这个HTML文章发布到公众号:~/newsletter/issue-01.html
Publish the HTML article ~/export/formatted-post.html to WeChat
Skill Command
/wechat-article-publisher /path/to/article.md
/wechat-article-publisher /path/to/article.html
With Options
# Publish as 小绿书 (image-text mode)
/wechat-article-publisher /path/to/article.md --type newspic
Workflow Steps
[1/4] Check API Key...
-> Load WECHAT_API_KEY from .env
[2/4] List WeChat Accounts...
-> Find authorized accounts
-> Auto-select if only one, ask if multiple
[3/4] Publish Article...
-> Detect file format (Markdown or HTML)
-> Parse content (title, body, images)
-> Call WeChat API
-> Upload images automatically
[4/4] Report Result...
-> Show success message
-> Remind to review and publish manually
Supported Formats
Markdown (.md)
| Syntax | Result |
|---|---|
# H1 | Article title (extracted, not in body) |
## H2 | Section headers |
### H3 | Sub-section headers |
**bold** | Bold text |
*italic* | Italic text |
[text](url) | Hyperlinks |
> quote | Blockquotes |
- item | Unordered lists |
1. item | Ordered lists |
code | Code blocks |
 | Images (auto-uploaded) |
HTML (.html)
| Element | Result |
|---|---|
<title> or <h1> | Article title |
<h2>, <h3> | Section headers |
<strong>, <b> | Bold text |
<em>, <i> | Italic text |
<a href=""> | Hyperlinks |
<blockquote> | Blockquotes |
<ul>, <ol> | Lists |
<table> | Tables (preserved) |
<img src=""> | Images (auto-uploaded) |
| Inline styles | Preserved |
Article Types
news (Default)
Standard WeChat article format with full rich text support.
newspic (小绿书)
Image-focused format for visual content:
- Up to 20 images extracted from content
- Text limited to 1000 characters
- Perfect for photo-heavy posts
Example
Input: article.md
# 5 AI Tools Worth Watching in 2024

AI tools exploded in 20
...
Publisher
Statistics
Stars35
Forks6
Open Issues1
LicenseMIT License
CreatedJan 13, 2026