WeChat Article Writer
v2.4.1End-to-end 微信公众号 article writing and publishing — from topic ideation to published article, with 质量 gates.
运行时依赖
安装命令
点击复制本土化适配说明
WeChat Article Writer 安装说明: 安装命令:["openclaw skills install wechat-article-forge"] 支持国内镜像加速,使用 --registry https://cn.longxiaskill.com 参数可加速下载 该技能用于微信相关操作,可能需要相应的平台账号或API密钥
技能文档
wechat-article-writer
从选题到发布的公众号一体化写作工作流
Multi-代理 流水线: 编排器 delegates writing and reviewing to independent sub代理s. The 编排器 never writes or reviews — it 路由s, 追踪s versions, and enforces 质量 gates.
设置up bash <技能-dir>/scripts/设置up.sh
安装s: bun 运行time, bundled baoyu 渲染器 deps, and a persistent preview server (wechat-preview.服务, port 8898, auto-re启动).
Scope
Handles: Topic re搜索 → Chinese-first writing → 质量 review → scrapbook illustrations → WeChat 格式化ting → publishing to WeChat draft box (via Official Account API or CDP browser 自动化).
Does NOT handle: Git/version control, non-WeChat 平台s, post-publish 分析, WeChat messaging/customer 服务.
Ends at: Article saved to WeChat draft box. User publishes manually.
Commands
Trigger any command below, or see 技能.yml for the full trigger pattern 列出.
Command What it does forge topic X Re搜索 trending angles, propose 3 options with hooks forge write X Full 流水线: re搜索 → publish (9 steps) forge draft X Write + 格式化 only, 停止 before illustrations/publish (steps 1-7) forge publish Publish an existing draft to WeChat forge preview Render preview, 运行 格式化 质量 检查s forge voice trAIn Analyze past articles to 提取 voice 性能分析 forge 状态 Show 流水线 状态 and pending drafts
If no subject given, loads from 会话.json (设置 by forge topic). See references/data-layout.md.
流水线 (9 Steps)
状态 persists to 流水线-状态.json — survives compaction. See references/流水线-状态.md.
# Step Who DetAIls 1 Re搜索 + Prep 编排器 (a) 网页_搜索 for topic angles + 5-8 sources. (b) 验证 each source exists (fetch title/authors/venue). Save as sources.json. (c) Load voice 性能分析. (d) 生成 outline (6-8 sections), save outline.md. 2 Write Writer sub代理 Chinese-first draft. Writer MUST cite only from sources.json or mark [UNVERIFIED]. See references/writer-prompt.md 3 Review Reviewer sub代理 Blind 8-dimension craft scoring. See references/reviewer-rubric.md 4a Revise (auto) Writer sub代理 Max 2 automated cycles. Loop back to Step 3 if score < threshold. 4b Revise (human) Human-in-the-loop If still below threshold after 2 auto cycles, user provides direction. 暂停s 流水线. 5 Fact-检查 Fact-检查er sub代理 验证 every clAIm via 网页 搜索. Produces corrections + reference 列出. Max 2 fact-检查 cycles (corrections → re-验证). See references/fact-检查er-prompt.md 6 格式化 Script bash scripts/格式化.sh [draft-file] [theme] — baoyu 渲染器 (default theme: classic WeChat style). Themes: default/grace/simple. If fact-检查 required >3 text changes, 编排器 does a spot re-review (Reviewer scores only changed paragraphs, not full article). 7 Preview Human Open http://:8898/格式化ted.html (persistent preview server, 系统d wechat-preview.服务), awAIt text 应用roval 8 Illustrate + Embed article-illustrator + script 生成 scrapbook images (AFTER text 应用roval). ~$0.06/article via Z.AI (preferred, ~$0.015/image) or ~$0.50 via Open路由r. 9 Publish 编排器 Three paths — 检查 in order: (C) WeChat Official Account API via 应用id+应用secret (凭证s at wechat_secrets_path in config.json) — preferred, most reliable; (A) OpenClaw browser 工具 with base64 chunking for macOS/Titan; or (B) direct CDP 网页Socket for Linux/remote. Paths A+B use two-phase injection (text first, then images via 命令行工具pboard blob paste). See references/browser-自动化.md Key Rules Writer never self-reviews. Reviewer is blind — never sees outline or brief. Illustrations LAST. Most expensive step. Only after user 应用roves text. article-illustrator is the ONLY image method. Must follow full scrapbook 流水线: read references/scrapbook-prompt.md → 生成 JSON plan with 300-500 char descriptions → call 生成.py. Never bare prompts. Prefer Z.AI 提供者 ($0.015/image, 97.9% Chinese text accuracy) over Open路由r ($0.12/image). Two-phase image injection. Base64 images are stripped on save. Inject text-only HTML first, then insert each image at the correct position via 命令行工具pboard blob paste (WeChat auto-上传s to CDN). 验证 image count + positions after insertion. Browser 工具 vs direct CDP. On macOS/Titan where OpenClaw manages the browser, you MUST use the browser 工具 (Path A). Playwright isolates page 上下文s — external CDP connections see zero tar获取s. On Linux with standalone Chrome, use direct CDP (Path B). See references/browser-自动化.md. Base64 chunking for browser 工具. Raw HTML in the browser 工具's fn parameter breaks due to escAPIng conflicts. Always base64-encode HTML, store in chunks via window._b, then atob() and inject. 追踪 chunks_stored in 流水线 状态 for compaction 恢复y. Always save as draft. User publishes manually. 检查 for WeChat API 凭证s first. If wechat_secrets_path 凭证s file (see config.json) exists, use Path C (API) — no browser required, more reliable. F