# How to Use the /investment-research Skill in AI Berkshire: Complete Guide

> Master the /investment-research skill in AI Berkshire. Get a comprehensive seven-module analysis synthesizing top investor insights and financial data. Start researching smarter today.

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

---

**TLDR:** Invoke `/investment-research` followed by a company ticker or name (e.g., `/investment-research 腾讯`) to trigger a seven-module parallel analysis pipeline that synthesizes investment perspectives from Warren Buffett, Charlie Munger, Duan Yongping, and Li Lu, outputting a structured markdown report with confidence ratings and financial verification.

The `/investment-research` skill in the `xbtlin/ai-berkshire` repository implements the flagship "四大师综合分析" (Four Masters Comprehensive Analysis) workflow. This open-source tool orchestrates a multi-agent research pipeline defined in [`skills/investment-research.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-research.md) that combines first-principles business analysis with rigorous financial verification to generate institutional-grade investment memos.

## Installation and Setup

Before invoking the skill, ensure it is registered in your AI coding environment. The repository provides automated installers for both Claude Code and OpenAI Codex.

For **Claude Code**, run the bash installer to copy the skill into the global command directory:

```bash
bash scripts/install-claude-commands.sh

```

For **Codex**, the skill wrapper is auto-generated at [`codex-skills/investment-research/SKILL.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-skills/investment-research/SKILL.md), linking the markdown source to the Codex runtime. Verify the skill appears in your command palette by checking the skill registry located in the installation target directory.

## Basic Usage Commands

The skill accepts a company identifier (ticker or Chinese name) as its primary argument.

### Command-Line Invocation

Execute the full deep-research workflow directly in your AI assistant chat:

```bash

# Basic analysis on Tencent

/investment-research 腾讯

# With optional scenario flag (requires custom argument parsing)

/investment-research 腾讯 --scenario three

```

### Programmatic Access

Trigger the skill from Python scripts using the Codex runtime interface:

```python
python3 -c "import codex; codex.run('investment-research', '腾讯')"

```

## The Seven-Module Research Pipeline

The skill file at [`skills/investment-research.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-research.md) (lines 13-92) defines a sequential yet parallelizable workflow. Each module corresponds to a specific investment master's philosophy.

### Pre-Research Bias Check (Lines 13-31)

Before data collection, the skill rates the *information richness* of the target (A/B/C classification) and executes the "AI research bias self-awareness" checklist. This prevents over-confidence when data are scarce, forcing the system to annotate low-confidence sections explicitly.

### Data Collection and Cross-Validation (Lines 35-53)

A background **Task** agent gathers raw financial data, market share statistics, and management biographies. All quantitative inputs are cross-validated by the **financial-rigor tool** at [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) (lines 55-92) before entering the analysis phase.

### Business Essence Analysis (Duan Yongping)

Based on lines 20-25 of the skill definition, this module applies first-principles questioning regarding customer value, repeatability of purchase, competitive dynamics, and management decision-making quality.

### Moat Assessment (Buffett)

Identifies durable competitive advantages using Buffett's economic fortress framework, evaluating pricing power, switching costs, and network effects.

### Reverse Thinking (Munger)

Lines 46-48 force "what-if-the-company-dies?" scenario analysis, inverting the investment thesis to identify potential failure modes before confirming bullish assumptions.

### Civilization Trend Evaluation (Li Lu)

Evaluates long-term macro forces and secular trends that could impact the business over decade-long horizons, filtering out companies swimming against historical currents.

### Valuation and Safety Margin (Lines 81-86)

Computes multi-scenario target prices using exact arithmetic. The rigor tool performs calculations with Python's `decimal.Decimal` to eliminate floating-point errors in market-cap and PE computations.

## Parallel Agent Architecture

Internally, the skill launches **four independent agents** (one per master), each executing the full data-gather-analyze-report cycle simultaneously. A **Team-Lead** agent collates these parallel outputs, ensuring redundancy and cross-perspective validation (see the architecture diagram in [`README.md`](https://github.com/xbtlin/ai-berkshire/blob/main/README.md), lines 31-45).

This architecture means the Buffett agent evaluates moats while the Munger agent stress-tests failure modes concurrently, reducing total research time without sacrificing depth.

## Financial Verification and Rigor

All numeric calculations undergo verification through [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py). For manual verification of specific figures, invoke the tool directly:

```bash
python3 ~/ai-berkshire/tools/financial_rigor.py verify-market-cap \
  --price 510 --shares 9.11e9 --reported 4.65e12 --currency HKD

```

The tool validates market-cap calculations, cross-references multi-source data, and embeds output logs as an appendix in the final report, guaranteeing reproducibility.

## Output Structure and Interpretation

The skill emits a structured markdown report containing three critical components:

1. **Information-richness rating** (A/B/C) and confidence annotation at the document header
2. **综合决策备忘录** (Integrated Decision Memo) table summarizing each master's view (lines 50-60)
3. **镜子测试** (Mirror Test) verdict requiring a five-sentence justification paragraph that forces the AI to explicitly state whether the investment passes or fails based on the synthesized analysis

## Summary

- The `/investment-research` skill combines four legendary investment frameworks into a single command.
- Install via [`scripts/install-claude-commands.sh`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/install-claude-commands.sh) or use the Codex wrapper at [`codex-skills/investment-research/SKILL.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-skills/investment-research/SKILL.md).
- The workflow runs seven modules: bias check, data collection, business essence, moat analysis, reverse thinking, civilization trends, and valuation.
- Four parallel agents (one per master) execute simultaneously, coordinated by a Team-Lead agent.
- All financial calculations use `decimal.Decimal` for exact arithmetic and are validated by [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py).
- Output includes confidence ratings, a decision memo table, and a mandatory mirror-test verdict.

## Frequently Asked Questions

### How do I install the /investment-research skill in my Claude Code environment?

Run the installation script [`scripts/install-claude-commands.sh`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/install-claude-commands.sh) from the repository root. This copies the skill definition from [`skills/investment-research.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-research.md) into Claude's global command directory, making `/investment-research` available as a native slash command. Verify installation by checking that the skill appears in your Claude Code command palette.

### What data sources does the investment-research skill use?

The skill delegates data gathering to a background Task agent that aggregates financial statements, market share data, and management information. All quantitative inputs are cross-validated by the [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) utility before analysis. The system prioritizes primary sources and flags external data with low verification confidence in the final report.

### How does the skill handle low-information scenarios?

During the pre-research phase (lines 13-31), the skill rates information richness as A, B, or C. If data is insufficient (C rating), the system activates the "AI research bias self-awareness" checklist, forcing explicit confidence annotations and preventing false precision. The final output will prominently display uncertainty warnings and avoid definitive buy/sell recommendations when data quality is poor.

### Can I customize the analysis modules or add additional investment masters?

The skill architecture supports extension through the markdown definition in [`skills/investment-research.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-research.md). You can modify the seven-module sequence by editing the prompt templates between lines 20-92. To add a fifth master, create a new agent instance in the parallel architecture (documented in [`README.md`](https://github.com/xbtlin/ai-berkshire/blob/main/README.md), lines 31-45) and add corresponding lens-specific prompts to the skill file.