How to Install Claude Code for AI Berkshire: Complete Setup Guide

To install Claude Code for AI Berkshire, install the npm client @anthropic-ai/claude-code, clone the repository, and run the scripts/install-claude-commands.sh script to copy markdown skills into $HOME/.claude/commands.

The AI Berkshire project (xbtlin/ai-berkshire) provides financial analysis capabilities through Claude Code commands. These commands are defined as markdown files that the Claude Code client interprets directly. Installing the integration requires placing these markdown skill files into the client's command directory alongside the npm binary.

Prerequisites

You need Node.js and npm installed to run the Claude Code client. The repository requires Git to clone the skill definitions and utility scripts.

Step-by-Step Installation

Install the Claude Code Client

The official Anthropic npm package provides the claude binary that reads commands from your local filesystem.

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

This global installation makes the claude command available system-wide.

Clone the AI Berkshire Repository

The repository contains the canonical markdown command files under skills/ and helper utilities in tools/.

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

According to the repository structure, the skills/ directory houses plain-markdown files like investment-research.md and news-pulse.md that define each command behavior.

Run the Installation Script

Execute the helper script scripts/install-claude-commands.sh to complete the installation. This script performs two critical operations:

  1. Creates the target directory at $HOME/.claude/commands (or the path specified by CLAUDE_COMMANDS_DIR)
  2. Copies every *.md file from skills/ into that directory
  3. Makes utility scripts in tools/ executable (e.g., financial_rigor.py)
./scripts/install-claude-commands.sh

The script outputs confirmation: Installed Claude Code commands to $HOME/.claude/commands.

Using AI Berkshire Commands

After installation, invoke any skill directly from your terminal using the claude binary:


# Investment research on specific tickers

claude /investment-research 腾讯

# News analysis for companies

claude /news-pulse PDD

# Portfolio review with allocation percentages

claude /portfolio-review "腾讯30%, 美团20%, 茅台20%, 现金30%"

The commands are ordinary markdown files, so they remain version-controlled and updateable by pulling the latest repository changes.

Custom Installation Paths

If you need to install commands to a non-standard location, set the CLAUDE_COMMANDS_DIR environment variable before running the script:

export CLAUDE_COMMANDS_DIR=$HOME/.my-claude-commands
./scripts/install-claude-commands.sh

The script checks this variable at line 8 to determine the destination for the markdown skill files.

Summary

  • Install the client: Run npm install -g @anthropic-ai/claude-code to get the claude binary
  • Clone the repository: git clone https://github.com/xbtlin/ai-berkshire.git provides the skill definitions
  • Execute the script: Run ./scripts/install-claude-commands.sh to copy files from skills/ to $HOME/.claude/commands
  • Customize paths: Use CLAUDE_COMMANDS_DIR environment variable for alternative installation locations
  • Update easily: Pull new changes from the repository to update commands, as they are stored as version-controlled markdown

Frequently Asked Questions

Where does the install script place the AI Berkshire command files?

The script scripts/install-claude-commands.sh copies all markdown files from the skills/ directory into $HOME/.claude/commands by default. This location is where the Claude Code client searches for user-defined commands.

Can I install Claude Code for AI Berkshire without using the provided script?

Yes. You can manually create $HOME/.claude/commands and copy the *.md files from the skills/ directory into it. However, you must also manually make the Python utilities in tools/ executable, which the script handles automatically at line 9.

What npm package provides the Claude Code binary?

The @anthropic-ai/claude-code package provides the claude executable required to interpret the AI Berkshire markdown commands. Install it globally with npm install -g @anthropic-ai/claude-code.

How do I update AI Berkshire commands after installation?

Since the commands are plain markdown files stored in the repository, simply pull the latest changes from the GitHub repository and re-run ./scripts/install-claude-commands.sh. This overwrites the existing command files in your Claude directory with the updated versions.

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 →