WeChat Article Workflow Skill
Follow me for more: X @victor_UWer · WeChat Official Account「从0到AI」
English | 中文
This automated workflow has already grown my WeChat Official Account by 5,000 followers.
An agent skill that runs the whole WeChat Official Account (微信公众号) writing workflow:
topic radar → angle and fact list → outline → article.md → cover.png
→ themed layout → phone-width preview → WeChat drafts box
You talk to your agent ("help me write today's article about X"). The skill tells the agent what
to do at each step, and a zero-dependency Node.js command-line tool (wxpub) does the mechanical
work: fetching trending lists, rendering inline-style HTML, uploading images, and creating the draft.
The skill never publishes to your followers by default. It stops at the drafts box, and you
press 发表 yourself.
Features
| Step | What you get |
|---|
| Topic discovery | wxpub topics pulls Zhihu, Baidu, V2EX, sspai, Hacker News, GitHub, Product Hunt, Google Trends, or any feed you add. No login, no keys. |
| Writing | Rules for titles, openings, short paragraphs, facts versus opinions, and a ban on "please like and share" endings. |
| Cover image | One 16:9 cover per article, used as the draft cover and as the first image of the body. Generated through kie.ai, or bring your own. |
| Layout (排版) | 4 themes (default, green, orange, ink), all inline styles, so the WeChat editor keeps them. |
| Preview | wxpub render --preview writes a 375px-wide preview.html. |
| Drafts box | Uploads the cover and images, creates the draft, prints the 4 settings the official interface cannot set (原创, 赞赏, 合集, ads). |
| End-of-article block | Past-article list, self-introduction, and the account card, added to every article. |
| Notifications | Optional Feishu message with the summary and the to-do list, for scheduled runs. |
| Tests | 200+ offline checks against a mock WeChat server: npm test. |
Requirements
- An agent that loads skills: Claude Code, or any agent that reads
SKILL.md
- Node.js 18 or later (no
npm install needed)
- For the drafts box step only: a WeChat Official Account with its AppID, AppSecret, and an entry in the address allowlist (IP 白名单)
- Optional: a kie.ai key for cover generation, a Feishu app for notifications
Steps 1 to 5 (topic to preview) need no account at all.
Install
Option 1: Claude Code plugin
/plugin marketplace add cl-victor1/wechat-article-workflow-skill
/plugin install wechat-article-workflow@wechat-article-workflow-skill
Option 2: skills command-line tool (works with many agents)
npx skills add cl-victor1/wechat-article-workflow-skill
Option 3: copy the folder
git clone https://github.com/cl-victor1/wechat-article-workflow-skill.git
mkdir -p ~/.claude/skills
cp -r wechat-article-workflow-skill/skills/wechat-article-workflow ~/.claude/skills/
Restart your agent after you install.
Quick start
Make a folder for your articles and open your agent there:
mkdir my-wechat && cd my-wechat
claude
Then just ask:
用 wechat-article-workflow 帮我找今天的选题,写一篇公众号文章,排版后放进草稿箱
The agent will run wxpub init, show you the trending topics, agree on an angle with you, write the
article, make the cover, show you the preview, and create the draft.
Fill in your account (once)
wxpub init creates .wxpub/.env. Fill in at least:
WECHAT_APP_ID=wx...
WECHAT_APP_SECRET=...
WECHAT_AUTHOR=Your pen name
- Open mp.weixin.qq.com → 设置与开发 → 基本配置.
- Copy the AppID, reset and copy the AppSecret.
- Add your machine's public address (
curl -s https://ifconfig.me) to the address allowlist (IP 白名单).
- Run
wxpub doctor --online.
Put shared settings in ~/.wxpub/.env to use them across projects. Never commit .wxpub/.
Use the tool directly
WXPUB="node ~/.claude/skills/wechat-article-workflow/scripts/wxpub.mjs"
$WXPUB init # create .wxpub/ and today's package
$WXPUB topics --out output/2026-10-12/topics.md
$WXPUB cover output/2026-10-12 # needs KIE_API_KEY
$WXPUB render output/2026-10-12 --theme ink --preview
$WXPUB publish output/2026-10-12 --dry-run # validates, sends nothing
$WXPUB publish output/2026-10-12 # creates the draft
Run $WXPUB --help for every command.
Repository layout