# How to Set Up the AI-Berkshire Project Locally: Complete Installation Guide

> Set up the ai-berkshire project locally with our complete installation guide. Install Claude Code or Codex CLI, clone the repository, and deploy investment-research Skills easily.

- Repository: [Xbt Lin/ai-berkshire](https://github.com/xbtlin/ai-berkshire)
- Tags: how-to-guide
- Published: 2026-07-08

---

**To set up the ai-berkshire project locally, install the Claude Code or Codex CLI, clone the xbtlin/ai-berkshire repository, and run the appropriate install script to deploy the investment-research Skills into your client environment.**

AI-Berkshire is a collection of investment-research Skills designed to work with Claude Code or Codex clients. Setting up the project locally requires three main phases: installing the client runtime, cloning the source tree, and executing the installation scripts that copy Skill definitions into the client's command directory. This guide walks through each step using the exact file paths and commands defined in the repository source code.

## Step 1: Install the AI Client

Choose one of the supported AI clients. You do not need both.

### Install Claude Code

Run the global installation via npm:

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

```

Verify the installation:

```bash
claude --version

```

These commands add the `claude` binary to your `$PATH` according to the project README (lines 33-55).

### Install Codex

You have three installation options for the Codex CLI:

**Option A: Using the official install script**

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

```

**Option B: Using npm**

```bash
npm install -g @openai/codex

```

**Option C: Using Homebrew (macOS)**

```bash
brew install --cask codex

```

Verify the installation:

```bash
codex --version

```

## Step 2: Clone the Repository

Clone the complete source tree containing the Skill definitions, helper scripts, and tooling:

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

```

The repository includes:

- **`skills/*.md`**: Canonical Skill definitions (source of truth)
- **`codex-skills/`**: Generated Codex skill packages
- **`scripts/`**: Installation and synchronization scripts
- **[`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py)**: Precision finance utilities used by the Skills
- **[`AGENTS.md`](https://github.com/xbtlin/ai-berkshire/blob/main/AGENTS.md)**: Architecture diagram and compatibility rules

## Step 3: Install the Skills

Run the installation script that corresponds to your chosen client.

### For Claude Code Users

Execute the Claude-specific install script:

```bash
./scripts/install-claude-commands.sh

```

This script copies each `skills/*.md` file into Claude Code's global commands directory. After installation, you can invoke Skills directly from the CLI using commands like `/investment-research`, `/news-pulse`, or `/investment-checklist` (README, lines 84-88).

### For Codex Users

Run the Codex skill installation script:

```bash
./scripts/install-codex-skills.sh

```

This executes [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py) to generate Codex-compatible skill packages from the canonical `skills/*.md` sources, then places them under `~/.codex/skills`.

**Optional:** Install slash-prompts for a Claude-like menu experience:

```bash
./scripts/install-codex-prompts.sh

```

**Important:** After installing Codex skills, restart the Codex daemon so the new commands are recognized (README, lines 96-104).

## Step 4: Verify the Installation

Test that the Skills are properly loaded and the underlying toolchain is reachable.

**Claude Code verification:**

```bash
claude /investment-checklist 腾讯, 阿里巴巴

```

**Codex verification:**

```bash
codex /prompts:investment-research 腾讯

```

A successful response indicates that [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) and other dependencies are correctly accessible.

## Optional Configuration: Reduce Permission Prompts

By default, Claude Code asks for permission before each tool call. In a trusted local environment, you can suppress these dialogs to enable seamless batch processing:

```bash
claude --dangerously-skip-permissions

```

This flag is documented in the README (lines 66-73) and disables the per-call permission dialogs.

## Summary

- **Install the client**: Use `npm install -g @anthropic-ai/claude-code` for Claude Code or `npm install -g @openai/codex` (or curl/brew) for Codex.
- **Clone the repository**: `git clone https://github.com/xbtlin/ai-berkshire.git` provides the `skills/` directory and `scripts/` folder.
- **Run install scripts**: Execute [`./scripts/install-claude-commands.sh`](https://github.com/xbtlin/ai-berkshire/blob/main/./scripts/install-claude-commands.sh) or [`./scripts/install-codex-skills.sh`](https://github.com/xbtlin/ai-berkshire/blob/main/./scripts/install-codex-skills.sh) to deploy Skills to `~/.codex/skills` or the Claude commands directory.
- **Verify**: Test with `claude /investment-checklist` or `codex /prompts:investment-research` to confirm the setup.
- **Optional**: Use `--dangerously-skip-permissions` with Claude Code to bypass confirmation prompts.

## Frequently Asked Questions

### Do I need to install both Claude Code and Codex to use AI-Berkshire?

No. AI-Berkshire supports either client independently. Install only the one you prefer to use. The repository contains separate installation scripts ([`scripts/install-claude-commands.sh`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/install-claude-commands.sh) and [`scripts/install-codex-skills.sh`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/install-codex-skills.sh)) for each platform.

### Where are the Skill files stored after installation?

For Claude Code, the script copies the `skills/*.md` files into the client's global commands directory. For Codex, the skills are generated and placed under `~/.codex/skills/` as structured packages derived from the canonical definitions in `skills/*.md`.

### How do I update the Skills after pulling the latest repository changes?

Re-run the installation script for your client after pulling updates. For Codex users, [`./scripts/install-codex-skills.sh`](https://github.com/xbtlin/ai-berkshire/blob/main/./scripts/install-codex-skills.sh) re-executes [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py) to regenerate the packages from the updated `skills/*.md` source files.

### Is it safe to use the `--dangerously-skip-permissions` flag?

This flag disables Claude Code's per-tool permission prompts, which is useful for batch processing in a trusted local environment. However, it removes the safety guardrails that prevent unintended tool executions. Only use this flag when running Skills in a secure, isolated context.