微信公众号文章创作 SKILLSAFE
通用高质量 Skills 合集🔥
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
公众号/自媒体全流程解决方案:AI 写作 + 配图生成 + 自动上传草稿箱
功能特性
智能写作
- 9 种写作风格:默认、爆款、清单体、资源盘点、个人实测、认知颠覆、身份共鸣、故事化、深度随笔
- AI 搜索资料:自动搜索最新资料,深度总结
- 爆款标题生成:5 个备选标题,痛点明确、情绪调动
- 排版优化建议:段落结构、配图位置、代码块留白
配图生成
- 封面图:16:9、1:1、9:16 等多种比例
- 正文插图:步骤图、演示图、流程图、前后对比
- Draw.io 格式:可编辑、可导出 PNG/JPG
- 风格统一:配色与文章主题一致
自动上传
- 手动模式:Doocs MD 在线编辑器,零代码
- 自动模式:API 调用,一键上传草稿箱
- 图片处理:自动上传封面和正文图片
- Markdown 转换:自动转为微信 HTML 格式
风格提取
- 分析范文:提取写作风格、语言特征
- 生成规则包:15-30 条可执行规则
- Prompt 模板:可直接复用的风格 Prompt
快速开始
1. 安装依赖
cd wechat-article-writer npm install
2. 配置微信公众号(可选,仅自动上传需要)
复制 .env.example 为 .env,填入你的公众号凭证:
cp .env.example .env
编辑 .env:
WECHAT_APPID=你的AppID WECHAT_SECRET=你的AppSecret
获取凭证:公众号后台 → 设置与开发 → 基本配置 → 开发者ID(AppID) 和 开发者密码(AppSecret)
3. 使用 SKILL
在 Claude Code 中使用此 SKILL:
/wechat-article-writer 帮我写一篇关于 AI 写作工具的公众号文章,用爆款风格
使用示例
示例 1:写文章(不上传)
用清单体风格写一篇「提升效率的 10 个习惯」
执行流程:
- 搜索相关资料
- 按清单体风格撰写 2000-4000 字文章
- 生成 5 个爆款标题
- 提供排版优化建议
- 生成封面图和正文插图(.drawio 文件)
示例 2:写文章并上传(自动模式)
用高流量风格写一篇关于 Cursor 的文章,并自动上传到草稿箱
执行流程:
- 完成 Step 1-6(写作+配图)
- 导出图片为 PNG 格式
- 调用微信 API 上传封面图
- 转换 Markdown 为微信 HTML
- 创建草稿并返回 media_id
示例 3:仅生成封面图
生成这篇文章的封面,16:9 比例,科技风格
示例 4:风格提取
分析这篇文章的写作风格,提取可复用规则: [粘贴文章全文]
高级用法
手动导出 Draw.io 图片
在 Draw.io 中打开 .drawio 文件:
- 文件 → 导出为 → PNG
- 选择缩放:200% (推荐)
- 勾选"透明背景"(如需要)
- 保存到
images/covers/export/或images/illustrations/export/
批量导出图片(自动)
0e5ec84336bcOBSERVED · 2026-10-21Install
Commands as the repository documents them. They are shown, not run.
npm install
Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned | |
| cursor | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: wechat-article-writer
description: 公众号/自媒体全流程。根据用户表述自动匹配:撰写文章、封面图、正文插图、风格提取。支持多种写作风格。当用户提到写公众号、技术博客、公众号封面、正文插图、步骤图、演示图、流程示意、分析写作风格、克隆文风、模仿爆款、提取风格时使用。详见 reference 目录。
---
# 公众号/自媒体创作
## 一、任务识别
根据用户需求选择执行路径:
| 任务类型 | 触发词 | 执行 |
| ------- | ----------------------------- | ----------------------------------------------------------- |
| 仅封面/结尾图 | 封面图、公众号封面、B站封面、小红书配图 | 读取 [cover_guide.md](reference/cover_guide.md) |
| 仅正文插图 | 插图、步骤图、演示图、流程示意、前后对比 | 读取 [illustration_guide.md](reference/illustration_guide.md) |
| 撰写文章 | 写公众号、写文章、自媒体写作、爆款文章、内容创作 | 执行 Step 2–6 |
| 风格提取 | 分析写作风格、克隆文风、模仿某篇、提取风格、范文转风格指南 | 执行「四、风格提取流程」 |
## 二、写作风格
撰写文章时,按用户指定选择风格文件;未指定则用默认风格。
| 序号 | 风格 | 触发词(互不重复) | 参考文件 | 篇幅 |
| --- | -------- | ------------------ | ------------------------------------------------------------------------------ | ----------- |
| 1 | 默认 | (未指定时) | [writing_style.md](reference/writing_style.md) | 2000–4000 字 |
| 2 | 高流量/爆款 | 高流量、爆款、像 Skills 那篇 | [viral_style.md](reference/viral_style.md) 7 | 2500–4000 字 |
| 3 | 清单体/方法论 | 清单体、方法论、干货、步骤 | [checklist_methodology_style.md](reference/checklist_methodology_style.md) | 2000–4000 字 |
| 4 | 资源盘点 | 盘点、替代方案、合集 | [resource_roundup_style.md](reference/resource_roundup_style.md) | 3000–6000 字 |
| 5 | 个人实测推荐 | 个人实测、亲身推荐 | [personal_tool_review_style.md](reference/personal_tool_review_style.md) | 4000–7000 字 |
| 6 | 认知颠覆 | 认知颠覆、反常识、观点文 | [contrarian_opinion_style.md](reference/contrarian_opinion_style.md) | 2000–3500 字 |
| 7 | 身份共鸣/逆袭 | 身份共鸣、逆袭、你也行、转行经历 | [identity_transformation_style.md](reference/identity_transformation_style.md) | 2500–4000 字 |
| 8 | 故事化/情感共鸣 | 故事化、情感共鸣、人物故事 | [story_emotional_style.md](reference/story_emotional_style.md) | 2500–4500 字 |
| 9 | 深度随笔 | 深度思考、随笔、像日记那篇、个人感悟 | [personal_essay_style.md](reference/personal_essay_style.md) | 4000–7000 字 |
## 三、撰写流程(Step 2–6)
### Step 2:搜索资料
- 并行搜索多来源(官方文档、X/Twitter、Reddit、技术论坛等)
- 优先当月/当季最新资料
- 深度总结后再进入撰写
### Step 3:撰写文章
1. **读取风格文件**:按「二、写作风格」选择对应 reference 文件,严格遵循其写作规范与结尾语
2. **通用要求**:故事化开头、带情感色彩、准备 2–3 个备选标题
3. **标题层级**:文章标题用 `# 一级标题`,正文章节也从 `#` 开始(不用 `##`),子节用 `##`,以此类推
### Step 4:生成标题
生成 5 个爆款风格标题:痛点明确、数字吸引、结果导向、情绪调动、悬念设置。
### Step 5:排版优化
输出排版与配图建议:段落结构、配图位置(封面/正文/结尾)、代码块留白、金句单独成段。
### Step 6:生成配图(可选)
用户要求或排版建议中标注配图时:
1. **读取指南**:
- **封面/结尾图** → 读取 `reference/cover_guide.md`
- **正文插图** → 读取 `reference/illustration_guide.md`
2. **生成并保存 .drawio 文件**:
- **必须保存**:生成完整的 mxGraph XML 内容并保存为文件
- **封面图**保存为 `images/covers/source/主题关键词-cover.drawio`
- **正文插图**保存为 `images/illustrations/source/主题关键词-图序号.drawio`
- 配色与文章统一
- 保存成功后告知用户文件路径
3. **自动转换为 PNG(可选)**:
- 检查是否安装 draw.io CLI 工具
- 如已安装:自动运行 `bash scripts/export-drawio.sh covers`,将 drawio 转为 PNG
- 如未安装:提示用户手动导出或安装 draw.io CLI
- PNG 保存到 `images/covers/export/` 或 `images/illustrations/export/`
4. **输出使用说明**:
- 封面说明:布局用途与风格(1-2 句)
- 文件路径:已保存的 .drawio 文件位置
- 如果自动转换成功:PNG 文件位置
- 如果需要手动导出:导出步骤说明
**图片文件夹结构**:
```
images/
├── covers/source/ # 封面 .drawio 文件(自动保存)✅
├── covers/export/ # 封面 PNG/JPG(自动或手动导出)
├── illustrations/source/ # 正文 .drawio 文件(自动保存)✅
└── illustrations/export/ # 正文 PNG/JPG(自动或手动导出)
```
**导出 PNG 方式**(三选一):
1. **自动导出(推荐)**:如果已安装 draw.io CLI,系统会自动转换
2. **脚本导出**:手动运行 `bash scripts/export-drawio.sh covers`
3. **手动导出**:用 Draw.io 打开 → 文件 → 导出为 → PNG(2x 分辨率)
### Step 7:上传到微信公众号(可选)
用户要求上传到草稿箱时执行,支持手动和自动两种模式。
#### **前置准备**
1. 确保图片已导出为 PNG/JPG 格式(Step 6)
2. 配置微信公众号凭证(仅自动模式需要):
```bash
# .env 文件
WECHAT_APPID=your_app_id
WECHAT_SECRET=your_app_secret
```
#### **模式 A:手动上传(零代码,推荐新手)**
1. **读取已生成的文件**:
- 文章路径:`drafts/日期-主题.md`(Step 3 已保存)
- 标题路径:`drafts/备选标题.txt`(Step 4 已保存)
- 封面图:`images/covers/source/主题-cover.drawio`(Step 6 已保存)
2. **导出封面图**:
- 用 Draw.io 打开 `.drawio` 文件
- 文件 → 导出为 → PNG(2x 分辨率)
- 保存到 `images/covers/export/`
3. **转换 Markdown 为微信格式**:
- 打开 [Doocs MD 编辑器](https://md.openwrite.cn/)
- 打开 `drafts/日期-主题.md`,复制全部内容
- 粘贴到 Doocs MD 左侧编辑区
- 选择主题样式(默认、橙心、姹紫等)
- 右侧实时预览微信格式
4. **复制到公众号**:
- 点击"复制"按钮
- 打开公众号后台 → 新建图文 → 粘贴内容
- 上传封面图(从 `images/covers/export/`)
- 从 `备选标题.txt` 中选择标题
- 保存为草稿或直接发布
**优点**:无需技术配置,即开即用,样式丰富,所有文件已自动生成
**适用场景**:偶尔发文、注重样式调整
#### **模式 B:自动上传(API 调用,推荐频繁发文)**
1. **读取已生成的文件**:
- 文章:`drafts/日期-主题.md`(Step 3 已保存)
- 封面:`images/covers/export/主题-cover.png`(需先导出)
- 标题:从 `drafts/备选标题.txt` 中选择
2. **自动执行流程**:
```bash
# 方式 1: 使用现成工具(推荐)
npx wechat-article-publisher \
--markdown drafts/2026-03-19-ai-tools.md \
--cover images/covers/export/ai-tools-cover.png \
--images images/illustrations/export/ \
--auto-upload
# 方式 2: 使用自定义脚本
node scripts/upload-to-wechat.js \
--title "2026 最全 AI 编程工具盘点:30+ 神器让代码写得飞起" \
--content drafts/2026-03-19-ai-tools.md \
--cover images/covers/export/ai-tools-cover.png
```
2. **自动化步骤**(脚本内部执行):
- 获取微信 access_token(自动缓存 7200 秒)
- 上传封面图到素材库 → 获取 `thumb_media_id`
- 上传正文图片 → 替换 Markdown 中的图片链接
- 转换 Markdown → 微信 HTML(内联样式)
- 调用草稿箱 API 创建草稿
- 返回草稿 ID 和预览链接
3. **输出示例**:
```
✅ 草稿已上传成功!
✅ 草稿 media_id: Mzg5MjQ3NTg2Mg==_1234567890
✅ 请在公众号后台查看并发布
⏱️ 耗时: 3.2 秒
```
**优点**:全自动化,批量发布,节省时间
**适用场景**:频繁发文、团队协作、内容矩阵
#### **注意事项**
⚠️ **限制条件**:
- 必须是已认证的公众号(个人号无法使用发布 API)
- 封面图 < 10MB,格式 JPG/PNG
- 正文图 < 2MB,格式 JPG/PNG/GIF
⚠️ **安全提醒**:
- 不要将 AppSecret 提交到 Git 仓库
- 使用 `.env` 文件或环境变量存储凭证
- Token 缓存后提前 5 分钟刷新,避免 40001 错误
⚠️ **发布限制(2025年7月起)**Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (4 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (1)
axios, dotenv, form-data, markdown-it
Gates applied: no_behavioural_pass.
0e5ec84336bcfull audit observations/trust-audit/skill/xstongxue__wechat-article-writer.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-21 | 0e5ec84336bc | SAFE | B | 89 | first audit |
Questions
What does the wechat-article-writer — xstongxue/best-skills skill do?
通用高质量 Skills 合集🔥
Is wechat-article-writer — xstongxue/best-skills safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can wechat-article-writer — xstongxue/best-skills access on my machine?
The audit observed that it reaches the network. Each of those is consistent with what it says it does. Secrets in the source: none found.
Which assistants does wechat-article-writer — xstongxue/best-skills work with?
Its documentation mentions claude-code and cursor. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (0e5ec84336bc), read on 2026-10-21. The repository is watched, and a new audit runs when it changes — this is the first audit.
Add this badge to your README
Shows this page's audit result and links back to it. It updates when the audit does.
[](https://modelsatlas.com/skills/xstongxue/wechat-article-writer/)
Not your listing, or something out of date? Claim or update your listing.