公众号文章创作
v1.0.0公众号写作助手 - 专注公众号文章创作,从选题到成稿+自动配图的完整流程。触发词:"写公众号"、"公众号文章"、"推文"、"/wechat
Security Scan
OpenClaw
Suspicious
high confidencePurpose & Capability
The skill's behavior (article drafting + optional image generation) is consistent with its name/description. The included generate_images.py and image templates align with the '自动配图' feature. However, the skill embeds an API key in scripts/image.env and hard-codes a Windows save path (E:\Claude Code\claude\articles\青少年学习教练公众号\) which are not justified in the top-level metadata (no required env vars declared).
Instruction Scope
Runtime instructions direct automatic saving of completed articles and generated prompt files to a specific absolute path on disk and to auto-generate prompt files after writing. Although image generation requires explicit user confirmation before calling the API, the skill still auto-saves files to the stated path without any configurable option in the SKILL.md; this writes to a host filesystem location that may not exist or may overwrite user files. The instructions also rely on scripts/image.env (with credentials) but the skill metadata declares no required environment variables/config — a scope mismatch.
Install Mechanism
No install spec (instruction-only) — lowest installer risk. The python script requires the third-party 'zhipuai' library (pip install zhipuai) and performs network calls to an external image API; this is expected for an image-generation helper. There is no remote download of executable archives in the skill, but the script will fetch images from external URLs returned by the image API.
Credentials
The repository contains a pre-filled scripts/image.env with an API_KEY value (API_KEY=88e6f80c14cb40e4ba6d5bfe702d6aac.74cOvJgmo1t48yrv). Yet the skill metadata lists no required env vars or primary credential. Hard-coded credential in the repo is disproportionate and undocumented — it may be a leaked/third-party key or a placeholder, and it could be used by the script to call external APIs on behalf of the user. The script expects API_KEY in scripts/image.env by default, so the skill will use that key unless replaced.
Persistence & Privilege
The skill is not always-enabled and is user-invocable (normal). It does request writing files to disk (automatic save of Markdown and prompts) to a hard-coded directory. While writing its own output is reasonable for this purpose, the fixed absolute path (non-configurable in instructions) is unexpected and could cause unintended writes; the skill does not request elevated system privileges in metadata.
What to consider before installing
Key issues to consider before installing:
1) Hard-coded API key present — scripts/image.env contains an API_KEY value. Treat this as a secret leak: do not assume it belongs to you. Replace it with your own key or remove the file. Consider revoking the key if it appears to be yours or exposing sensitive credentials.
2) Undeclared credential usage — the skill metadata declares no required env vars, but the image script expects a credentials file (scripts/image.env). The mismatch is suspicious and means the skill will use whatever key is present in the repository by default.
3) Fixed absolute save path — SKILL.md forces saving articles/prompts to E:\Claude Code\claude\articles\青少年学习教练公众号\. Change this to a configurable relative path or prompt the user for a directory before saving; running as-is may fail on non-Windows systems or overwrite files.
4) Network activity — the included Python script calls an external image-generation API (智谱AI / open.bigmodel.cn) and downloads images. If you keep/replace the provided API key, those external calls will be made under that credential. Run the script in a sandbox or review network behavior first.
Recommended actions:
- Do not use the embedded API key. Replace scripts/image.env with your own key or remove it and require the user to provide credentials.
- Modify the skill to make the article output directory configurable (or prompt the user) instead of a hard-coded absolute path.
- Run the image generation script manually in a controlled environment after reviewing/confirming the API key and dependency installation (pip install zhipuai).
- If you want to proceed, test in a sandbox/VM and inspect all files the skill writes. If you cannot confirm the origin/ownership of the embedded API key, do not use it.Like a lobster shell, security has layers — review code before you run it.
latest
公众号写作助手
触发方式
当用户说以下内容时触发:
- "写一篇公众号文章"
- "帮我写推文"
- "公众号内容创作"
- "/wechat" 或 "/公众号"
核心流程
六个阶段:选题 → 标题 → 框架 → 成稿 → 保存 → 配图提示词 → (询问)生成图片
用户提出写作需求
│
↓
[阶段01] 选题定位 - 明确文章主题和定位
│
↓
[阶段02] 标题优化 - 生成5-10个爆款标题供选择
│
↓
[阶段03] 框架搭建 - 构建文章结构
│
↓
[阶段04] 全文撰写 - 完成文章初稿
│
↓
[阶段05] 保存文章 - 排版后MD格式保存到指定目录
│
↓
[阶段06] 自动生成配图提示词 - 生成封面/信息图/引导图提示词
│
↓
[询问] 是否生成图片? - 用户确认后才调用API
流程概览
| 阶段 | 名称 | 目标 | 详细文件 |
|---|---|---|---|
| 01 | 选题定位 | 明确写什么、给谁看、解决什么问题 | stages/01-topic.md |
| 02 | 标题优化 | 必须提供5-10个爆款标题选项 | stages/02-title.md |
| 03 | 框架搭建 | 设计文章结构,确保逻辑清晰 | stages/03-framework.md |
| 04 | 全文撰写 | 根据框架完成2500-3000字文章 | stages/04-writing.md |
| 05 | 保存文章 | 排版MD格式保存到指定目录 | 见下方 |
| 06 | 自动配图提示词 | 自动生成配图提示词并保存,询问用户是否生成图片 | image_templates/ |
调度规则
如何判断当前阶段:
- 进入阶段01 — 用户刚开始,只有模糊想法
- 进入阶段02 — 主题确定,必须生成多个爆款标题供用户选择
- 进入阶段03 — 标题确定,需要设计框架
- 进入阶段04 — 框架确定,开始写全文
- 进入阶段05 — 文章完成后,自动保存到指定目录
- 进入阶段06 — 文章保存后,自动生成配图提示词并保存,然后询问用户是否生成图片
每个阶段开始时:
- 告诉用户当前在哪个阶段
- 读取对应的阶段文件执行
- 明确这个阶段的目标
写作风格(核心规则)
核心特征(详见 writing_style.md):
- 口语化表达 — 像和朋友聊天
- 情绪外放 — 直接表达爽、不爽、兴奋
- 完整句子表达 — 用完整段落表达,避免过多短句碎片化
- 实用主义 — 少废话,多干货
- 真实体验 — 敢吐槽,敢承认不足
重要规则:
- ✅ 用完整的段落表达意思
- ❌ 避免过多短句碎片化
- ✅ 段落之间要有逻辑连接
- ✅ 保持阅读的连贯性
标题规则(重要)
阶段02必须执行:
- 分析爆款标题特点:数字型、疑问型、对比型、身份型、时间型、情绪型
- 生成5-10个标题选项
- 给出推荐理由
- 等用户选择后再继续
爆款标题公式:
- 数字+收益:"4个技巧,帮你XXX"
- 疑问+痛点:"为什么XXX还是XXX?"
- 对比+反差:"别人XXX,你却在XXX"
- 身份+场景:"致所有XXX的家长"
- 时间+紧迫:"开学前,你必须知道"
- 情绪共鸣:"看完这封信,我哭了"
文章保存规则
阶段05必须执行:
- 文件命名格式:
YYYYMMDD_文章标题关键词.md - 保存路径:
E:\Claude Code\claude\articles\青少年学习教练公众号\ - 文件格式:排版后的Markdown格式
- 保存时机:文章完成后自动保存
自动配图规则(重要)
阶段06自动执行:
文章保存后,自动生成配图提示词并保存,然后询问用户是否需要生成图片。
-
自动生成配图提示词:
- 封面图 + 2-3张信息图 + 结尾引导图
- 根据文章内容,使用
image_templates/中的模板 - 保存格式:与文章同名,添加
_配图提示词.md - 保存路径:与文章同目录
-
询问用户是否生成图片:
- 展示已生成的配图提示词
- 询问:"是否需要调用API生成图片?"
- 用户确认后,才调用
scripts/generate_images.py生成
配图提示词模板:
- 封面图:
image_templates/cover.md - 信息图:
image_templates/infographic.md - 引导图:
image_templates/cta.md - 风格基准:
image_templates/style-block.md
文件结构
wechat-article-writer/
├── SKILL.md # 主文件
├── writing_style.md # 写作风格指南(必读)
├── stages/
│ ├── 01-topic.md # 选题定位
│ ├── 02-title.md # 标题优化(爆款标题公式)
│ ├── 03-framework.md # 框架搭建
│ └── 04-writing.md # 全文撰写
├── templates/
│ ├── article-structure.md # 文章结构模板
│ └── title-formulas.md # 标题公式库
├── image_templates/ # 配图模板
│ ├── style-block.md # 风格基准
│ ├── cover.md # 封面图模板
│ ├── infographic.md # 正文信息图模板
│ └── cta.md # 结尾引导图模板
├── scripts/ # 图片生成脚本
│ ├── image.env # API配置(已配置密钥)
│ ├── image.env.example # API配置示例
│ ├── generate_images.py # 批量生成脚本
│ └── README.md # 使用说明
└── examples/
└── sample-article.md # 优秀文章示例
文章类型
| 类型 | 特点 | 字数 | 适用场景 |
|---|---|---|---|
| 干货教程 | 步骤清晰、可操作 | 2500-3000 | 技能分享、工具介绍 |
| 观点文章 | 观点鲜明、有理有据 | 2500-3000 | 行业分析、思考感悟 |
| 故事案例 | 情节吸引、共鸣强 | 2500-3000 | 个人经历、案例分享 |
| 列表盘点 | 信息量大、易读性强 | 2500-3000 | 资源推荐、方法总结 |
统一字数标准:2500-3000字
配图API配置
当前配置(scripts/image.env):
API_KEY=88e6f80c14cb40e4ba6d5bfe702d6aac.74cOvJgmo1t48yrv
MODEL=glm-image
SIZE=900x383
支持的模型:
- glm-image:标准图片生成模型(默认)
- cogview-4:高级图片生成模型
图片尺寸规则:
- 默认尺寸: 900×383 像素(头条封面图推荐)
- 核心内容区: 中心约 383×383 像素范围内(防信息丢失)
注意事项
- 用户掌控:用户可随时说"继续"、"重写"、"换个方向"
- 保持风格:按照
writing_style.md的要求写作 - 完整句子:用完整段落表达,避免短句碎片化
- 标题选择:必须提供多个爆款标题供用户选择
- 自动保存:完成后自动保存文章+配图提示词
- 自动配图:文章保存后自动生成配图提示词
- 数据准确:涉及数据时,标注来源或建议验证
- 避免套路:少用"震惊"、"终于"等过度夸张词
- 字数控制:目标2500-3000字
Comments
Loading comments...
