# How the wechat-article Skill Generates WeChat Articles: A 4-Phase Multi-Agent Workflow

> Discover how the wechat-article skill uses a 4-phase multi-agent workflow to generate polished WeChat articles from user topics research agents author personas and parallel editing.

- Repository: [Xbt Lin/ai-berkshire](https://github.com/xbtlin/ai-berkshire)
- Tags: how-to-guide
- Published: 2026-07-25

---

**The `wechat-article` skill orchestrates a four-phase pipeline that transforms user topics into publication-ready WeChat articles through coordinated research agents, specialized author personas, and parallel editing workflows defined in the canonical [`skills/wechat-article.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/wechat-article.md) file.**

The `xbtlin/ai-berkshire` repository provides the `wechat-article` skill as a complete automation framework for producing high-quality Chinese technical content. By leveraging multiple AI agents with distinct responsibilities, the skill handles everything from initial research and material collection to final figure extraction and citation management.

## Phase 1: Research and Material Collection

The workflow begins with three sequential steps designed to build a comprehensive knowledge base before any writing occurs.

### Positioning and Requirements

According to lines 41-47 in [`skills/wechat-article.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/wechat-article.md), the skill first clarifies five critical parameters: **target audience**, **depth level**, **article length**, **PDF requirements**, and **writing style**. This positioning ensures subsequent agents understand the strategic context for the piece.

### Parallel Deep Research

Three research agents operate simultaneously (lines 51-66) to gather diverse perspectives:

- **Core Content Agent**: Extracts primary technical material and key arguments
- **Industry Background Agent**: Provides market context and historical development  
- **Competitor Analysis Agent** (optional): Reviews existing coverage to identify gaps

### Material Framework Synthesis

After research completion, the skill consolidates findings into a structured framework (lines 68-75) containing the **core thesis**, **key data points**, **figure list**, and **article outline**. This document serves as the single source of truth for the drafting phase.

## Phase 2: Author Agent Drafting

The **Author Agent** receives a detailed prompt specification (lines 84-101) that mandates specific stylistic constraints for WeChat publication:

- **Language**: Chinese output with English annotations for first-time technical terms
- **Tone**: Conversational ("talk to a smart friend") rather than academic
- **Formatting**: LaTeX formulas, strict paragraph limits (≤ 4 lines), and strategic use of analogies
- **Structure**: Required sections include a compelling hook, background context, core technical deep-dives, case studies, industry impact analysis, and a share-worthy conclusion (lines 101-108)

The agent produces a full draft matching the `{目标字数}` (target word count) placeholder specified during positioning.

## Phase 3: Parallel Editing and Reader Review

Unlike sequential editing workflows, the `wechat-article` skill runs two evaluation agents **simultaneously** on the completed draft:

**Editor Agent** (lines 39-46): Evaluates technical quality through the lens of professional publishing standards, checking title strength, hook effectiveness, logical flow, depth-to-readability balance, pacing, figure insertion points, and concluding impact. The agent outputs structured feedback including an overall rating, alternative title suggestions, section-by-section edits, and the top three improvement priorities (lines 51-56).

**Reader Agent** (lines 69-77): Assumes the target audience persona to evaluate subjective experience, answering eight specific questions about comprehension difficulty, hook engagement, formula readability, analogy effectiveness, length appropriateness, and social share-ability.

## Phase 4: Finalization and Output Generation

The final phase merges feedback streams and prepares publication assets.

### Feedback Synthesis and Revision

The skill merges Editor and Reader feedback (lines 86-94), prioritizing any issue flagged by **both** agents as critical. The draft undergoes revision according to merged feedback while preserving the "big-picture analogy" and ensuring every formula includes a plain-language explanation (lines 98-104).

### Automated Figure Extraction

For paper-based articles, the skill executes automated figure processing:

1. Renders PDF pages using `pdftoppm` at ≥ 900 DPI
2. Crops images using PIL
3. Saves final PNGs (≥ 500 KB) to `assets/{主题简称}/`

Figure markdown links are inserted directly into the article text at line 98.

### Final Output Structure

The completed article saves to `reports/公众号-{主题关键词}-{YYYYMMDD}.md` following the naming convention at lines 28-32. A citation block containing the original source link is appended automatically (lines 19-22), ensuring academic integrity and traceability.

## Implementation Examples

Invoke the skill from the command line using the Claude-compatible syntax:

```bash
$ wechat-article "大模型OPD技术解读"

```

The Author Agent receives prompt context structured as:

```json
{
  "phase": "author",
  "prompt": "你是一位深度技术写作者（Author Agent），需要写一篇微信公众号文章。..."
}

```

Editor feedback returns in structured YAML format:

```yaml
editor_feedback:
  overall: "结构清晰，深度足够，但开头缺乏强钩子。"
  title_suggestions:
    - "大模型OPD：颠覆计算的下一站"
    - "从理论到实践：OPD技术全解析"
  section_edits:
    - "原文: … → 建议: …"
  top_issues:
    - "开头弱 → 加入关键数据"
    - "公式密集 → 用图表替代"
    - "结尾缺乏传播力 → 添加一句话结论"

```

## Key Source Files

The skill architecture spans several critical files in the repository:

- **[`skills/wechat-article.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/wechat-article.md)**: Canonical skill definition containing full workflow specifications, agent prompts, and design rationale (referenced throughout lines 28-108)
- **[`codex-skills/wechat-article/SKILL.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-skills/wechat-article/SKILL.md)**: Auto-generated Codex adaptation pointing to the canonical definition
- **[`codex-prompts/wechat-article.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-prompts/wechat-article.md)**: Entry point instructions for loading the skill in Codex sessions
- **[`AGENTS.md`](https://github.com/xbtlin/ai-berkshire/blob/main/AGENTS.md)**: Repository-wide knowledge-quality rules inherited by all agents, including date handling and data cross-check requirements
- **[`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py)**: Shared utility for data validation used during the research phase

## Summary

- The `wechat-article` skill implements a **four-phase workflow** (Research → Drafting → Parallel Editing → Finalization) defined in [`skills/wechat-article.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/wechat-article.md)
- **Three research agents** collect material simultaneously before the Author Agent begins writing
- **Parallel editing** by Editor and Reader agents ensures both technical accuracy and audience engagement
- **Automated figure extraction** uses `pdftoppm` and PIL to process PDFs into publication-ready PNGs stored in `assets/`
- Final articles save to `reports/` with standardized naming `公众号-{主题关键词}-{YYYYMMDD}.md` and include automated citation blocks

## Frequently Asked Questions

### What is the wechat-article skill?

The `wechat-article` skill is a multi-agent automation framework within the `xbtlin/ai-berkshire` repository that generates publication-ready WeChat articles. It coordinates specialized AI agents for research, writing, editing, and figure processing to transform simple topic descriptions into structured technical content following Chinese social media best practices.

### How does parallel editing improve article quality?

Parallel editing runs the **Editor Agent** and **Reader Agent** simultaneously, evaluating the draft from both professional publishing standards and audience perspective. The skill merges both feedback streams and prioritizes issues flagged by both agents, ensuring corrections address both technical accuracy and reader comprehension without sequential bottlenecks.

### What technical requirements exist for figure extraction?

Figure extraction requires `pdftoppm` configured for ≥ 900 DPI resolution and Python Imaging Library (PIL) for cropping. Output PNGs must exceed 500 KB to ensure WeChat publication quality, with files organized under `assets/{主题简称}/` and referenced via markdown links automatically inserted during finalization.

### How do I invoke the wechat-article skill?

Execute the skill using Claude-compatible invocation syntax: `$ wechat-article "your topic here"`. The skill automatically loads prompt definitions from [`skills/wechat-article.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/wechat-article.md) and coordinates the multi-agent workflow through completion, delivering the final markdown file to the `reports/` directory.