Prerequisites to Use the AI Berkshire Project: Complete Setup Guide

To run AI Berkshire, you need a compatible AI client (Claude Code or Codex), Node.js with npm, Python 3, and Git.

AI Berkshire is an open-source investment research framework that integrates with AI coding assistants to provide financial analysis capabilities. Before executing commands like /investment-research or /news-pulse, your environment must satisfy four core dependencies documented in the repository's README.md and installation scripts.

Required AI Client

AI Berkshire requires either Claude Code (Anthropic) or Codex (OpenAI) to function as the execution environment for its skills.

Claude Code (Anthropic)

Install the Claude Code global binary using npm:

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

Once installed, the scripts/install-claude-commands.sh script copies the skill definitions from skills/*.md into Claude's command directory.

Codex (OpenAI)

For Codex users, install the client via the official install script:


# macOS / Linux

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

# Windows PowerShell

powershell -ExecutionPolicy Bypass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

The scripts/install-codex-skills.sh script then generates Codex skill packages from the canonical sources, while scripts/install-codex-prompts.sh optionally installs the slash-prompt compatibility layer.

Node.js and npm Requirements

Node.js ≥ 14 is mandatory because the installation workflow relies on npm to install client binaries and execute shell scripts that sync skill definitions. The scripts/install-claude-commands.sh and scripts/install-codex-skills.sh utilities both depend on Node.js being present in your PATH.

Install Node via your package manager:


# macOS

brew install node

# Ubuntu/Debian

sudo apt-get install nodejs npm

Python 3 Environment

The tool layer (e.g., tools/financial_rigor.py) is written in pure Python 3 and relies exclusively on the standard library—specifically decimal.Decimal for precise financial calculations. No external pip packages are required.

However, Python 3 is essential for running the utility scripts in the scripts/ directory:

Any recent Python 3.x interpreter satisfies this requirement.

Git and Shell Environment

You need Git to clone the repository and a POSIX-compatible shell (Bash on macOS/Linux or PowerShell on Windows) to run the installation scripts.

Clone the repository:

git clone https://github.com/xbtlin/ai-berkshire.git
cd ai-berkshire

Complete Installation Workflow

Execute these steps in order after installing the prerequisites:


# 1. Install the AI client (choose one)

# Option A: Claude Code

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

# Option B: Codex

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

# 2. Clone the repository

git clone https://github.com/xbtlin/ai-berkshire.git
cd ai-berkshire

# 3. Install skill definitions

# For Claude Code users:

./scripts/install-claude-commands.sh

# For Codex users:

./scripts/install-codex-skills.sh
./scripts/install-codex-prompts.sh  # Optional: slash-prompt compatibility

# 4. Verify tool layer functionality

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

Running Your First Skill

With all prerequisites satisfied, invoke a research command:


# Claude Code example

claude /investment-research 腾讯

# Codex example

codex investment-research 腾讯

Summary

  • AI Client: Install either Claude Code via npm or Codex via the official install script
  • Node.js: Required version 14+ for running installation scripts and client binaries
  • Python 3: Needed for the tool layer (tools/financial_rigor.py) and sync utilities (scripts/sync-codex-skills.py)
  • Git: Essential for cloning the repository and updating skill definitions
  • Shell: Bash (macOS/Linux) or PowerShell (Windows) to execute the install scripts

Frequently Asked Questions

Do I need to install both Claude Code and Codex?

No. You only need one compatible AI client. Choose either Claude Code (Anthropic) or Codex (OpenAI) based on your subscription. The skills/*.md files in the repository contain canonical definitions that work with either client through the respective installation scripts.

Can I run AI Berkshire without Python 3?

No. While the AI client handles the conversational interface, the tool layer requires Python 3 to execute financial calculations. The tools/financial_rigor.py script and the scripts/sync-codex-skills.py utility both invoke Python interpreters. However, you do not need to install any pip packages—only the standard library is used.

What Python version is specifically required?

Any recent Python 3.x release works. The project uses standard library modules like decimal.Decimal and argparse, which have been stable across Python 3 versions for years. The sync scripts do not depend on external frameworks like NumPy or Pandas.

Is Windows supported?

Yes. While the installation scripts use Bash (install-claude-commands.sh) by default, Codex users can run the PowerShell alternatives. The Python tools (tools/financial_rigor.py) are cross-platform, and Node.js installers are available for Windows. Ensure you have Git for Windows or WSL installed to clone the repository.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →