WeChat Official Account Writing System
Purpose
Automatically complete the full process of official account article writing based on the topic provided by the user (optional reference URLs): multi-source retrieval and evidence pool organization, first draft generation, self-review and polishing, reference material organization, with optional automatic illustration and saving to the official account draft box (no submission for publication).
When to Use
- User requests "Write a WeChat official account article about XXX"
- User requests "Generate a WeChat official account article with the topic XXX"
- User needs a complete WeChat official account article creation process
- User hopes to "automatically add illustrations after writing" or "send to the official account draft box after writing"
Prerequisites
Before execution, confirm:
- The user has provided the article topic ()
- If there are reference article URLs, they can be provided together ()
- If is purely Chinese and no is provided, it is recommended to supplement with an English/pinyin kebab-case directory name; otherwise, the ASCII downgrade scheme will be used
Workflow
Execute in the following order (products are saved to
by default, facilitating re-running and traceability):
Phase 0: Preflight
Goal: Determine stable and reusable directory and path specifications
Operations:
- Calculate
- If the user provides : use it directly (recommended: English/pinyin kebab-case)
- If contains Latin letters/numbers: convert it to kebab-case
- Otherwise, downgrade to:
- Create directories:
- Specification: Markdown image references must use relative paths and separators
Step 1: Material Collection
Goal: Collect materials related to the topic and organize them into a traceable evidence pool
Operations:
- If the user provides : use in parallel to obtain content, extract key points, and record the URL and available publication date
- If the user does not provide : use in parallel for multi-source retrieval (recommended coverage: official documents / X(Twitter) / Reddit / technical forums / WeChat official accounts / engineering practices)
- official/authority: official documents, standards/specifications, authoritative media interpretations
- community: X(Twitter), Reddit, forums/discussions
- practice: GitHub issues, engineering blogs, case reviews
- Recommended parallel query templates (combine as needed, try to add years/time ranges to emphasize recent content):
{topic} official documentation
/ {topic} release notes 2025 2026
- /
- /
{topic} site:reddit.com/r/<subreddit>
{topic} site:github.com issues
/ {topic} site:github.com discussions
{topic} site:mp.weixin.qq.com
(WeChat official accounts)
{topic} practical review pitfalls 2025 2026
(Chinese engineering practices)
- Merge and deduplicate, grade by credibility (high/medium/low), form an evidence pool, and save it to:
articles/<slug>/sources/evidence.md
Tool Mapping:
- "Search" in this process uses:
- "Fetch web page content" in this process uses:
About WebSearch (Implementation Notes):
- Priority is given to using the tool built into the runtime environment.
- If no available is present in the current environment: use to crawl public search results pages (SERP), extract the URL list from the results, then use in parallel to obtain the main content.
Evidence Pool Entry Format (Each entry must include):
- title
- url
- published_at (if available)
- source_type (official/community/practice)
- key_takeaways (3-6 key points, preferably directly adaptable to main content materials)
- confidence (high/medium/low)
Stop Conditions (Recommended):
- 8-12 candidate sources, with medium/high >= 5 sources
Common Failure Handling (Newly Added):
- X/Reddit login wall or inability to crawl main content:
- Prioritize publicly accessible mirrors/references (second-hand reports must be marked ), or switch to crawling blogs/forum reposts with the same viewpoint;
- If original posts must be cited: only use WebSearch result summaries + other independent sources for corroboration, do not fabricate details.
- SERP crawling/parsing failure (when no WebSearch fallback path is available):
- Switch to the "site-specific retrieval" strategy: directly use to crawl the official site's search/blog index page or GitHub search page;
- If coverage is still not possible: ask the user for 3-5 key URLs or a specified list of information sources.
- Deduplication and credibility:
- At least 2 independent sources to corroborate the same fact;
- Official/primary documents are prioritized as ; community discussions without implementation details or cross-validation are marked .
Output:
(evidence pool path)
Step 2: First Draft Generation
Goal: Generate the first draft of the official account article based on materials
Writing Requirements:
-
Title: Eye-catching, can use the following techniques
- Number type:
- Question type:
- Comparison type:
Differences Between A and B...
- Suspense type:
Things You Don't Know About...
-
Opening (First 3-5 lines):
- Present pain points or resonate with readers
- Set suspense or raise questions
- Clarify the value of the article
-
Main Content Structure:
- Use subheadings for segmentation (## or ###)
- 200-300 words per paragraph
- Include cases and data support
- Use lists to enhance readability
-
Conclusion:
- Summarize core viewpoints
- Guide interaction (likes, "read later", comments)
- Can add golden sentences or calls to action
-
Word Count Requirement: 1500-2500 words
-
Traceability Requirement (New Hard Constraint):
- Key facts/data/conclusions must be supported by the evidence pool
- The end of the article must append (5-10 links, preferably with dates)
Output: First draft in Markdown format, saved to:
articles/<slug>/article.md
Step 3: Intelligent Review
Goal: Review the article from four dimensions to identify issues
Review Dimensions:
| Dimension | Check Points | Weight |
|---|
| Logic | Clear arguments, sufficient evidence, reasonable reasoning | 30% |
| Expression | Fluent language, no AI traces, appropriate colloquialism | 25% |
| Data | Accurate data, appropriate cases, standardized citations | 25% |
| Structure | Eye-catching title, clear paragraphs, echo between beginning and end | 20% |
New Hard Checks:
- Traceability: Whether key assertions are supported by the evidence pool
- Title Consistency: Whether the title's promise is clearly fulfilled in the main content
Review Operations:
- Check logical coherence paragraph by paragraph
- Mark AI trace vocabulary (such as "To sum up", "It is not difficult to see", etc.)
- Verify the accuracy of data and cases
- Check structure and rhythm
Scoring Standards:
- 90-100 points: Excellent, can be published directly
- 80-89 points: Good, minor optimizations needed
- 70-79 points: Qualified, needs revision
- Below 70 points: Needs rewriting
Output: Review report (including issues and revision suggestions), recommended to be saved to:
articles/<slug>/sources/review.md
Step 4: Polishing
Goal: Fix issues and improve article quality
Polishing Operations:
-
Remove AI Traces
- Replace vocabulary:
- Avoid overly formal expressions
-
Enhance Colloquialism
- Appropriately add: , ,
- Use short sentences, avoid long and complex sentences
- Add transition words to enhance fluency
-
Optimize Rhythm
- Combine long and short sentences
- Appropriately use exclamations and rhetorical questions
- Control paragraph length (recommended no more than 5 lines)
-
Fix Review Issues
- Fix items one by one according to the review report
- Supplement missing data or cases
- Adjust unreasonable structures
Output: Final article
Mandatory Requirements (Newly Added):
- The final article must retain or supplement
- It is recommended to keep 5-10 references, grouped by / / is better
Step 5: Saving and Output
Operations:
- Create output directory (if not exists):
- Save article:
articles/<slug>/article.md
- Output execution summary:
Step 6: Automatic Illustration (Optional, call zhy-article-illustrator)
Goal: Generate high-quality illustrations with a unified style for the article, and produce an illustrated version of the article
Default Strategy:
- : Use
articles/<slug>/article.md
- : Reuse the current article slug
- : (default balanced)
- : (default false)
- :
illustration_aspect_ratio
(default 16:9)
- :
illustration_prompt_profile
(default nano-banana)
- :
illustration_text_language
(default zh-CN)
- :
illustration_english_terms_whitelist
(default empty)
- :
illustration_image_provider
(default xiaomi)
- : (default gemini-3.1-flash-image-preview)
- : (default 1K)
- :
illustration_image_base_url
(default Xiaomi API address, also supports Gemini native proxy)
Execution Method:
- Prioritize calling the one-click process script of :
bash
node <zhy-article-illustrator>/scripts/illustrate-article.ts \
--article articles/<slug>/article.md \
--slug <slug> \
--density <illustration_density> \
--aspect-ratio <illustration_aspect_ratio> \
--prompt-profile <illustration_prompt_profile> \
--text-language <illustration_text_language> \
--image-provider <illustration_image_provider> \
--image-model <illustration_image_model> \
[--image-size <illustration_image_size>] \
[--image-base-url <illustration_image_base_url>] \
[--upload]
- If
illustration_english_terms_whitelist
is not empty, append for each term, for example:
bash
--term Playwright --term Chromium --term Firefox --term WebKit
- Default to the new illustration strategy:
- First generate the article-level
- Then generate and
- Default text in images is Simplified Chinese, only whitelisted terms retain English
- All images in the same article share a unified style system
- When integrating writing skills, follow the following field mapping:
article_path -> --article
illustration_density -> --density
illustration_aspect_ratio -> --aspect-ratio
illustration_prompt_profile -> --prompt-profile
illustration_text_language -> --text-language
illustration_image_provider -> --image-provider
illustration_image_model -> --image-model
illustration_image_size -> --image-size
illustration_image_base_url -> --image-base-url
illustration_upload=true -> --upload
Output:
- :
articles/<slug>/article.illustrated.md
- :
articles/<slug>/illustrations/<slug>/
articles/<slug>/illustrations/<slug>/visual-bible.md
articles/<slug>/illustrations/<slug>/outline.md
articles/<slug>/illustrations/<slug>/prompts/
Failure Handling: Retry once for single image failure; if still failed, record and continue, finally output the failure list. If some images fail,
should still be retained, and image placeholder comments inserted.
Step 7: HTML Theme Style Output (Optional, call zhy-markdown2wechat)
Goal: Use the
skill to convert Markdown to HTML with WeChat inline styles
Operations:
- Select input file:
- If and
articles/<slug>/article.illustrated.md
exists, use this file
- Otherwise, use
articles/<slug>/article.md
- Record the selected Markdown file as
- Call the skill and execute the conversion script:
bash
node <zhy-markdown2wechat>/scripts/convert.js \
<input_markdown> \
<zhy-markdown2wechat>/resources/themes/default.css \
articles/<slug>/article.zhy.html
- The script has zero dependencies (pure Node.js), no need for , automatically processes in a temporary directory and cleans up afterwards
- Output includes a container and complete inline CSS styles
- To change the theme, replace the second parameter with other theme files under ( / / / / / )
- refers to the installation directory of this skill in the current environment, use the actual path during runtime
- Input file examples:
- If illustrated article exists:
<input_markdown>=articles/<slug>/article.illustrated.md
- If illustrated article does not exist:
<input_markdown>=articles/<slug>/article.md
Output:
(
articles/<slug>/article.zhy.html
)
Failure Handling: Record the error and note the reason in the execution summary, skip this step and continue with subsequent processes
Step 8: Save to Official Account Draft Box (Optional, call zhy-wechat-publish)
Default Behavior: Save to the draft box via the official WeChat API, no final publication submission
Prerequisites:
- and have been configured in the file under the skill directory
- The public IP of the running machine has been added to the IP whitelist in the WeChat official account backend
- To automatically generate a cover image, the image generation environment dependent on the publishing skill must also be available (provided by )
Calling Method:
- The main content must be an HTML file with inline styles
- Prioritize using generated in Step 7; if it does not exist, skip this step (or first complete Step 7)
- The recommended stable entry is to directly call :
bash
node <zhy-wechat-publish>/scripts/wechat_draft.js \
--title "Article Title" \
--file "articles/<slug>/article.zhy.html" \
[--author "Author"] \
[--digest "Abstract"] \
[--thumb "Cover media_id"] \
[--source-url "Original Link"] \
[--need-open-comment "1"] \
[--only-fans-can-comment "1"]
- To automatically generate a cover image and publish, you can also call:
bash
node <zhy-wechat-publish>/scripts/publish_with_cover.js \
--article "articles/<slug>/article.md" \
--html "articles/<slug>/article.zhy.html" \
[--title "Article Title"] \
[--author "Author"] \
[--source-url "Original Link"] \
[--need-open-comment "1"] \
[--only-fans-can-comment "1"]
- refers to the installation directory of this skill in the current environment, use the actual path during runtime
- When is not provided in , it will automatically read
WECHAT_DEFAULT_THUMB_MEDIA_ID
from
- will automatically extract the title/abstract from the article, generate a 16:9 cover image, upload the cover image, and use the returned as
- The publishing script will automatically expand style variables in the HTML before uploading to avoid loss of colors and border styles in the WeChat draft box
- The publishing script will automatically upload images in the main content to the WeChat main content image interface before uploading, and replace with the image URL returned by WeChat
- The publishing script will automatically downgrade the native list structure to "ordinary paragraphs + dots/numbers" before uploading to resolve the list parsing issue when re-entering edit mode in the WeChat draft box
Notes:
- The script has zero dependencies (pure Node.js >= 16), no need for
- When using , must be available locally, as the cover image generation reuses existing image generation scripts
- After saving the draft, it will not be automatically submitted for publication; manual confirmation in the official account backend is required
- The title length cannot exceed 64 characters
- If no available image generation configuration exists in the current environment, prioritize using to directly upload HTML to avoid failure in the automatic cover image step
Success Criteria: Output
Upload draft successfully! Draft MEDIA_ID: xxx
Failure Troubleshooting List:
| Error Message | Cause and Handling |
|---|
| Incorrect AppID, check under the publishing skill directory |
| Current IP not in whitelist, add the IP in the error message to the official account backend |
| Invalid cover image ID, re-upload using to obtain a new one |
Missing Xiaomi/Gemini/OpenAI API Key
| Image generation environment dependent on automatic cover image generation not configured, check related to |
| does not exist | Step 7 not executed or failed, check |
| Title too long | Control title <= 64 characters |
Data Flow
User Input (topic, urls?, slug?, search_count?, time_range_days?, ...)
↓
Preflight (Determine slug and directory)
↓
Material Collection (WebSearch + webfetch → evidence.md)
↓
First Draft Generation (article.md)
↓
Intelligent Review (including traceability/title consistency)
↓
Polishing (Mandatory References)
↓
Automatic Illustration (article.illustrated.md + illustrations/)
↓
HTML Theme Style Output (zhy-markdown2wechat → article.zhy.html)
↓
Save to Draft Box (No submission for publication)
Error Handling
| Exception | Handling Method |
|---|
| No search results | Prompt user to provide more information or reference URLs |
| Reference article inaccessible | Skip this URL and continue processing other materials |
| Low quality of first draft | Regenerate or prompt user to provide more materials |
| Review score <70 | Suggest user check if the topic is appropriate |
| Illustration failure | Output failure list; can choose to supplement images before publishing |
| HTML conversion failure | Record error and skip this step (Step 7), continue with subsequent processes |
| Failure to save to draft box | Output troubleshooting list (AppID/IP whitelist/cover media_id/title length) |
Example Usage
Input:
topic: "How to Improve Work Efficiency"
urls: ["https://mp.weixin.qq.com/xxx"]
search_count: 5
with_illustrations: true
with_html_theme: true
post_to_wechat: true
Execution Process:
- Search for articles related to "How to Improve Work Efficiency"
- Obtain content of the reference article provided by the user
- Generate first draft (about 1500-2500 words)
- Review score: 85 points
- Polish and optimize, then save
Output:
article_path: articles/how-to-improve-work-efficiency/article.md
sources_path: articles/how-to-improve-work-efficiency/sources/evidence.md
illustrated_article_path: articles/how-to-improve-work-efficiency/article.illustrated.md
illustrations_dir: articles/how-to-improve-work-efficiency/illustrations/how-to-improve-work-efficiency/
html_article_path: articles/how-to-improve-work-efficiency/article.zhy.html
word_count: 2150
review_score: 92
wechat_draft_status: success
Notes
- The article style should conform to the official account's tone: relaxed, useful, and resonant
- Avoid sensitive content and excessive marketing
- Maintain originality, do not directly copy material content