Model or dataset
xbtlin/ai-berkshire avatar
xbtlin/ai-berkshire

AI Berkshire: A Value Investing Research Framework Built on Claude Code and Codex

AI 时代的伯克希尔:基于 Claude Code / Codex 的价值投资研究框架。巴菲特·芒格·段永平·李录四大师方法论 + 多Agent并行研究。| AI-era Berkshire: a value investing research framework built for Claude Code / Codex. 4 masters' methodologies + multi-agent adversarial analysis.

16,341 stars2,438 forksPythonMIT

At a glance

What is it?
AI Berkshire packages Buffett, Munger, Duan Yongping, and Li Lu's methods into 20 Claude Code and Codex skills, with multi-agent adversarial analysis and strict financial verification. The framework forces conclusions, but its real-world performance claims need scrutiny.
Who is it for?
Adopt AI Berkshire if you are an individual investor already using Claude Code or Codex, want a structured, repeatable research process, and accept that the framework's value lies in discipline, not prediction. Do not adopt it if you expect guaranteed returns; the claimed 2024 and 2025 track records are unaudited and based on a single account.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Problem It Solves and Who It Is For

AI Berkshire addresses a specific failure of general-purpose AI assistants in investment research: they produce balanced, hedged analysis that reads well but cannot support a decision. The README argues that asking Claude directly for a stock analysis yields a 'one hand, other hand' essay ending with a risk disclaimer. The framework replaces that with forced conclusions, structured scoring, and adversarial checks. It is built for individual investors who already use Claude Code or Codex and want a repeatable process rather than a one-off prompt. The target user is someone who can read a financial statement, understands valuation basics, and wants the AI to enforce discipline, not to think for them. The project explicitly positions itself as a 'one person plus Claude Code equals a research team' tool, which means it is not aimed at institutional desks or at people who want a black-box stock picker.

The Multi-Agent Mechanism and Its Adversarial Design

The core mechanism is a three-layer architecture. The skill layer exposes 20 entry points, each mapping to a research scenario such as deep company analysis, earnings review, or portfolio management. The agent layer runs team-based skills like /investment-team, where a Team Lead dispatches four independent agents, each embodying one master's methodology: Buffett for financial valuation, Munger for inversion thinking, Duan Yongping for business model quality, and Li Lu for long-term certainty. Each agent searches the web, cross-verifies data, and forms its own conclusion before the Team Lead synthesizes. The README gives a Pinduoduo example where the four agents produce conflicting scores, from Buffett's 4.4/5 on valuation to Li Lu's 2.0/5 on management culture. That conflict is intentional. The framework also embeds anti-bias mechanisms: an information richness rating (A/B/C) to prevent confusing data volume with certainty, a Munger-style inversion test that forces failure scenarios, an eight-item rapid veto list, a contrarian check that asks why smart money is shorting, and a blank-space principle that allows saying 'unknown' instead of fabricating certainty. These mechanisms are not optional prompts; they are structured steps in each skill's workflow, which is what distinguishes this from a simple instruction to 'think like Buffett'.

Financial Rigor: Decimal Math and Cross-Verification

A notable design choice is the insistence on precise financial calculation. The README warns that LLMs cannot reliably do mental arithmetic, and a wrong decimal place in PE or a mix-up between HKD and CNY units can break an investment decision. The framework includes a tool, tools/financial_rigor.py, that verifies market cap by recomputing price times shares. The README shows an example command: python3 tools/financial_rigor.py verify-market-cap --price 510 --shares 9.11e9 --reported 4.65e12 --currency HKD, which reportedly validates a Tencent figure with a 0.08% deviation. All calculations use Python's decimal.Decimal instead of float, and key data points must come from at least two independent sources. This is a pragmatic response to a real failure mode, and it is the most concrete part of the framework. The trade-off is that this rigor only applies to numbers that the user feeds in or that the agent can fetch. If the underlying source data is wrong, the decimal math will not save the conclusion. The tool is a check, not a source of truth.

Getting Started: Commands and Configuration

The README's quick start section is truncated in the material, but the skills are documented as slash commands that run inside Claude Code or Codex. The primary entry point is /investment-team, which launches four agents in parallel. Lighter skills, such as /investment-checklist, skip the agent layer and connect directly to tools for faster results. The repository layout shows a skills/ directory with individual markdown files for each skill, and a tools/ directory containing Python scripts like financial_rigor.py. To use the framework, you install Claude Code or Codex, clone the repository, and invoke the skills by their slash command names. The README mentions that deep research skills consume high token counts by default because they involve multiple rounds of search, cross-verification, and multi-agent synthesis. This is a real cost consideration; the README does not give specific token numbers, but it is explicit that the cost is a trade-off for depth. There is no mention of a setup script or environment variables in the provided material, so the user is expected to handle their own API keys and model configuration through the host client.

The Track Record Claim and Its Limits

The README prominently features a 'Real Track Record' section claiming 2024 returns of +69.29% and 2025 returns of +66.38%, with cumulative profits over 1.46 million CNY. It compares these against the Hang Seng Index, S&P 500, CSI 300, and Nasdaq, claiming significant outperformance. The README states that the screenshots come from a real Futu Securities account. This is the most problematic part of the project. The returns are unaudited, come from a single account, and are presented without any mention of drawdowns, position sizing, or risk-adjusted metrics. The disclaimer that historical returns do not guarantee future performance is present, but the framing still invites the reader to infer that the framework caused the returns. That inference is unsupported. The framework may have contributed, or the results may be due to market conditions, luck, or other factors not disclosed. The README also conflates the framework's process with the author's personal decisions, since the WeChat account is where the author shares 'my own judgments and trade-offs' beyond the reports. A reader should treat the track record as a marketing claim, not as evidence of predictive power.

Maintenance, License, and the Wrong Tool Cases

The project is licensed under MIT, which permits free use, modification, and distribution, including for commercial purposes. The repository is not archived, and the latest release is v1.0.0 from April 2026, with the last push on the same date. That means the project is very new, and there is no history of maintenance or updates to assess. The README does not describe a contribution process or a roadmap, so upgrade cost is unknown. The skills are markdown files that could break if Claude Code or Codex changes their skill format, but the material does not indicate any version pinning. This is the wrong tool if you need a fully autonomous research system that runs without your oversight, because the framework requires the user to judge the output. It is also wrong if you cannot tolerate high token costs, or if you expect the framework to replace your own understanding of a business. The README's own example shows that the framework labels a company as 'gray zone' when data is insufficient, which means it will not always give a clear buy or sell signal. That is a feature, but it is a limitation for someone who wants a definitive answer.

Alternatives: What Else Exists and How It Differs

The most direct alternative is using Claude Code's built-in /deep-research, which the README itself mentions. That tool decomposes a question into five search angles, runs parallel searches, extracts falsifiable claims, and has three agents vote to reject claims that two of them falsify. The output is a report with citations and confidence levels. The key difference is that /deep-research is a general-purpose fact-verification engine, not an investment framework. It does not enforce a value investing methodology, it does not score companies against a checklist, and it does not force a buy or sell conclusion. AI Berkshire adds the domain-specific structure on top of similar agent orchestration. Another alternative is to build your own prompts on top of a single LLM, which is cheaper but loses the multi-agent conflict and the financial rigor tools. There are also commercial investment research platforms that use AI, but they are not open source and do not let you inspect the methodology. The README's own recommendation is to use /deep-research first for a key factual claim, then run the Berkshire skills for the full analysis. That is a practical division of labor: one for truth, the other for judgment.

Editorial conclusion

Adopt AI Berkshire if you are an individual investor already using Claude Code or Codex, want a structured, repeatable research process, and accept that the framework's value lies in discipline, not prediction. Do not adopt it if you expect guaranteed returns; the claimed 2024 and 2025 track records are unaudited and based on a single account. Before relying on any report, verify the underlying financial data yourself, test the skills on a company you know well, and confirm that the token costs fit your budget. The framework is a process tool, not a crystal ball, and its real test is whether it changes your decisions, not its benchmark comparisons.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes