xbtlin/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.
AI Berkshire – AI‑augmented value‑investment research framework
What it is – A collection of Claude Code / Codex skills (custom commands) that turn a single LLM into a virtual investment‑research team. The framework encodes the thinking patterns of four value‑investment masters (Warren Buffett, Charlie Munger, Duan Yong‑ping, Li Lu) and orchestrates multiple agents to produce structured, data‑checked research reports, checklists, industry scans, and portfolio‑management tools.
Core ideas
- Skill layer – 20 ready‑to‑use commands such as
/investment-research,/investment-team,/quality-screen,/news-pulse, etc. - Agent layer – For “team” skills the framework launches four independent agents, each adopting one master’s perspective, then aggregates their conclusions.
- Tool layer – Python utilities (
tools/financial_rigor.py) that perform exact decimal‑based financial calculations and cross‑validate data from multiple sources. - Bias‑mitigation – Information‑richness ratings, reverse‑thinking checklists, red‑line veto lists, and “leave‑blank” rules to force the model to admit uncertainty.
How to get started
- Install the LLM client – either Anthropic’s
claude-codeor OpenAI’scodex(both supported). - Clone the repo and run the provided install script for your client (
install-claude-commands.sh/install-codex-skills.sh). - Run a skill – e.g.
/investment-research 腾讯orinvestment-team 美团. - The command triggers the workflow defined in
skills/*.md; the agents fetch data, perform cross‑checks, and output a markdown report with ratings, price‑range recommendations, and a concise decision memo.
Typical outputs
- A decision matrix (e.g., aggressive / balanced / conservative price bands).
- Multi‑master scores for business quality, moat, management, risk, and valuation.
- Structured tables of financial calculations verified against at least two independent data sources.
- Quick‑turn news‑pulse analyses that attribute a stock’s price move to specific events.
Why it’s different from a plain LLM query
| Plain LLM ask | AI Berkshire skill |
|---|---|
| “Is Pinduoduo a good buy?” – returns a balanced prose paragraph with a generic disclaimer. | Forces a yes / no / gray‑area verdict, provides price‑range recommendations, and shows how each master’s reasoning contributed to the final view. |
| No systematic data validation. | Every numeric field is cross‑checked, calculated with decimal.Decimal, and flagged if sources disagree. |
| Single‑prompt output, format varies. | Fixed, repeatable markdown templates enable side‑by‑side comparison of multiple companies over time. |
Who might use it
- Individual investors who want a disciplined, repeatable research process without hiring a full analyst team.
- Small research groups that want to prototype a multi‑agent workflow on top of Claude Code or Codex.
- Educators demonstrating how LLMs can be orchestrated for structured decision‑making.
Limitations / cautions
- The framework relies on external data sources (financial statements, market data). Accuracy is only as good as the feeds you provide; the repo includes scripts for verification but does not ship live market APIs.
- Token consumption can be high for deep‑research skills because each agent performs multiple retrieval and reasoning steps.
- The “investment advice” generated is for personal research only; the repository includes a standard disclaimer that it is not professional advice.
License – MIT, allowing free use and modification.
AI Berkshire turns a single LLM into a four‑person value‑investment think‑tank, delivering reproducible, bias‑aware research reports that can be used directly in personal investment workflows.
Related
- Project
- Project
- Project
- Project
- Project