# How the Earnings-Team Skill Generates WeChat Articles: A Multi-Agent Pipeline for Financial Analysis

> Discover how the earnings-team skill, a multi-agent pipeline, transforms earnings data into WeChat articles. Learn about its parallel research, synthesis, and publication refinement process.

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

---

**The earnings-team skill is a fully-automated multi-agent pipeline that transforms raw earnings data into publication-ready WeChat articles through three sequential phases: parallel research by four specialized master agents, synthesis by a Team Lead, and final publication refinement by an Editor and Reader agent.**

The earnings-team skill in the `xbtlin/ai-berkshire` repository orchestrates a sophisticated workflow that converts corporate earnings reports into polished WeChat official account content. This slash-command skill leverages agent-tool primitives defined in [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md) to execute research, analysis, and editorial tasks concurrently, producing investor-ready articles that balance Warren Buffett-style analytical rigor with mobile-first readability.

## Three-Phase Architecture of the Earnings-Team Skill

### Phase 1: Parallel Research by Four Master Agents

The pipeline initiates four concurrent agents, each modeled after a specific investment philosophy. **段永平** (Duan Yongping) analyzes business model durability, **巴菲特** (Buffett) audits financial quality using delegated calculations, **芒格** (Munger) evaluates competitive landscapes, and **李录** (Li Lu) hunts for asymmetric risk signals.

Each master retrieves original filings, earnings call transcripts, and shareholder letters, then grades data availability (A-C) according to lines 33-40 of [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md) to determine analysis depth. They emit independent markdown reports (≈2KB each) with color-coded signals (green/amber/red) saved as `{company}-earnings-{period}-{master}.md`.

### Phase 2: Synthesis by the Team Lead

Once all four master reports complete, the **Team Lead** agent cross-compares findings to surface consensus, flag contradictions, and highlight overlooked "corner" items. As implemented in lines 87-93 of [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md), the Team Lead assembles a unified research draft (`{公司名}-earnings-{期间}-研究底稿.md`) containing an executive summary, key changes, scoring table, and a "what would the masters do?" decision matrix.

### Phase 3: Publication via Editor and Reader Agents

The **Editor** (微信公众号编辑) rewrites the research draft into a conversational, short-paragraph layout optimized for WeChat's mobile UI (≈1K-3K words). Simultaneously, the **Reader** (普通投资者评审) scores the draft on readability, information value, credibility, and actionability, returning concrete "must-fix" and "nice-to-add" suggestions per the template in [`skills/wechat-article.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/wechat-article.md) (lines 31-53).

The Team Lead applies all mandatory changes, optionally incorporates useful enhancements, and performs final proofreading to produce `reports/{company}/{company}-earnings-{period}.md`, a file formatted for immediate copying into the WeChat backend.

## Key Technical Implementation Details

**Parallel Execution**: The skill uses `/agent start …` primitives to launch the four masters simultaneously (lines 55-57 of [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md)), reducing latency by conducting business-model, financial-quality, competitive, and risk analyses concurrently rather than sequentially.

**Data-Availability Grading**: An A-B-C rating system (lines 33-40) dynamically adjusts analysis depth based on filing completeness and transcript availability, ensuring the pipeline adapts to disclosure quality without over-committing to sparse data.

**File-System Contract**: The skill writes to a deterministic directory tree under `reports/{company}/` (lines 99-108), creating intermediate artifacts including master analyses, research drafts, and reader reviews before emitting the final publishable markdown.

**Financial Validation**: Calculations are delegated to **[`financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/financial_rigor.py)**, which cross-validates revenue, cash-flow, and valuation metrics (lines 110-114) before synthesis begins, ensuring the Buffett agent's financial audit is mathematically rigorous.

## Running the Earnings-Team Skill

**CLI Invocation**:

```bash

# Analyze Tencent Q4 2025 earnings and generate WeChat article

/clerk /earnings-team "腾讯 2025Q4"

```

**Programmatic Execution**:

```python
import subprocess

def run_earnings_team(company, period):
    arg = f"{company} {period}"
    subprocess.run(["clerk", "/earnings-team", arg], check=True)

run_earnings_team("腾讯", "2025Q4")

```

**Generated Directory Structure**:

```text
reports/腾讯/
├── 腾讯-earnings-2025Q4.md                # Final WeChat article (publishable)

├── 腾讯-earnings-2025Q4-研究底稿.md        # Unified research draft

├── 腾讯-earnings-2025Q4-段永平.md          # Business-model analysis

├── 腾讯-earnings-2025Q4-巴菲特.md          # Financial-quality audit

├── 腾讯-earnings-2025Q4-芒格.md            # Competitive-landscape review

├── 腾讯-earnings-2025Q4-李录.md            # Risk-signal investigation

└── 腾讯-earnings-2025Q4-读者评审.md        # Reader-agent review report

```

## Quality Assurance and Audit

Before publication, the Team Lead executes **[`report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/report_audit.py)** to verify data consistency and markdown structure. Run the audit utilities to validate the final article:

```bash

# Extract and verify financial data consistency

python3 ~/ai-berkshire/tools/report_audit.py extract \
   --report reports/腾讯/腾讯-earnings-2025Q4.md

# Generate final verdict

python3 ~/ai-berkshire/tools/report_audit.py verdict \
   --results results.json \
   --report reports/腾讯/腾讯-earnings-2025Q4.md

```

A **PASS** verdict indicates the article meets publishing standards and is ready for the WeChat official account backend.

## Summary

- The earnings-team skill operates through three distinct phases: parallel research, synthesis, and publication, orchestrated by a single slash-command invocation.
- Four specialized master agents conduct concurrent analyses of business models, financial quality, competitive position, and risk factors, each producing independent markdown reports.
- The Team Lead orchestrates synthesis and publication through Editor and Reader agents, ensuring content balances analytical depth with WeChat-optimized readability.
- All outputs follow a deterministic file-system contract under `reports/{company}/`, with final validation performed by [`financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/financial_rigor.py) and [`report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/report_audit.py) to guarantee data consistency.

## Frequently Asked Questions

### What is the earnings-team skill in ai-berkshire?

The earnings-team skill is a slash-command automation defined in [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md) that transforms raw corporate earnings data into publication-ready WeChat articles. It implements a multi-agent workflow where four investment-masters analyze financial data in parallel before an Editor and Reader refine the content for public distribution on WeChat official accounts.

### How do the four master agents differ in their analysis?

Each master applies a distinct analytical framework derived from their namesake investor: **段永平** evaluates business model durability and management quality, **巴菲特** audits financial statements for accounting rigor and moat width, **芒格** assesses competitive dynamics and industry structure, and **李录** identifies red flags and asymmetric downside risks. They operate independently but concurrently, producing separate markdown reports that the Team Lead synthesizes into a unified view.

### Why does the pipeline include a Reader agent?

The **Reader** agent (普通投资者评审) acts as a quality gate by scoring the drafted article on readability, credibility, and actionability from a non-technical retail investor's perspective. This "author-editor-reader" loop, defined in [`skills/wechat-article.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/wechat-article.md), ensures the final output communicates complex financial insights without requiring professional accounting knowledge, optimizing for the WeChat mobile reading experience.

### How can I verify the accuracy of the generated WeChat article?

Run the **[`report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/report_audit.py)** utility located in `tools/` to perform automated consistency checks on financial figures and markdown structure. Additionally, the **Buffett** agent invokes **[`financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/financial_rigor.py)** during the research phase to cross-validate revenue, cash-flow, and valuation calculations before synthesis begins, creating a double-validation layer for all quantitative claims.