← 返回
内容创作 Key

WeChat Article Writer

End-to-end 微信公众号 article writing and publishing — from topic ideation to published article, with quality gates.
End-to-end 微信公众号 article writing and publishing — from topic ideation to published article, with quality gates.
chunhualiao
内容创作 clawhub v2.4.1 2 版本 100000 Key: 需要
★ 1
Stars
📥 1,136
下载
💾 3
安装
2
版本
#latest

概述

wechat-article-writer

> 从选题到发布的公众号一体化写作工作流

Multi-agent pipeline: Orchestrator delegates writing and reviewing to independent subagents. The orchestrator never writes or reviews — it routes, tracks versions, and enforces quality gates.

Setup

bash <skill-dir>/scripts/setup.sh <workspace-dir>

Installs: bun runtime, bundled baoyu renderer deps, and a persistent preview server (wechat-preview.service, port 8898, auto-restart).

Scope

Handles: Topic research → Chinese-first writing → quality review → scrapbook illustrations → WeChat formatting → publishing to WeChat draft box (via Official Account API or CDP browser automation).

Does NOT handle: Git/version control, non-WeChat platforms, post-publish analytics, WeChat messaging/customer service.

Ends at: Article saved to WeChat draft box. User publishes manually.


Commands

Trigger any command below, or see skill.yml for the full trigger pattern list.

CommandWhat it does
----------------------
forge topic XResearch trending angles, propose 3 options with hooks
forge write XFull pipeline: research → publish (9 steps)
forge draft XWrite + format only, stop before illustrations/publish (steps 1-7)
forge publish Publish an existing draft to WeChat
forge preview Render preview, run format quality checks
forge voice trainAnalyze past articles to extract voice profile
forge statusShow pipeline status and pending drafts

If no subject given, loads from session.json (set by forge topic). See references/data-layout.md.


Pipeline (9 Steps)

State persists to pipeline-state.json — survives compaction. See references/pipeline-state.md.

#StepWhoDetails
-----------------------
1Research + PrepOrchestrator(a) web_search for topic angles + 5-8 sources. (b) Verify each source exists (fetch title/authors/venue). Save as sources.json. (c) Load voice profile. (d) Generate outline (6-8 sections), save outline.md.
2WriteWriter subagentChinese-first draft. Writer MUST cite only from sources.json or mark [UNVERIFIED]. See references/writer-prompt.md
3ReviewReviewer subagentBlind 8-dimension craft scoring. See references/reviewer-rubric.md
4aRevise (auto)Writer subagentMax 2 automated cycles. Loop back to Step 3 if score < threshold.
4bRevise (human)Human-in-the-loopIf still below threshold after 2 auto cycles, user provides direction. Pauses pipeline.
5Fact-checkFact-Checker subagentVerify every claim via web search. Produces corrections + reference list. Max 2 fact-check cycles (corrections → re-verify). See references/fact-checker-prompt.md
6FormatScriptbash scripts/format.sh [draft-file] [theme] — baoyu renderer (default theme: classic WeChat style). Themes: default/grace/simple. If fact-check required >3 text changes, Orchestrator does a spot re-review (Reviewer scores only changed paragraphs, not full article).
7PreviewHumanOpen http://:8898/formatted.html (persistent preview server, systemd wechat-preview.service), await text approval
8Illustrate + Embedarticle-illustrator + scriptGenerate scrapbook images (AFTER text approval). ~$0.06/article via Z.AI (preferred, ~$0.015/image) or ~$0.50 via OpenRouter.
9PublishOrchestratorThree paths — check in order: (C) WeChat Official Account API via appid+appsecret (credentials at wechat_secrets_path in config.json) — preferred, most reliable; (A) OpenClaw browser tool with base64 chunking for macOS/Titan; or (B) direct CDP WebSocket for Linux/remote. Paths A+B use two-phase injection (text first, then images via clipboard blob paste). See references/browser-automation.md

Key Rules

  • Writer never self-reviews. Reviewer is blind — never sees outline or brief.
  • Illustrations LAST. Most expensive step. Only after user approves text.
  • article-illustrator is the ONLY image method. Must follow full scrapbook pipeline: read references/scrapbook-prompt.md → generate JSON plan with 300-500 char descriptions → call generate.py. Never bare prompts. Prefer Z.AI provider (~$0.015/image, 97.9% Chinese text accuracy) over OpenRouter (~$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 clipboard blob paste (WeChat auto-uploads to CDN). Verify image count + positions after insertion.
  • Browser tool vs direct CDP. On macOS/Titan where OpenClaw manages the browser, you MUST use the browser tool (Path A). Playwright isolates page contexts — external CDP connections see zero targets. On Linux with standalone Chrome, use direct CDP (Path B). See references/browser-automation.md.
  • Base64 chunking for browser tool. Raw HTML in the browser tool's fn parameter breaks due to escaping conflicts. Always base64-encode HTML, store in chunks via window._b, then atob() and inject. Track chunks_stored in pipeline state for compaction recovery.
  • Always save as draft. User publishes manually.
  • Check for WeChat API credentials first. If wechat_secrets_path credentials file (see config.json) exists, use Path C (API) — no browser required, more reliable. Fall back to Path A/B only if no credentials.
  • ensure_ascii=False is mandatory for WeChat API. requests(..., json=payload) escapes Chinese as \u5199\u4e66. Always use data=json.dumps(..., ensure_ascii=False).encode('utf-8').
  • Topic fidelity: Every revision preserves the article's 初心 (purpose statement in pipeline-state.json). Drift = FAIL.

Image Counts by Type

TypeMinMax
----------------
科普35
教程36
观点24
资讯23

Review Dimensions

Reviewer scores 0-10 on craft-observable dimensions (not outcome predictions):

DimensionWeight
-------------------
Insight Density (洞察密度)20%
Originality (新鲜感)15%
Emotional Resonance (情感共鸣)15%
Completion Power (完读力)15%
Voice (语感)10%
Evidence (论据)10%
Content Timeliness (内容时效性)10%
Title (标题)5%

Pass: weighted_total ≥ 9.0, no dimension below 7, Originality ≥ 8.

Hard blockers (instant FAIL): 教材腔, 翻译腔, 鸡汤腔, 灌水, 模板化, 标题党.

Full rubric with scoring criteria: references/reviewer-rubric.md


Architecture

Orchestrator (Main Agent) — routes, tracks, enforces gates
    ├── Writer Subagent — drafts + revises (Opus model)
    ├── Reviewer Subagent — blind scoring (Sonnet model)
    ├── Fact-Checker Subagent — verifies claims via web search (Sonnet model)
    └── article-illustrator — scrapbook images (after text passes)

Configuration

Configure via ~/.wechat-article-writer/config.json (generated by scripts/setup.sh):

FieldDefaultDescription
-----------------------------
default_article_type"教程"Default article type (科普/教程/观点/资讯)
wechat_secrets_path~/.wechat-article-writer/secrets.jsonPath to WeChat API credentials
chrome_debug_port18800Chrome CDP port for browser automation (Path B)
wechat_authorAuthor name shown in WeChat draft
word_count_targetsSee defaultsMin/max word counts per article type

See references/data-layout.md for full config schema.


References

FileWhen to load
-------------------
references/writer-prompt.mdStep 2 (writing) and Step 4 (revision)
references/reviewer-rubric.mdStep 3 (review) — full 8-dimension scoring criteria
references/fact-checker-prompt.mdStep 5 — claim extraction, verification, correction protocol
references/viral-article-traits.mdStep 2 — Writer self-check list
references/pipeline-state.mdOn resume or compaction — state machine schema + protocol
references/browser-automation.mdStep 9 — Two publishing paths: Path A (OpenClaw browser tool) and Path B (direct CDP). Includes base64 chunking, image insertion, save verification.
references/LESSONS_LEARNED.mdHard-won lessons from production publishing sessions (escaping, selectors, mixed content, costs)
references/data-layout.mdDirectory structure, slug generation, config/session schemas
references/agent-config.mdSetup — Gateway, AGENTS.md, environment config
references/quality-checks.mdSteps 3, 7 — content/format quality gates
references/figure-generation-guide.mdStep 8 — illustration placement heuristics
references/wechat-html-rules.mdStep 6 — what HTML/CSS works in WeChat
references/templates.mdStep 1 — starting templates by article type
references/voice-profile-schema.jsonStep 1 — voice profile field definitions
references/default-voice-profile.jsonStep 1 — fallback voice profile

版本历史

共 2 个版本

  • v2.4.1 当前
    2026-03-29 12:15 安全 安全
  • v2.3.3
    2026-03-07 02:00

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 858 📥 199,020
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 294 📥 136,362
communication-collaboration

WeChat Article Extractor

chunhualiao
Extract full text and figures from a WeChat public account (微信公众号) article URL and save as a clean Markdown file. Handle
★ 2 📥 1,774