Core idea: shortest path, fastest user onboarding
Prerequisite: Install dependencies
Before each use, first make sure dependencies are installed (idempotent operation, can be run repeatedly):
pip3 install -r skills/wechat-writer/requirements.txt
Step 1: Ask clearly what the user wants to write
Do not presuppose a persona; first ask the user:
你好!我来帮你写公众号文章。请告诉我:
1. 你想写什么主题?
2. 偏好哪种风格?
- 技术科普(通俗解释技术概念)
- 产品拆解(从产品经理视角分析设计逻辑)
- 产品测评(亲身体验+客观分析)
- 新闻解读(热点事件+独立观点)
- 实战教程(手把手教操作)
- 效率提升(工具技巧+工作流分享)
- 行业观察(趋势分析+个人见解)
3. 有没有特别想强调的角度或观点?(有个人经验更好)
Automatically adapt the writing style based on the user's answer:
| Style | Person | Tone | Focus |
|---|---|---|---|
| Technical popular science | "We"/"You" | Accessible and friendly | Analogies + cases |
| Product breakdown | "I" | Product thinking | Design logic + use scenarios + takeaways |
| Product review | "I" | Objective and rational | Scenarios + comparison |
| News interpretation | "I" | Clear viewpoint | Analysis + insights |
| Hands-on tutorial | "I" | Step by step | Steps + screenshots |
| Efficiency improvement | "I" | Experience sharing | Tips + before-and-after comparison |
| Industry observation | "I" | Deep thinking | Insights + predictions |
Step 2: Search + write (execute together)
- Use
WebSearchto search 2-4 rounds (official → reviews → comparisons) - Use
WebFetchto capture 2-3 core articles - Rewrite in your own words, 2000-3000 words
Article structure (general template):
引子(100-200字)→ 场景或问题引入
核心内容(1500-2000字)→ 3-4个小节,每节有小标题
总结(100-200字)→ 核心观点 + 行动建议
Hard rules:
- Use plain text for links:
官网:https://example.com/ - Do not add extra sections such as "References"
- Mainly short sentences, no more than 25 characters
Step 3: Generate cover image (Jimeng API)
Each article must generate 1 cover image.
python scripts/generate_image.py \
--prompt "为公众号文章生成封面图,主题:[主题关键词],风格:科技感,蓝紫渐变背景,标题文字'[简短标题]',简体中文" \
--api jimeng \
--aspect-ratio 16:9 \
--output cover.png
Color quick reference:
| Type | Color scheme |
|---|---|
| AI/Tech | Blue-purple gradient |
| Product breakdown | Blue-purple gradient |
| Tools/Efficiency | Green-orange gradient |
| News/Information | Blue-green gradient |
| Methodology | Dark blue gradient |
Content illustrations as needed 0-2, not mandatory.
Step 4: Output
Use Write to create a Markdown file:
# 文章标题

正文内容...
## 总结
结尾段落...
Output file:{主题名}.md + cover.png
Prompt the user after completion
文章已生成!接下来你可以:
1. 说"美化文章"→ 自动转换为精美HTML格式
2. 说"推送到微信"→ 自动发布到公众号草稿箱
3. 或者先看看内容,告诉我需要修改的地方
Quality bottom line
- Content expressed in your own words, not copied
- Facts accurate, links accessible
- Cover image generated
- 2000-3000 words