How to Use the Investment Research Skill in AI Berkshire: Complete Guide to the Four Masters Workflow
The /investment-research skill in AI Berkshire executes a seven-module parallel analysis combining the investment philosophies of Warren Buffett, Charlie Munger, Duan Yongping, and Li Lu to generate rigorously validated research reports with explicit confidence ratings.
The AI Berkshire repository implements a sophisticated "四大师综合分析" (Four Masters Comprehensive Analysis) system that automates deep fundamental research. This guide explains how to use the Investment Research skill to analyze companies through the lens of history's greatest value investors, leveraging parallel AI agents and deterministic financial verification tools.
What Is the AI Berkshire Investment Research Skill?
The Investment Research skill is the flagship workflow in the AI Berkshire project located at skills/investment-research.md. It orchestrates four independent AI agents—each embodying the analytical framework of Buffett, Munger, Duan Yongping, or Li Lu—to simultaneously evaluate a target company.
A Team-Lead agent collates these parallel analyses into a unified markdown report featuring the "综合决策备忘录" (Comprehensive Decision Memo) and a mandatory "镜子测试" (Mirror Test) verdict. According to the source code in skills/investment-research.md, this architecture prevents the "single-agent hallucination" common in monolithic AI systems.
How to Invoke the Investment Research Skill
You trigger the workflow through Claude Code, Codex, or direct script invocation by passing a company ticker or name to the command parser.
Basic Command Syntax
Execute the skill by prefixing your query with /investment-research followed by the company identifier:
# Analyze Tencent using the Four Masters framework
/investment-research 腾讯
The command routes to skills/investment-research.md, which initializes the seven-module pipeline. The system automatically rates the target's information richness (A/B/C) and runs the "AI research bias self-awareness" checklist defined in lines 13-31 of the skill file.
Advanced Usage and Programmatic Access
For custom scenarios or automated workflows, invoke the skill through Python or specify additional parameters:
# Specify a custom analysis horizon (requires argument parsing extension)
/investment-research 腾讯 --scenario three
# Codex-style programmatic invocation
python3 -c "import codex; codex.run('investment-research', '腾讯')"
The skill registry installer at scripts/install-claude-commands.sh copies the markdown skill into Claude's global command directory, while codex-skills/investment-research/SKILL.md provides the Codex runtime wrapper.
The Seven-Module Research Pipeline
The workflow executes seven sequential stages, each designed to eliminate cognitive bias and ensure financial rigor.
1. Pre-Research Bias Check
Before data collection, the system assesses information availability and runs the bias self-awareness protocol (lines 13-31 of skills/investment-research.md). This assigns an information-richness grade (A/B/C) to prevent over-confidence when data are scarce.
2. Data Collection and Financial Validation
A background Task agent gathers raw financial data, market share statistics, and management biographies (lines 35-53). All quantitative inputs undergo cross-validation by tools/financial_rigor.py (lines 55-92), which uses Python's decimal.Decimal for exact arithmetic to prevent floating-point errors in market-cap and valuation calculations.
3. Business Essence Analysis (Duan Yongping)
The Duan Yongping agent applies first-principles questioning to evaluate customers, business repeatability, competitive dynamics, and management decision-making quality (lines 20-25 of the skill definition).
4. Moat Assessment (Warren Buffett)
The Buffett agent identifies durable competitive advantages, analyzing pricing power, network effects, and cost structures that protect long-term returns on capital.
5. Reverse-Thinking Stress Test (Charlie Munger)
Following Munger's inversion principle, this module forces "what-if-the-company-dies?" scenarios (lines 46-48) to identify hidden risks and failure modes that forward-looking analysis might miss.
6. Management Review
Combining the Duan and Buffett lenses, this module evaluates capital allocation discipline, insider ownership alignment, and historical stewardship track records.
7. Civilization Trend and Valuation (Li Lu)
The Li Lu agent evaluates long-term macro forces and civilization-level trends, while the valuation module computes multi-scenario target prices using the rigor tool (lines 81-86). The output includes explicit safety margin calculations.
Understanding the Parallel Agent Architecture
Internally, the skill launches four independent agents—one per master—that each execute the full data-gather-analyze-report cycle in parallel. As documented in the README (lines 31-45), a Team-Lead agent collates these redundant analyses, ensuring no single perspective dominates the final conclusion. This architecture guarantees that contradictory evidence receives proper weight rather than being smoothed over by a consensus-seeking single model.
Verification and Financial Rigor
All numeric outputs embed traceable calculation logs. You can verify market-cap calculations independently using the underlying tool:
# Verify market capitalization with exact decimal arithmetic
python3 ~/ai-berkshire/tools/financial_rigor.py verify-market-cap \
--price 510 --shares 9.11e9 --reported 4.65e12 --currency HKD
The final report appends these verification logs, guaranteeing reproducibility and allowing auditors to inspect the exact inputs used for valuation multiples.
Summary
- The
/investment-researchskill triggers a parallel Four Masters analysis viaskills/investment-research.md. - Seven modules cover bias checks, data validation, business essence, moats, reverse-thinking, management, and valuation.
- Financial rigor is enforced by
tools/financial_rigor.pyusingdecimal.Decimalfor exact calculations. - Output includes an information-richness rating, "综合决策备忘录" table, and mandatory "镜子测试" verdict with five-sentence justification.
- Parallel architecture uses four master-specific agents coordinated by a Team-Lead to eliminate single-point-of-failure bias.
Frequently Asked Questions
What file contains the Investment Research skill definition?
The primary skill definition resides in skills/investment-research.md at the repository root. This markdown file contains the command schema, bias checklists (lines 13-31), data collection instructions (lines 35-53), and the seven-module prompt sequence. Claude Code and Codex wrappers reference this canonical source.
How does AI Berkshire prevent research bias?
The system implements a two-layer defense: first, an "AI research bias self-awareness" checklist runs before data collection to flag information scarcity (A/B/C ratings). Second, the parallel agent architecture forces four independent analytical perspectives to converge, preventing confirmation bias inherent in single-model analysis.
Can I run the Investment Research skill outside of Claude Code?
Yes. While designed for Claude Code integration (installed via scripts/install-claude-commands.sh), the skill exposes a Codex-compatible wrapper at codex-skills/investment-research/SKILL.md. You can also import the underlying Python tools directly from tools/financial_rigor.py for custom research pipelines.
What is the "Mirror Test" in the final report?
The "镜子测试" (Mirror Test) is a mandatory pass/fail verdict requiring the AI to justify its recommendation in exactly five sentences. This constraint forces concise reasoning and prevents vague conclusions. The test appears in the "综合决策备忘录" section of the generated markdown report (lines 50-60 of the skill file).
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →