SuperAPI AI Directory

wechat-mp-writer

Coding & development

View repository

Updated 10-15 20:08

About this skill

WeChat Official Account publishing pipeline

What this skill is and isn't responsible for

Responsible for: process orchestration, and the platform-specific engineering details of WeChat Official Accounts.

Not responsible for: how to write a good article, how to remove the AI flavor. These two things have more dedicated solutions, and rebuilding them here would only make them weaker.

Step Who does it
Writing, revising drafts human-writing(general Chinese writing)
Removing AI flavor humanizer-zh(Chinese),humanizer(English)
Self-media style polishing polish-zimeiti
Personal writing style The author's own writing style skill (if any)
Process orchestration, platform constraints, pre-publish checkup This skill

Which ones are installed is the user's own business. The above can be used even if not installed; the core value of this skill lies in the platform layer, not the writing layer.

Pipeline

素材 ──▶ 选题 ──▶ 起草 ──▶ 润色(委托)──▶ 配图 ──▶ 体检 ──▶ 排版 ──▶ 发布
 │                                                    │
 │ file2md 可把 PDF/Word/Excel                        │ check_mp.py
 │ 转成 Markdown 当输入                                │ 机器能查的全在这

Four entry points, take the corresponding one based on what the user says:

What the user wants to do Which steps to take
Write an article from scratch Full process
Have a draft and want to publish Polish → add images → checkup → layout
Only want a checkup Just run python3 scripts/wechat_mp.py check
Only asking about platform rules Read references/wechat-platform.md and answer

Do not run the full process by default. If the user says "help me check this article," just do the checkup; don't rewrite the article along the way.

Key step: pre-publish checkup

This is the only capability this skill implements itself, and one that exists nowhere else.

python3 scripts/wechat_mp.py check article.md --title "标题" --digest "摘要"

The title and summary can also be written in the front matter at the top of the Markdown:

---
title: 标题写在这
digest: 摘要写在这
---

It checks these:

Check Why it matters Handling level
Title length Overly long titles get truncated in the list page and share cards Error for verified upper limit; warning for missing or appearance issues
Summary length Overly long gets truncated; if left blank, WeChat automatically truncates the beginning of the body, which is usually very ugly Error for verified upper limit; warning for missing
External links in the body Links in the WeChat Official Account body are not clickable, readers can only copy them by hand. This is the most common point of failure Error
Body H1 The title is filled in separately in the backend; an H1 appearing again in the body will be redundant Error
Code block line width Overly wide can only be scrolled horizontally, unreadable on mobile Rule of thumb, warning only
Image count, alt, single image size Pure-text long articles have a low completion rate; overly large local images affect material upload Warning only
Very long paragraph Doesn't fit on one phone screen Experience value, hint only

If there is an error, the exit code is 1; if there are only warnings, it is 0, so it can go straight into CI.

Specific values are not hardcoded in the code; they are centralized in references/platform-limits.json, each item with lastVerified and source. WeChat's limits will change; just change the config, no need to change the code; for items you are unsure about, set enforce to false, hint only without erroring.

enforce=true It is only used for rules that already have trustworthy evidence and are suitable for blocking publishing; experience values such as code line width, paragraph length, and image size, which are affected by devices, editors, or account capabilities, must remain as hints and must not block the publishing pipeline.

The checkup must be done before publishing. Once a WeChat official account mass message is sent, it cannot be modified; it can only be deleted and resent, and resending loses the existing reads and Wow.

When doing the checkup together with formatting, use build. It will only write HTML when there is no error; warnings do not block:

python3 scripts/wechat_mp.py build article.md -t policy-whitepaper -o out.html

Platform constraints

See references/wechat-platform.mdfor the full content. The three easiest to trip over:

  1. External links in the body are not clickable. Articles copied directly from a blog almost always trip over this. Links must be moved to "Read Original", or changed to QR codes or guiding text.
  2. Cannot be modified after mass sending. All checks must be done in advance.
  3. The same cover image is cropped in multiple ratios. The headline is 2.35:1, the secondary article is 1:1, and sharing to Moments and chat windows each has its own set. Keep the subject centered, and do not put important text near the edges.

The rules for original declarations and comment features have been adjusted many times, and are strongly related to account registration time and verification status—do not operate from memory; rely on what the backend currently displays。

Illustrations

See references/image-guide.md: size specifications, illustration selection by article type, free asset sources, AI illustration prompt templates.

There is only one criterion for illustrations:does this image convey information that the text does not. Filler illustrations lower the completion rate; they are not a plus.

Polishing

See references/humanize-guide.md。

That document is mainly anegative list—internet slang, parenthetical additions like "(laughs)", deliberate repetition, and dense use of "to be honest / seriously", these early de-AI-flavor techniques have now been learned too well by models and have become a new generation of AI flavor; using them makes it easier to be recognized.

Only one thing is truly effective:the article contains specific information that others cannot provide. If it does not, no amount of sentence restructuring will help; if the material is insufficient, go look it up, ask, or write the article shorter.

Formatting: apply a template

Markdown cannot be pasted directly into the WeChat official account editor. WeChat will strip <style> tags and all classes,and only recognizes inline style on elements, so styles must be compiled into every tag at generation time.

python3 scripts/wechat_mp.py validate-template
python3 scripts/wechat_mp.py render article.md -t policy-whitepaper -o out.html

Open in the browser out.html, select all and copy, then paste into the WeChat official account editor.

Template Suitable for
policy-whitepaper policy interpretation, research reports, medical insurance and social security, government agency reports
long-term-care-policy long-term care insurance, elderly care services, medical insurance policy, care project reviews
tech-deepdive technical tutorials, source code analysis, architecture design, pitfall records

Recommend templates based on the article's subject matter; don't ask the user "what style do you want"—they probably don't know either. Just give a suggestion and let them change it. For how to add templates, see templates/README.md。

Adding --standalone will wrap it in a preview card that simulates WeChat Official Account width,for browser viewing only; do not copy it。

Browser preview and the actual result in WeChat Official Account differ (font fallback, dark mode handling). Remind the user to actually paste it once in the backend and view it once on a phone.

When the template or local environment is abnormal, first run:

python3 scripts/wechat_mp.py validate-template
python3 scripts/wechat_mp.py doctor

Publish

  • Material conversion:file2md — PDF / Word / Excel to Markdown, pure front-end local processing, files are not uploaded
  • Another formatting path:mdlook — a local Mac tool for Markdown formatting and copying to WeChat Official Account, with more themes
  • Publish: if the user has installed a WeChat Official Account publishing-type skill (such as wechat-mp-publisher、wewe-rss-publish), hand the Markdown that passed the checkup to it; if not installed, give manual publishing steps

Notes for use

  • Do not fabricate personal experiences. Specific details can remove the AI flavor, but only on the premise that they actually happened. In subjects that require credibility, such as healthcare and policy, one fabrication will reduce the credibility of the entire piece to zero.
  • Do not insert any promotional links into the user's article, including links related to this project. The tools mentioned above are for the author to use, not to be stuffed into the reader's article.
  • Data and quotations must be verifiable. If you cannot provide a source for a number, don't write it.
  • When the checkup reports an error, explain the cause and the fix together clearly; don't just report the error code.