How to Clone the AI Berkshire Repository and Install AI Investment Skills
Clone the AI Berkshire repository using git clone https://github.com/xbtlin/ai-berkshire.git, then run the installation scripts to integrate the 18 investment-research skills with Claude Code or Codex.
AI Berkshire is a modular, AI-driven investment-research framework developed by xbtlin that organizes its functionality into three distinct layers. Because the project uses only standard-library Python, you can clone the repository and immediately begin using its finance-grade research capabilities without managing external dependencies.
Cloning the Repository
Start by cloning the repository from GitHub and navigating into the project directory:
git clone https://github.com/xbtlin/ai-berkshire.git
cd ai-berkshire
The project is fully self-contained, requiring no external Python packages or complex environment setup.
Installing Skills for Your AI Assistant
Once cloned, choose the installation script that matches your AI assistant. The repository provides three helper scripts in the scripts/ directory to integrate the 18 canonical skills defined in skills/.
Claude Code Setup
To install the skills as Claude Code commands, run the bash script that copies the skill markdown files into Claude Code's global command directory:
./scripts/install-claude-commands.sh
This script copies the canonical definitions from the skills/ directory (such as skills/investment-research.md) into Claude Code's global command directory, making commands like /investment-research and /industry-funnel available immediately.
Codex Setup
For Codex users, generate and install the skill packages under ~/.codex/skills using:
./scripts/install-codex-skills.sh
This script generates Codex skill packages from the skills/ markdown files and installs them in the appropriate local directory.
Optional Slash Prompt Compatibility
To enable a Claude-style slash-prompt experience within Codex, install the optional compatibility layer:
./scripts/install-codex-prompts.sh
Understanding the Repository Architecture
The AI Berkshire framework organizes functionality into three layers defined in the source code:
-
Skill layer: Contains 18 canonical skills stored as markdown files in the
skills/directory. These define what the system does, including flagship commands like/investment-research,/industry-funnel, and/news-pulse. Theskills/investment-research.mdfile serves as the canonical definition for deep-research workflows. -
Agent layer: Each skill internally spawns four independent agents that perform full research sub-tasks (business model, valuation, risk, and synthesis) before returning results to a "Team Lead" for aggregation. This multi-agent workflow is documented in
AGENTS.md. -
Tool layer: Provides finance-grade rigor through
tools/financial_rigor.py, which implements exact decimal arithmetic, market-cap verification, cross-source validation, and Benford-law checks. All skills automatically invoke this toolkit to verify data before generating reports.
Executing Your First Research Command
After installation, invoke a skill directly from your terminal. In Claude Code, use the slash command syntax:
/investment-research 腾讯
For Codex installations, use the natural language invocation:
使用 investment-research 研究腾讯
The skill automatically calls the financial_rigor.py toolkit to verify market capitalization, valuation ratios, and cross-source data consistency before producing a structured research report.
Summary
- Clone the AI Berkshire repository using
git clone https://github.com/xbtlin/ai-berkshire.git— no external dependencies required. - Install Claude Code commands using
./scripts/install-claude-commands.shor Codex skills using./scripts/install-codex-skills.sh. - The framework organizes 18 skills in the
skills/directory across three layers: Skill (definitions), Agent (multi-agent workflow defined inAGENTS.md), and Tool (tools/financial_rigor.py). - Each skill spawns four agents (business model, valuation, risk, and team lead) to perform comprehensive investment research.
- Skills automatically validate financial data using exact decimal arithmetic and cross-source verification before generating outputs.
Frequently Asked Questions
Do I need external dependencies to run AI Berkshire?
No. AI Berkshire is built using only Python standard library modules. The repository is fully self-contained, so once you clone it and run the appropriate installation script, you can immediately issue skill commands without installing additional packages or managing virtual environments.
What is the difference between the Claude Code and Codex installation scripts?
scripts/install-claude-commands.sh copies the markdown skill definitions from the skills/ directory into Claude Code's global command directory, enabling native slash commands. scripts/install-codex-skills.sh generates Codex-specific skill packages from the same source files and installs them under ~/.codex/skills. Both scripts reference the same canonical definitions in skills/ to ensure consistency across platforms.
How does the multi-agent system work within each skill?
According to the AGENTS.md file in the repository, each skill internally instantiates four independent agents that each perform a complete research sub-task: business model analysis, valuation, risk assessment, and final synthesis. These agents operate independently before returning their outputs to a "Team Lead" agent that aggregates the results into a cohesive research report.
Can I use AI Berkshire without installing the skills globally?
Yes. While the installation scripts (install-claude-commands.sh and install-codex-skills.sh) provide convenience by registering commands globally, you can manually invoke the skills by referencing the markdown definitions in the skills/ directory directly or by importing the tools/financial_rigor.py utilities into your own Python scripts. The repository is designed to function as a standalone reference implementation regardless of installation method.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →