ai-berkshire is a free, open source ai development platforms project written in HTML and released under MIT. It has 16,427 GitHub stars, 2,451 forks and 38 open issues, and was last pushed 6 days ago. On this registry it ranks #44 of 116 tracked projects in AI Development Platforms, with 5 head-to-head comparisons available.

What is ai-berkshire?

AI Berkshire (ai-berkshire) is an MIT-licensed collection of value-investing research skills for Claude Code and Codex that turns the methodologies of Warren Buffett, Charlie Munger, Duan Yongping and Li Lu into reproducible, multi-agent fundamental analysis for individual investors and small research teams.

What it is

AI Berkshire is a skill collection that runs inside Claude Code and Codex. It organises 20 skill entry points spanning deep research, financial report analysis, industry screening, position management and thinking tools, and layers a set of team-type skills on top of them, including /investment-team. Supporting code lives in files such as tools/financial_rigor.py, and the project ships documentation in Chinese, English (README_EN.md) and Japanese (README_JA.md). It sits in the AI & Machine Learning / AI Development Platforms category, is written primarily in HTML, carries 16,427 stars, 2,451 forks and 38 open issues, and was last pushed on 11 September 2026.

The specific thing it replaces is the unstructured answer a general model gives when asked whether a stock is worth buying. That answer balances one side against the other and closes with a warning to judge for yourself, which leaves nothing to act on. AI Berkshire forces a verdict — 通过 (pass), 不通过 (fail) or 灰色地带 (grey zone) — attaches specific price bands and tiered suggestions to it, and applies a mirror test: a thesis that cannot be stated in five sentences is a pass on buying, with no exceptions. The README states the difference plainly: one person plus Claude Code or Codex equals a research team.

Key capabilities

  • Forced conclusions replace balanced commentary. A Pinduoduo analysis outputs an aggressive entry of 20% at $95-105, a steadier entry at $85-95 pending clarity on buyback policy, and a conservative stance of no position because the ten-year certainty standard is unmet.
  • Four masters score each company independently and are allowed to contradict each other. For Pinduoduo: Duan Yongping on business model at 3.7/5, Buffett on valuation at 4.4/5 with ex-cash PE of 6.3x, Munger on inversion at 3.5/5, and Li Lu on long-term certainty at 2.0/5.
  • /investment-team launches four independent agents on one company at the same time. Each searches the web, cross-verifies data and reaches its own conclusion; a Team Lead then synthesises the four results.
  • Anti-bias controls are built into the workflow: A/B/C information-richness grading (Pop Mart is rated B, with inferred metrics annotated by confidence), Munger-style inversion that lists five failure scenarios with probabilities, an eight-item instant-veto checklist, a contrarian check, and a deliberate blanks principle that marks grey zones rather than disguising guesses as certainty.
  • Numeric rigour is enforced through tooling rather than mental arithmetic. python3 tools/financial_rigor.py verify-market-cap --price 510 --shares 9.11e9 --reported 4.65e12 --currency HKD reconciles a Tencent market-cap figure to a 0.08% deviation, all calculations use Python decimal.Decimal rather than float, and key figures need at least two independent sources.
  • Outputs are reproducible. Seven companies were screened against one shared checklist covering circle of competence, business quality, moat, management and margin of safety, producing 4.7 for 茅台 and 腾讯, conditional passes for 英伟达 (4.3), 美团 (4.0) and 快手 (4.0), and grey-zone results for 拼多多 (3.8) and 泡泡玛特 (3.7).
  • A published corpus accompanies the framework. reports/README.md indexes 2,346 reports across 110 companies and 23 topics, updated to 12 September 2026.

Who uses it and how

  • A single investor working alone, using the skills as a substitute for an analyst team and running /investment-team company by company.
  • Small teams that need aligned research: identical inputs produce consistent structure and depth, so seven companies can be compared on the same scoring standard, or one company can be re-analysed six months later and diffed against the earlier report.
  • Investors focused on Chinese and Asian equities, the area the topics list emphasises through china-stock, berkshire-hathaway and charlie-munger, with worked examples on 茅台, 腾讯, 美团, 快手, 拼多多 and 泡泡玛特 alongside 英伟达.
  • Readers who consume the output rather than run the framework, following the indexed report corpus or the curated selection published on the WeChat account 复利炼丹炉.
  • Users evaluating the stated track record, which reports 2024 returns of +69.29% and 2025 returns of +66.38% against the Hang Seng, S&P 500, CSI 300 and Nasdaq, with screenshots from a Futu account and a cumulative two-year figure above ¥1.46 million.

Getting started

Setup is documented in the README's Quick Start section, which covers installing the skill collection into Claude Code or Codex. The registry entry names no package or container image, so the repository README is the distribution channel.

How it compares

The facts provided name no paid products that AI Berkshire replaces, and no directly comparable research framework either, so within this registry it stands alone. Claude Code and Codex appear here as the host agent runtimes it depends on rather than as rivals it displaces.

When to use it — and when not

Adopting it means operating an agent runtime: a Claude Code or Codex environment, a Python 3 interpreter for tools/financial_rigor.py, and network access for the four parallel agents to search and verify. Anyone who wants a hosted interface, a managed service or a single-click product should look elsewhere, and the performance figures are self-reported from a personal brokerage account with the README itself noting that past returns do not indicate future results. The repository is also Chinese-first, with English and Japanese translations alongside, and it is classified under HTML despite being an agent skill collection, so contributors should expect to read the Chinese documentation for the fullest detail.

project readme (upstream, from github) — read inline

中文 | English | 日本語

GitHub Trending

AI Berkshire - AI 时代的价值投资研究框架

"Price is what you pay, value is what you get." — Warren Buffett

用 AI 重新定义投资研究的深度与效率。

AI Berkshire 是一套同时兼容 Claude Code 与 Codex 的投资研究 Skill 合集,将巴菲特、芒格、段永平、李录四位价值投资大师的方法论系统化、结构化,通过 AI Agent 实现专业级投资研究。

一个人 + Claude Code / Codex = 一个投研团队。

📮 仓库是全量框架,公众号是精选。 真正值得深研的公司,加上报告之外我自己的判断与取舍,都在微信公众号「复利炼丹炉」——扫码关注 ↓

📊 日更内容是研究报告,全部在 研究报告索引 2346 份报告 · 110 家公司 · 23 个专题,按公司与专题分组,更新至 2026-09-12。

实盘业绩 · 为什么不能直接问AI · Skills 一览 · 快速开始 · 实战报告 · 研究索引 · 设计理念 · 公众号


Real Track Record

不是纸上谈兵。这套框架背后是真金白银验证的投资体系。

2024 全年收益:+69.29%

2025 全年收益:+66.38%

与主要指数对比

指标 2024 全年 2025 全年
本框架实盘 +69.29% +66.38%
恒生指数 +17.67% +27.77%
标普500 +23.31% +16.39%
沪深300 +14.68% +17.66%
纳斯达克 +28.64% +20.36%

2024 年超额收益:跑赢标普500 46个百分点,跑赢恒生指数 52个百分点

2025 年超额收益:跑赢标普500 50个百分点,跑赢恒生指数 39个百分点

两年累计实盘收益超 146万元,连续两年大幅跑赢全球主要指数。

免责声明:历史收益不代表未来表现。截图来自富途证券真实账户。

精选研究首发于公众号

仓库里是完整的框架和全量报告,公众号里是精选——真正值得深研的公司,加上报告之外我自己的判断与取舍:

复利炼丹炉 —— 用 AI 炼投研这颗丹。


为什么不能直接问 AI?

你当然可以直接问 Claude:"帮我分析拼多多值不值得买"。你会得到一篇"一方面...另一方面..."的平衡分析,最后以"投资有风险,请自行判断"收尾。

这种分析看起来对,但没法拿来做决策。

AI Berkshire 解决的不是"能不能分析"的问题,而是分析质量和决策纪律的问题。以下是核心差异:

1. 强制给结论,不打太极

直接问AI,你得到的是两面讨好的"分析"。AI Berkshire 强制输出:通过/不通过/灰色地带,带具体价格区间和分层建议。

普通AI回答:"拼多多有增长潜力但也面临竞争压力,投资者需要权衡..."

AI Berkshire 输出:

策略 建议 价格区间
激进型 当前价位可建仓20% $95-105
稳健型 等回购政策明确后建仓 $85-95
保守型 不符合10年确定性标准,观望

镜子测试:5句话说不完整 = 不买,没有例外。

2. 四大师视角对抗,而非单一分析

不是"用巴菲特方法分析一下"这么简单。四个视角会产生真实的矛盾和张力——

以拼多多为例:

  • 段永平(商业模式):好生意,C2M模式难以复制 → 评分 3.7/5
  • 巴菲特(财务估值):扣现金PE仅6.3x,印钞机 → 评分 4.4/5
  • 芒格(逆向思考):护城河比想象中浅,抖音3年做到4万亿GMV → 评分 3.5/5
  • 李录(长期确定性):管理层文化有隐患,10年后不确定 → 评分 2.0/5

巴菲特说"真便宜",李录说"不确定就不买"——这种冲突才是投资决策的真实状态。单一prompt无法制造这种多视角对抗,而这恰恰是避免盲点的关键。

3. 结构化反偏见机制

AI最危险的不是给错答案,而是给一个看起来很对但经不起推敲的答案。AI Berkshire 在流程中内置了多层"防骗"机制:

机制 解决什么问题 举例
信息丰富度评级(A/B/C) 防止"资料多=确定性高"的幻觉 泡泡玛特评为B级:数据有限,推算指标标注置信度
芒格式逆向检验 强制思考失败场景 "什么情况下拼多多会死?"→ 列出5大情景及概率
快速否决清单 8条红线一票否决 管理层诚信污点 → 直接否决,不管估值多便宜
反共识检查 避免和市场想法一样 "聪明人为什么在做空?"→ 发现被忽视的风险
留白原则 宁可说"不知道" 数据不足时标注"灰色地带",不用推测伪装确定性

4. 金融数据的精确性

LLM心算不可靠。PE算错一个小数点、市值单位搞混港币和人民币,就可能导致错误的投资决策。

真实案例:分析腾讯时,不同来源的市值数据有"港币亿"和"人民币亿"两种单位。AI Berkshire 的处理方式:

# 市值手算校验:股价 × 总股本,与报告数据对比
python3 tools/financial_rigor.py verify-market-cap \
  --price 510 --shares 9.11e9 --reported 4.65e12 --currency HKD
# ✅ 验证通过, 偏差仅 0.08%

所有计算使用 Python decimal.Decimal(精确十进制),不用 float。关键数据至少2个独立来源交叉验证。

5. 可复现的研究流程

直接问AI,每次输出的格式、深度、覆盖面都不一样——今天分析腾讯有护城河评分,明天分析美团可能就忘了。

AI Berkshire 确保:同样的输入 → 结构一致、深度一致的输出。这意味着你可以:

  • 7家公司横向对比,评分标准完全一致
  • 同一家公司半年后重新分析,直接对比变化
  • 团队成员之间的研究结果可以对齐

真实输出——7家公司用同一标准 Checklist 筛选:

公司 通过? 能力圈 好生意 护城河 管理层 安全边际 综合
茅台 ✅ 通过 ★★★★★ ★★★★★ ★★★★★ ★★★☆☆ ★★★★☆ 4.7
腾讯 ✅ 通过 ★★★★☆ ★★★★★ ★★★★★ ★★★★★ ★★★★☆ 4.7
英伟达 ✅ 有条件 ★★★★☆ ★★★★★ ★★★★★ ★★★★★ ★★★☆☆ 4.3
美团 ✅ 有条件 ★★★★☆ ★★★★☆ ★★★★☆ ★★★★☆ ★★★★☆ 4.0
快手 ✅ 有条件 ★★★☆☆ ★★★★☆ ★★★★☆ ★★★★☆ ★★★★★ 4.0
拼多多 ❓ 灰色 ★★★★☆ ★★★★☆ ★★★☆☆ ★★★☆☆ ★★★★★ 3.8
泡泡玛特 ❓ 灰色 ★★★☆☆ ★★★★☆ ★★★★☆ ★★★★★ ★★★☆☆ 3.7

6. 多Agent并行 = 研究深度的倍增

/investment-team 启动4个独立Agent同时研究一家公司。每个Agent各自搜索网络、交叉验证数据、独立给出结论。这不是把一个prompt拆成四段——是4个"分析师"各自做了完整的研究,Team Lead再综合。

一个人直接问AI,上下文窗口是一个。4个Agent并行,等于4倍的搜索量、4倍的信息源、4个独立视角。

一句话总结

普通人问AI得到的是"看起来对的分析",用 AI Berkshire 得到的是"可以拿来做决策的投研报告"。


整体架构

三层设计哲学

  • Skill 层:把"你要做什么"抽象成 20 个明确入口——深度研究、财报分析、行业筛选、持仓管理、思维工具,按场景选用
  • Agent 层:团队型 skill(如 /investment-team/earnings-team)由 Team Lead 并行调度 4 个大师视角 Agent——各自独立搜索、独立判断、互相挑战,最后综合研判;轻量 skill 不经过这一层,直连工具快进快出
  • 工具层:精确计算、实时检索、报告抽检——保证每份报告的数据严谨性可验证

Skills 一览(20个)

🔬 深度研究类

Skill 用途 适合场景
/investment-research 四大师综合深度分析 对一家上市公司进行全方位投资研究
/investment-team 多Agent并行投研团队 4个Agent并行研究,最快速、最全面
/management-deep-dive 管理层纵深研究 "买股票就是买人"——当管理层是核心变量时深挖
/private-company-research 未上市公司深度研究 研究蚂蚁、SpaceX等信息稀缺的未上市公司
/deep-company-series 8篇长文系列拆一家公司 公众号级深度系列,12万字从认知重置到决策闭环

📊 财报分析类

Skill 用途 适合场景
/earnings-review 财报精读(一手资料) 只读原始财报,不依赖二手研报,像巴菲特一样读年报
/earnings-team 财报精读团队 + 公众号发布 四大师并行解读财报 → 编辑润色 → 读者评审 → 可发布文章

🏭 行业筛选类

Skill 用途 适合场景
/industry-research 产业链全景扫描 研究一个行业的全部投资机会(按产业链环节切片)
/industry-funnel 行业漏斗筛选 全市场 → 粗筛 ≤10 家 → 终选 3 家深度分析
/quality-screen 去劣筛选(7条硬指标) 快速排除非一流公司,支持个股/行业/指数/主题批量筛
/bottleneck-hunter 供应链瓶颈猎手 从超级趋势出发,寻找产业链物理瓶颈和套利机会
/era-alpha 时代α捕手 识别时代级高增长主线中的核心α,验证增长可持续性,给出介入与退出纪律
/investment-checklist 巴菲特买入前 Checklist 六关快速筛选,10分钟决定是否值得深入

📈 持仓管理类

Skill 用途 适合场景
/income-investment 收益型股票分析 区分可持续收益、机会型高息与收益率陷阱
/portfolio-review 组合管理与优化 从"研究公司"升级到"管理组合"——仓位、集中度、再平衡
/thesis-tracker 投资论文追踪 买入后的纪律系统:持续跟踪论文是否被证伪
/thesis-drift 投资论文漂移检测 对比两份论文/报告,区分事实变化、估值变化与措辞变化
/news-pulse 股价异动快速归因 股价大涨/大跌时10分钟搞清"发生了什么"

🧠 思维工具类

Skill 用途 适合场景
/dyp-ask 段永平问答 以段永平的方式思考任何问题——商业、投资、人生
/financial-data 财务数据获取与交叉验证规范 确保关键数据来自2个独立来源,误差>1%告警
/wechat-article 微信公众号文章 作者、编辑、读者三Agent协作,产出可发布文章

🔗 搭配 Claude Code 内置的 /deep-research

除以上 20 个 skill 外,Claude Code 自带一个 /deep-research 深度研究编排器(内置于客户端,不由本仓库分发,安装 Claude Code 即可使用)。它的流程是:把问题拆成 5 个检索角度并行搜索 → 抓取来源、提取可证伪论断 → 每条论断由 3 个独立 Agent 对抗验证(3 票中 2 票证伪才剔除)→ 按置信度合成带引用来源的报告。核心价值是每条结论都被人试图推翻过,而不是搜到什么写什么。

适合在运行本仓库的个股/行业 skill 之前,先对一个关键事实判断做独立核查。实战示例:存储涨价周期研究(106 个检索/验证 Agent,23 条论断三票制交叉验证)、diffusion LLM 技术路线综述(25 条论断验证,22 条确认、3 条被证伪)。


快速开始

成本与模型选择

深度投研类 Skill 默认会进行多轮研究、交叉验证和多 Agent 综合判断,因此 token 消耗较高,这是为了换取更完整的商业、财务、行业和风险分析。

如果是真实投资决策中高风险、高重要性的判断,维护者的观点是:最强模型通常更可能带来更好的分析 ROI,不建议只为节省模型成本而牺牲关键判断质量。轻量模型更适合做初筛、摘要或低风险问题;涉及护城河、估值、管理层和风险交叉判断时,应预期分析质量会更依赖模型能力。

想控制成本时,优先调整 workflow,而不是期待完整深度研究变得便宜:快速排除公司可先用 /quality-screen,股价异动归因可用 /news-pulse。只有当结果值得继续深入时,再运行 /investment-research/investment-team

1. 安装 AI 客户端

本仓库保留同一套 canonical workflow,并分别提供 Claude Code commands 与 Codex skills。按你使用的客户端安装即可。

Claude Code 用户:

npm install -g @anthropic-ai/claude-code

Codex 用户:

# macOS / Linux
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# 或使用 npm
npm install -g @openai/codex

# 或使用 Homebrew
brew install --cask codex

# 验证安装
codex --version

Windows 用户可使用官方 PowerShell 安装命令:powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

如果 codex --version 能正常输出版本号,就可以继续安装本项目的 Codex skills。

减少授权确认

这些 skills 会频繁调用工具,Claude Code 默认会逐次请求授权确认。这个行为来自 Claude Code 客户端权限机制,不是本仓库可以修改的默认设置。

如果你信任当前 workflow,并且在可信环境中运行,可以用 Claude Code 的跳过权限确认模式启动:

claude --dangerously-skip-permissions

注意:该模式会关闭 Claude Code 的工具审批保护,只应在你信任仓库、命令和工作目录的情况下使用。

2. 安装 Skills

Claude Code 用户安装(macOS / Linux):

## 

readme truncated — read the full docs on github

Frequently asked questions

Is ai-berkshire free to use?

ai-berkshire is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does ai-berkshire do?

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

What is ai-berkshire written in?

ai-berkshire is primarily written in HTML. Its source is publicly available at https://github.com/xbtlin/ai-berkshire, and it has 16,427 GitHub stars.