Skip to content

Guide · Open source

How to use ai-berkshire: install and run value investing research skills

Updated · written with AI from the project's own documentation and checked against our catalogue data

AI Berkshire is an open-source collection of investment research skills, structured prompts and workflows that run inside Claude Code or Codex. It applies the investing methods of Buffett, Munger, Duan Yongping and Li Lu to specific companies, mainly Chinese and US stocks. This guide explains what you need, how to install the clients, and how to pick the right skill for a research task.

AI Berkshirexbtlin/ai-berkshire · ★ 17k · MIT

Quick start

  1. 1Check prerequisites. Confirm you have Node.js and an account for Claude Code or Codex.
  2. 2Install a client. Run npm install -g @anthropic-ai/claude-code or npm install -g @openai/codex.
  3. 3Verify Codex. If you use Codex, run codex --version to confirm the install.
  4. 4Pick a skill. Start with a light screen such as /quality-screen before running deep research.
  5. 5Run a full analysis. Use /investment-research for one company, or /investment-team for parallel agents.
  6. 6Verify key data. Cross-check key figures from at least two sources before acting on them.

What you need before you start

AI Berkshire runs on top of an AI coding client. The skills depend on Claude Code or Codex, so you need an account for at least one of them. The README says Node.js is required for the npm install of Claude Code but does not state a version number, so check the Claude Code documentation for current requirements.

  • Node.js (needed for the npm install of Claude Code)
  • A Claude Code or Codex account
  • The README is mostly in Chinese; an English version (README_EN.md) is linked from the repository

Install Claude Code or Codex

Install whichever client you use. The repository keeps one canonical workflow and provides both Claude Code commands and Codex skills, so either client works. Verify the Codex installation with the version command.

npm install -g @anthropic-ai/claude-code npm install -g @openai/codex codex --version

Choose the right skill for your task

The repository lists 22 skills grouped into deep research, earnings analysis, industry screening, portfolio management and thinking tools. Pick the lightest skill that answers your question, because deep research uses more tokens and time.

The README suggests starting with cheap screens and only running full research on companies that pass.

  • Quick screen: /quality-screen to exclude weak companies (7 hard metrics)
  • Price move: /news-pulse to find out what caused a large share price move
  • Checklist: /investment-checklist for a six-step quick filter
  • Full company research: /investment-research for four-master analysis
  • Parallel research: /investment-team, which runs four agents at once
  • Ask Duan Yongping's view: /dyp-ask

Run a full company analysis

For a complete analysis of one listed company, run /investment-research. For a parallel analysis, run /investment-team, where a Team Lead dispatches four master-perspective agents that research independently and then combine their conclusions.

The README says the agents each search, cross-check data and give their own verdict before the lead agent synthesises them. Expect many research rounds, so the run can be slow and token-intensive.

  • Each agent works from its own search and reaches its own verdict
  • The lead agent combines the results into one report
  • Outputs are reports with pass, fail or grey-zone verdicts

Compare several companies on the same criteria

Because every run follows the same workflow, you can compare companies on one standard. The README shows a seven-company checklist table where each company receives ratings for circle of competence, business quality, moat, management and margin of safety.

Re-running the same company after some months lets you see what has changed. Treat outputs as research aids, not final decisions.

Check the numbers and track your thesis

The README says key financial data should come from at least two independent sources, and that calculations use Python decimal.Decimal rather than float. The repository includes tools/financial_rigor.py, which has a verify-market-cap command you can use to check market cap against price times shares.

After buying, /thesis-tracker helps you keep checking whether your original reasoning still holds.

python3 tools/financial_rigor.py verify-market-cap \ --price 510 --shares 9.11e9 --reported 4.65e12 --currency HKD

What people use it for

  • Screening a list of Chinese or US stocks against a consistent value investing checklist
  • Preparing a structured research note on one company before a personal decision
  • Reviewing an earnings report with /earnings-review using only primary filings
  • Tracking whether an investment thesis is being weakened over time with /thesis-tracker

Frequently asked questions

Is ai-berkshire free to use?

The repository is licensed under MIT. However, the skills run inside Claude Code or Codex, so you need an account for one of those clients, and deep research uses a lot of tokens.

What do I need to install ai-berkshire?

You need Node.js, an account for Claude Code or Codex, and the client installed. The README does not state a Node.js version, so check the client's current documentation.

Does ai-berkshire guarantee investment returns?

No. The README reports self-reported performance figures and states that past returns do not predict future ones. The project is a research aid and not personal financial advice.

Which AI clients does ai-berkshire support?

It is built for Claude Code and Codex. The repository provides Claude Code commands and Codex skills from one canonical workflow.

What are alternatives to ai-berkshire?

Other open-source financial research tools include FinGPT, OpenBB Terminal and Ghostfolio. They are different products, so compare them on the features you need, such as data sources and whether they use an AI coding client.

Does it work for stocks outside China and the US?

The README says it focuses on Chinese and US stocks. It does not claim coverage of other markets, so check the skill documentation before relying on it elsewhere.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

AI Berkshire suits Chinese-speaking investors and analysts who already use Claude Code or Codex and want repeatable, structured value investing checklists. It is a poor fit for anyone seeking guaranteed returns, for beginners without an AI client subscription, or for anyone who needs a licensed advisor's personal recommendation.

Install options & downloads