AI-Berkshire Agent Setup Documentation: Complete Installation Guide
AI-Berkshire agent setup documentation is located in the repository's README.md and automated installer scripts, supporting both Claude Code commands and OpenAI Codex skills through a language-agnostic workflow. The xbtlin/ai-berkshire repository provides platform-specific shell scripts that handle the entire installation process, from CLI prerequisites to skill synchronization.
Prerequisites and Installation Options
AI-Berkshire supports two primary LLM platforms. Choose the installation path that matches your preferred coding assistant.
Claude Code CLI Installation
Before running the AI-Berkshire setup, install the Anthropic CLI globally:
npm install -g @anthropic-ai/claude-code
This command installs the claude binary required to execute the repository's custom commands.
OpenAI Codex CLI Installation
For Codex users, install the CLI using one of three methods supported by the documentation:
# Option 1: curl script
curl -fsSL https://chatgpt.com/codex/install.sh | sh
# Option 2: npm
npm install -g @openai/codex
# Option 3: Homebrew
brew install openai-codex
Verify installation with codex --version before proceeding to the repository setup.
Step-by-Step AI-Berkshire Agent Setup
Once the base CLI is installed, configure the agent capabilities through the repository's automation scripts.
Clone the Repository
Clone the canonical source and navigate to the project root:
git clone https://github.com/xbtlin/ai-berkshire.git
cd ai-berkshire
The skills/*.md files in this directory serve as the canonical source definitions for all agent behaviors.
Run the Platform-Specific Installer
Execute the appropriate installer script based on your CLI choice:
For Claude Code users:
./scripts/install-claude-commands.sh
This script copies the Skill Markdown files into the global Claude Code commands directory, making them available as slash commands.
For Codex users:
./scripts/install-codex-skills.sh
Optionally, add slash-prompt compatibility:
./scripts/install-codex-prompts.sh
The scripts/install-codex-skills.sh generates and installs the Codex skill packages, while scripts/install-codex-prompts.sh creates wrappers for slash-prompt compatibility.
Synchronize Generated Artifacts
After editing any skills/*.md file or pulling updates, regenerate the platform-specific artifacts:
# Refresh Codex skill packages
python3 scripts/sync-codex-skills.py
# Refresh slash-prompt wrappers (if using optional compatibility layer)
python3 scripts/sync-codex-prompts.py
These Python scripts treat the Markdown skill definitions as the single source of truth, ensuring consistency across both platforms.
Verifying Your Installation
Confirm the setup completed successfully:
- Claude Code: Run
claude --versionto verify the CLI version, then list available commands to see the installed skills. - Codex: Run
codex --version, then restart the Codex application to load the newly installed skills into the prompt context.
Both platforms should now recognize the 18+ research skills defined in the skills/ directory.
Running Your First Agent
Invoke agents using platform-specific syntax after completing the AI-Berkshire agent setup.
Claude Code syntax:
/investment-research 腾讯
/investment-team 美团
/dyp-ask "拼多多的护城河到底在哪里?"
Codex syntax:
After restarting the application, type the skill name directly:
investment-research 腾讯
earnings-review PDD 2025Q4
news-pulse 腾讯
Each command automatically spins up four parallel sub-agents that perform distinct analyses—business model, valuation, moat, and risk—then aggregate the results into a unified response.
Understanding the Agent Architecture
The underlying architecture is documented in assets/architecture.mmd, a Mermaid diagram illustrating how the coordinator agent dispatches parallel sub-agents. When you invoke a skill, the system leverages tools/financial_rigor.py for financial validation utilities that ensure consistent, quantitative analysis across all sub-agents.
This multi-agent design, implemented in the xbtlin/ai-berkshire source code, ensures comprehensive coverage of investment research dimensions without manual prompt engineering.
Summary
- AI-Berkshire agent setup documentation resides primarily in
README.mdand thescripts/directory. - Installers at
scripts/install-claude-commands.shandscripts/install-codex-skills.shautomate platform-specific setup. - Canonical skill definitions live in
skills/*.mdand are synchronized viascripts/sync-codex-skills.py. - The architecture uses four parallel sub-agents (business, valuation, moat, risk) coordinated through a multi-agent system.
- Verification requires CLI version checks and a restart to load newly installed skills.
Frequently Asked Questions
Where is the official AI-Berkshire agent setup documentation located?
The official documentation is located in the repository's README.md file at the root of the xbtlin/ai-berkshire repository. Additional implementation details are found in the shell scripts within the scripts/ directory, including install-claude-commands.sh and install-codex-skills.sh, which contain the executable setup instructions.
Can I use AI-Berkshire with both Claude Code and OpenAI Codex simultaneously?
Yes. The repository supports both platforms through separate installer scripts. Run ./scripts/install-claude-commands.sh for Claude Code integration and ./scripts/install-codex-skills.sh for Codex. The skills/*.md files serve as the single source of truth, so you can maintain both installations and synchronize them using the respective Python sync scripts.
What happens if I modify a skill definition after installation?
After editing any file in skills/*.md, you must regenerate the platform artifacts. Run python3 scripts/sync-codex-skills.py to refresh Codex skill packages, and for Codex slash-prompt compatibility, run python3 scripts/sync-codex-prompts.py. Claude Code users typically do not need synchronization as the installer copies Markdown files directly.
How do the AI-Berkshire agents handle complex financial analysis?
According to the assets/architecture.mmd diagram and tools/financial_rigor.py implementation, each agent invocation spawns four parallel sub-agents specializing in business model analysis, valuation, competitive moat assessment, and risk evaluation. These sub-agents execute simultaneously and aggregate their findings, with financial rigor enforced through shared validation utilities in the tools/ directory.
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 →