Publish content to WeChat Official Account (公众号). Converts URLs, local files, podcasts (SRT), or GitHub repos into beautifully formatted WeChat articles and publishes to drafts. Triggers on "发布公众号", "微信文章", "wechat article", "publish to wechat".
Resources
6Install
npx skillscat add 125ts/wechat-article-publisher Install via the SkillsCat registry.
SKILL.md
WeChat Article Publisher
将任意内容源转换为排版精美的微信公众号文章,并发布到草稿箱。
When to use
- 用户说「发布到公众号」「写一篇微信文章」「把这个链接转成公众号文章」
- 用户给了一个 URL、本地文件、SRT 字幕文件,想转成公众号文章
- 用户说 "publish to wechat", "wechat article"
Usage
# 基本用法(默认 DeepSeek)
python3 {baseDir}/scripts/publish.py "https://example.com/article"
# 使用本地文件
python3 {baseDir}/scripts/publish.py "/path/to/transcript.srt"
# 指定 LLM
python3 {baseDir}/scripts/publish.py "https://example.com" --provider kimi
# 仅生成 HTML,不发布
python3 {baseDir}/scripts/publish.py "https://example.com" --no-publish
# 指定封面图
python3 {baseDir}/scripts/publish.py "https://example.com" --thumb-url "https://example.com/cover.jpg"Supported LLM providers
| Provider | Env var | Model |
|---|---|---|
| deepseek (default) | DEEPSEEK_API_KEY |
deepseek-chat |
| zhipu | ZHIPU_API_KEY |
glm-4-plus |
| kimi | KIMI_API_KEY |
moonshot-v1-128k |
| aliyun | ALIYUN_API_KEY |
qwen-plus |
| minimax | MINIMAX_API_KEY |
MiniMax-Text-01 |
WeChat publishing (optional)
Set these env vars to auto-publish to drafts:
WECHAT_APP_ID— 公众号 AppIDWECHAT_APP_SECRET— 公众号 AppSecret
Without these, the tool generates an HTML file on the Desktop with a "copy article" button for manual pasting into the WeChat editor.
Workflow
- Run the publish script with the user's source URL or file path
- Report: article title, word count, image count
- If published: share the draft media_id
- If HTML only: tell the user to open the file and click "复制文章"
Important
- Always confirm the source URL/path with the user before running
- If the user wants a specific LLM, add
--provider <name> - If WeChat credentials are not set, use
--no-publishautomatically - The generated HTML uses inline styles compatible with WeChat's editor