# What Are the Typical Use Cases for the AI Berkshire Project?

> Discover the AI Berkshire project's typical use cases. Explore its AI-driven framework for financial analysis, company research, news attribution, and portfolio monitoring.

- Repository: [Xbt Lin/ai-berkshire](https://github.com/xbtlin/ai-berkshire)
- Tags: getting-started
- Published: 2026-07-04

---

**AI Berkshire is a modular, AI-driven research framework that deploys four value-investment masters as parallel agents to execute 19 distinct financial analysis skills, ranging from deep-dive company research to rapid news attribution and portfolio monitoring.**

The **ai-berkshire** project orchestrates multiple large language models to simulate the investment philosophies of Warren Buffett, Charlie Munger, Duan Yongping, and Li Lu. By dividing the system into discrete skills, parallel agent layers, and rigorous financial tools, it enables both individual investors and analysts to automate complex research workflows.

## Core Architecture: Three Layers

The project implements a three-tier architecture that separates intent from execution:

- **Skill Layer** – Defines *what* to analyze. The repository contains **19 distinct skills** catalogued in `skills/*.md`, covering workflows like `/investment-research`, `/quality-screen`, and `/news-pulse`.
- **Agent Layer** – Executes *who* performs the analysis. Each skill invocation spawns four parallel agents (one per master) that independently search, evaluate, and challenge one another before a team-lead agent aggregates results.
- **Tool Layer** – Guarantees *how* accurately. Precision utilities like [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) and [`tools/stock_screener.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/stock_screener.py) perform exact decimal calculations, cross-source validation, and data scraping to ensure financial rigor.

## Primary Use Cases by Skill Category

The **ai-berkshire** workflow centers on specific skill invocations. Each command triggers the full agent-orchestration pipeline, automatically engaging data retrieval, multi-perspective analysis, and report generation.

### Deep Fundamental Research

**`/investment-research`** – Conducts comprehensive four-master analysis of a listed company. The output is a structured decision memo scoring business quality, economic moat, management integrity, and safety margin.

**`/investment-team`** – Delivers the same depth as the research skill but runs all four agents in parallel for faster turnaround. Produces a consolidated multi-agent report with a one-sentence verdict and detailed scoring table.

**`/earnings-review`** – Performs line-by-line interpretation of earnings filings. Extracts full text, calculates key ratios, and provides narrative commentary on financial health.

### Screening and Filtering

**`/investment-checklist`** – Runs a six-gate Buffett-style pre-screen to quickly filter opportunities. Returns pass/fail status per gate plus a "mirror test" verdict to determine if deeper research is warranted.

**`/quality-screen`** – Applies fast quantitative filters to identify high-quality candidates before committing to full research cycles.

**`/industry-funnel`** and **`/industry-research`** – Execute market-wide scans that shortlist ≤10 targets, then perform deep-dives on the top three. Generates funnel-style shortlists and sector-level investment theses.

### Specialized Intelligence

**`/management-deep-dive`** – Focuses exclusively on leadership evaluation. Produces narrative assessments of CEO strengths, governance structures, and corporate culture.

**`/private-company-research`** – Assembles fragmented public data on unlisted firms. Returns company portraits with confidence-tagged data points and valuation ranges.

**`/news-pulse`** – Provides rapid attribution for price movements. Identifies drivers behind swings within minutes, categorizing causes as fund flows, sentiment shifts, or fundamental changes.

**`/dyp-ask`** – Acts as a thought-experiment tool that frames queries from Duan Yongping’s perspective, answering as "Duan Yongping would ask..."

### Portfolio Management

**`/portfolio-review`**, **`/thesis-tracker`**, and **`/thesis-drift`** – Enable ongoing monitoring of existing holdings. Outputs allocation suggestions, thesis-status dashboards, and drift analysis to detect when original investment premises no longer hold.

**`/financial-data`** – Retrieves and cross-validates key metrics (market cap, EPS, etc.) with source citations and variance alerts, ensuring downstream calculations use verified inputs.

## How to Invoke Skills

The repository supports both **Claude Code** (npm-installed) and **Codex** clients. Both entry points trigger the same underlying skill scripts located in `skills/` and `codex-skills/`.

### Claude Code Syntax

```bash

# Deep research on Tencent

/investment-research 腾讯

# Parallel team research on Meituan

/investment-team 美团

# Quick six-gate checklist

/investment-checklist 腾讯, 阿里巴巴, 美团, 拼多多

# Earnings analysis for PDD Q4 2025

/earnings-review PDD 2025Q4

# Industry screening on AI computing power

/industry-funnel AI算力

# News attribution for sudden price drop

/news-pulse 拼多多 跌12% 一周内

```

### Codex Syntax (after running install-codex-skills.sh)

```bash

# Full company analysis

investment-research 腾讯

# Fast parallel research

investment-team 美团

# Portfolio monitoring

portfolio-review 腾讯, 阿里巴巴, 美团

```

Each command automatically executes the **core workflow**: spin up four master agents → pull data via [`tools/xueqiu_scraper.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/xueqiu_scraper.py) or [`tools/ashare_data.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/ashare_data.py) → validate numbers with [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) → assemble a markdown report.

## Key Implementation Files

Understanding the source structure helps customize workflows:

- **`skills/*.md`** – Canonical skill definitions for Claude Code, specifying agent prompts and tool chains.
- **`codex-skills/*/SKILL.md`** – Auto-generated Codex skill packages created by [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py).
- **[`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py)** – Decimal-based valuation utilities and cross-validation logic.
- **[`tools/stock_screener.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/stock_screener.py)** – Screening algorithms leveraged by `/quality-screen` and industry funnel skills.
- **[`AGENTS.md`](https://github.com/xbtlin/ai-berkshire/blob/main/AGENTS.md)** – Design document detailing the three-layer architecture and agent interaction protocols.
- **`reports/`** – Example output reports demonstrating the structured decision memos produced by active skills.

## Summary

- **AI Berkshire** deploys four value-investment masters as parallel agents to reduce research bias and multiply analytical depth.
- The **skill-based interface** offers 19 specialized commands covering everything from quick checklists (`/investment-checklist`) to deep management analysis (`/management-deep-dive`).
- **Dual client support** via Claude Code (slash commands) and Codex (plain commands) ensures flexibility across different AI coding environments.
- **Financial rigor tools** ([`financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/financial_rigor.py), [`stock_screener.py`](https://github.com/xbtlin/ai-berkshire/blob/main/stock_screener.py)) guarantee precise calculations and verified data inputs for all outputs.
- Users can **chain skills**—for example, running `/quality-screen` before `/investment-research`—to balance analysis depth against computational cost.

## Frequently Asked Questions

### What makes AI Berkshire different from standard stock screeners?

Unlike static screeners, **AI Berkshire** employs multi-agent debate. Each skill invocation runs four independent agent perspectives (Buffett, Munger, Duan Yongping, Li Lu) that challenge each other's assumptions before converging on a consensus. This parallel architecture reduces confirmation bias while [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) ensures quantitative accuracy that generic screeners often lack.

### Can I use AI Berkshire for private companies or only public stocks?

Yes. The **`/private-company-research`** skill specifically handles unlisted firms by assembling fragmented public data and tagging confidence levels for each data point. While public companies benefit from richer real-time data feeds via [`tools/xueqiu_scraper.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/xueqiu_scraper.py), the framework adapts to limited information environments for private equity reconnaissance.

### How do I install and switch between Claude Code and Codex versions?

For Claude Code, install the skills directly from the repository root. For Codex, run [`scripts/install-codex-skills.sh`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/install-codex-skills.sh) to generate compatible packages. Both versions share the same underlying logic in `skills/*.md`, synchronized via [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py), ensuring consistent behavior regardless of client.

### Is the ai-berkshire project suitable for real-time trading decisions?

The framework excels at **research and thesis generation** rather than high-frequency execution. While **`/news-pulse`** provides rapid attribution within minutes, the system prioritizes financial rigor and multi-agent validation over latency. It is best suited for swing trading preparation, earnings preparation, and long-term value investing workflows where analysis depth outweighs millisecond speed.