ai-berkshire
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.
Install / Use
npx skills add xbtlin/ai-berkshireInstalls into whichever agent you are using.
CLAUDE.md
Claude Code project instructions
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of ai-berkshire
ai-berkshire scores 98/100 on our quality scale, 28th of 966 AI & Machine Learning skills we index (top 3%).
Its CLAUDE.md is 19 KB long, well organised into 61 sections with 17 code examples: a thorough specification that gives an agent plenty to work with.
With 17,023 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated yesterday, so ai-berkshire is actively maintained.
- Our last check on 2026-10-17 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
ReviewOur scan of the whole file found 1 pattern worth reviewing before you install ai-berkshire. An AI review of the same text found nothing harmful.
- mediumDisables the agent's permission promptsline 284
claude --dangerously-skip-permissions - noteInstalls by piping a downloaded script into a shellline 261
curl -fsSL https://chatgpt.com/codex/install.sh | sh - noteInstalls by piping a downloaded script into a shellline 273
Windows 用户可使用官方 PowerShell 安装命令:`powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"`。
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
ai-berkshire compared with similar skills
All 4 of these similar skills score higher than ai-berkshire; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ai-berkshire (this skill)by xbtlin | 98 | 17.0k | 1d ago | CLAUDE.md |
| claude-memby thedotmack | 100 | 113.5k | today | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 110.6k | 1d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 109.2k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 90.9k | 10d ago | CLAUDE.md |
Frequently asked questions
- How do I install ai-berkshire?
- Run
npx skills add xbtlin/ai-berkshire. The install tabs above show the steps for each supported agent. - Which AI agents does ai-berkshire work with?
- It is written for Claude Code and OpenAI Codex, as a CLAUDE.md file. Other agents that read the same format can often use it too.
- Is ai-berkshire safe to use?
- Our scan of the whole file found 1 pattern worth reviewing before you install ai-berkshire. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is ai-berkshire still maintained?
- The repository was last updated yesterday, so ai-berkshire is actively maintained.
Skill content
View source on GitHubAI 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 = 一个投研团队。
<!-- REPORTS-BANNER:START 由 tools/reports_index.py 自动更新,勿手改 -->📮 仓库是全量框架,公众号是精选。 真正值得深研的公司,加上报告之外我自己的判断与取舍,都在微信公众号「复利炼丹炉」——扫码关注 ↓
<!-- REPORTS-BANNER:END -->📊 日更内容是研究报告,全部在 研究报告索引。 2354 份报告 · 110 家公司 · 23 个专题,按公司与专题分组,更新至 2026-09-22。
实盘业绩 · 为什么不能直接问AI · Skills 一览 · 快速开始 · 实战报告 · 研究索引 · 设计理念 · 公众号
Real Track Record
不是纸上谈兵。这套框架背后是真金白银验证的投资体系。
2024 全年收益:+69.29%
<img src="assets/2024-returns.jpg" width="300" />2025 全年收益:+66.38%
<img src="assets/2025-returns.jpg" width="300" />与主要指数对比
| 指标 | 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万元,连续两年大幅跑赢全球主要指数。
免责声明:历史收益不代表未来表现。截图来自富途证券真实账户。
精选研究首发于公众号
仓库里是完整的框架和全量报告,公众号里是精选——真正值得深研的公司,加上报告之外我自己的判断与取舍:
<img src="assets/wechat-qr.png" width="160" alt="微信公众号:复利炼丹炉" />复利炼丹炉 —— 用 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个独立视角。
<p align="center"> <img src="assets/team-core.svg" alt="Team Lead 并行调度四大师 Agent" width="720" /> </p>一句话总结
普通人问AI得到的是"看起来对的分析",用 AI Berkshire 得到的是"可以拿来做决策的投研报告"。
整体架构
<p align="center"> <img src="assets/architecture.svg" alt="AI Berkshire 整体架构" width="760" /> </p>三层设计哲学:
- 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):
# 克隆仓库
git clone https://github.com/xbtlin/ai-berkshire.git
# 复制 skills 到 Claude Code 全局 commands 目录
cd ai-berkshire
./scripts/install-claude-commands.sh
Claude Code 用户安装(Windows PowerShell / Command Prompt):
git clone https://github.com/xbtlin/ai-berkshire.git
cd ai-berkshire
.\scripts\install-claude-commands.bat
Codex 用户安装(macOS / Linux):
# 克隆仓库
git clone https://github.com/xbtlin/ai-berkshire.git
# 生成并安装 Codex skills 到 ~/.codex/skills
cd ai-berkshire
./scripts/install-codex-skills.sh
# 可选:安装 Codex slash prompts 到 ~/.codex/prompts
# 用于获得接近 Claude Code 的 /investment-research 体验
./scripts/install-codex-prompts.sh
Codex 用户安装(Windows PowerShell / Command Prompt):
git clone https://github.com/xbtlin/ai-berkshire.git
cd ai-berkshire
.\scripts\install-codex-skills.bat
REM 可选:安装 Codex slash prompts
.\scripts\install-codex-prompts.bat
仓库同时维护三套入口:skills/*.md 是 Claude Code command 源文件;codex-skills/*/SKILL.md 是 Codex skill 包,由 scripts/sync-codex-skills.py 从 skills/*.md 生成;codex-prompts/*.md 是可选的 Codex slash prompt 兼容层。
3. 使用
在 Claude Code 中直接调用:
# 深度研究
/investment-research 腾讯
/investment-team 美团
/management-deep-dive 王兴 美团
/private-company-research SpaceX
/deep-company-series 拼多多
# 财报分析
/earnings-review 腾讯 2025Q4
/earnings-team PDD 2025年报
# 行业筛选
/industry-research 核电
/industry-funnel AI算力
/quality-screen 恒生指数成分股
/bottleneck-hunter AI基础设施
/investment-checklist 茅台, 英伟达, 苹果
# 持仓管理
/income-investment Verizon mode=existing role=core-income quantity=100 cost_basis=39.50 tax_residence=France horizon=5y
/portfolio-review 腾讯30%, 美团20%, 茅台20%, 现金30%
/thesis-tracker 拼多多
/thesis-drift 拼多多 reports/拼多多-thesis-2025Q4.md reports/拼多多-thesis-2026Q1.md
/news-pulse 腾讯
# 思维工具
/dyp-ask 拼多多的护城河到底在哪里?
/wechat-article 美团
在 Codex 中安装后重启 Codex,然后直接按 skill 名称描述任务,例如:
使用 investment-research 研究腾讯
使用 earnings-review 分析 PDD 2025年报
使用 industry-funnel 筛选 AI算力
使用 bottleneck-hunter 扫描 AI基础设施瓶颈
使用 thesis-drift 对比拼多多两份投资论文
使用 wechat-article 写美团投研文章
如果安装了 Codex slash prompts,重启 Codex 后也可以在 / 菜单里搜索这些 prompt。Codex 官方的 custom prompt 入口通常显示为 prompts:<name>,例如:
/prompts:investment-research 腾讯
各 Skill 详细介绍
1. /investment-research — 四大师综合分析
最全面的单公司深度研究框架。按七个模块顺序执行:
数据收集 → 生意本质(段永平) → 护城河(巴菲特) → 逆向思考(芒格)
→ 管理层评估(段永平+巴菲特) → 文明趋势(李录) → 估值与安全边际
核心特色:
- AI研究偏见自觉机制(A/B/C级信息丰富度评级)
- 关键数据多源交叉验证(市值手算校验、至少2个独立来源)
- 四位大师的"追问"贯穿全文
- 三情景估值(乐观/中性/悲观)+ 反向DCF
输出示例摘录:
综合决策备忘录
| 维度 | 结论 | 信心度 | |------|------|--------| | 生意质量(段永平) | 极佳:平台型生意,双边网络效应,边际成本趋零 | ★★★★★ | | 护城河(巴菲特) | 宽阔且在变宽:网络效应+转换成本+规模效应三重叠加 | ★★★★☆ | | 管理层(段永平+巴菲特) | 优秀:创始人掌舵,资本配置纪律强 | ★★★★☆ | | 最大风险(芒格) | 监管政策不确定性,新业务亏损拖累整体利润 | ★★★☆☆ | | 文明趋势(李录) | 顺应数字化消费趋势,但非"文明级范式转移" | ★★★★☆ | | 估值(巴菲特+段永平) | 当前PE 18x,处于历史中位数偏低,有一定安全边际 | ★★★★☆ |
段永平:"这门生意的本质是连接消费者和商家,赚的是效率提升的钱。好生意的标志是:用户越多,商家越多;商家越多,用户越多。飞轮一旦转起来,很难停下。"
芒格:"反过来想——如果这家公司明天消失,用户和商家会怎么办?如果答案是'很快找到替代品',那护城河就不够深。如果答案是
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
113.5kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
taste-skill
110.6kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
109.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
90.9kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
