Where to Find the Claude Code Behavior Guide for AI Berkshire
The Claude Code behavior guide for AI Berkshire is located in the CLAUDE.md file at the repository root, serving as the definitive reference for how Claude executes investment-research Skills.
The xbtlin/ai-berkshire repository implements a Claude‑based investment research system that relies on structured behavior instructions to generate consistent, objective financial analysis. Understanding where to find and how to interpret the Claude Code behavior guide is essential for anyone looking to invoke the project's Skills or extend its capabilities.
Location and Purpose of the Claude Code Behavior Guide
The definitive behavior guide for AI Berkshire is the CLAUDE.md file, located at the root of the repository (./CLAUDE.md). This markdown document functions as the single source of truth for Claude Code‑specific behavior, containing the complete set of instructions, conventions, and principles that Claude follows when executing investment‑research Skills.
The guide dictates how Claude should handle specific commands like /investment-team, /industry-research, and /portfolio-review, ensuring that every generated report adheres to the project's "four masters" investment framework and maintains mandatory objectivity.
The CLAUDE.md File Structure
The behavior guide is organized into discrete sections that cover both high‑level philosophy and implementation details:
- Project Overview — Describes the Claude‑based Skill collection and the "four masters" investment framework
- Project Structure — Defines the directory layout including
skills/,tools/,reports/, andassets/ - Report Naming Conventions — Specifies file‑naming rules for each Skill output
- Investment‑Research Core Principles — Mandates objectivity, data‑first approaches, and style guidelines
- GitHub Operations — Documents recommended clone paths, remote URLs, and commit workflows
- Common Commands — Provides Bash snippets for pushing reports to GitHub
- Important Notes — Covers manual market‑cap verification, currency handling, and usage of
tools/financial_rigor.py
Key Conventions Defined in the Guide
The Claude Code behavior guide for AI Berkshire establishes strict protocols that govern how Claude interacts with the codebase and formats its outputs.
Skill Invocation and Directory Structure
When you invoke a Skill using Claude Code, the behavior guide in CLAUDE.md directs Claude to create structured output directories under reports/. For example, analyzing a company like Tencent follows a specific directory creation pattern:
# Example: Invoking the investment-team Skill (Claude Code)
/investment-team 腾讯
Upon receiving this command, Claude creates a directory structure under reports/腾讯/ and populates the four master‑view markdown files plus a final report, exactly as dictated by Section 4 of the behavior guide.
Financial Rigor Requirements
The guide mandates the use of tools/financial_rigor.py for precise metric computation. This Python utility, referenced throughout CLAUDE.md, ensures that calculations involving market capitalization, currency conversion, and financial ratios meet the project's strict accuracy standards before being committed to any report.
Practical Usage Examples
Working with the AI Berkshire Claude Code behavior guide requires understanding both the Skill invocation syntax and the repository workflow.
Invoking Investment-Research Skills
The behavior guide specifies that Skills must be invoked using forward‑slash commands followed by the target company or sector. Claude interprets these commands according to the canonical definitions stored in skills/*.md:
# Example: Industry research command pattern
/industry-research 新能源汽车
Claude references the Skill definitions in the skills/ directory to determine the required report sections, analysis depth, and mandatory data points for the specified industry.
Git Workflow and Commit Conventions
Section 7 of the behavior guide outlines specific Git operations that maintain repository integrity. The workflow requires Chinese commit messages and strict synchronization protocols:
# Example: Adding a new report and pushing it (from the "Common Commands" section)
cd ~/ai-berkshire
git add reports/腾讯/最终报告.md
git commit -m "添加腾讯最终报告"
git pull --rebase origin main # ensure up‑to‑date
git push origin main
This workflow ensures that the repository stays in sync and that commit history follows the project's linguistic conventions as defined in the Claude Code behavior guide.
Supporting Files and Tools
While CLAUDE.md serves as the primary behavior guide, several adjacent files provide critical context and functionality:
README_EN.md— English‑language overview of the repository for international contributorsskills/*.md— Canonical Skill definitions that Claude reads to generate reports, located in theskills/directorytools/financial_rigor.py— Financial‑calculation utility referenced in the guide for precise metric computationscripts/sync-codex-skills.py— Helper script demonstrating how Skill files are regenerated, useful for understanding the project's meta‑programming approach
Summary
- The Claude Code behavior guide for AI Berkshire is located at
CLAUDE.mdin the repository root. - The guide defines how Claude executes investment‑research Skills like
investment-teamandindustry-research. - Key sections cover project structure, report naming conventions, and GitHub operations.
- The
tools/financial_rigor.pyutility is mandated for all financial calculations. - Chinese commit messages and specific Git workflows are required when pushing reports.
Frequently Asked Questions
Where exactly is the Claude Code behavior guide file located?
The behavior guide is located at the root of the xbtlin/ai-berkshire repository in a file named CLAUDE.md. You can view it directly at https://github.com/xbtlin/ai-berkshire/blob/main/CLAUDE.md. This file contains all instructions, conventions, and principles that Claude Code follows when operating within the project.
What types of commands does the behavior guide define?
The guide defines Skill invocation commands such as /investment-team, /industry-research, and /portfolio-review. These commands trigger Claude to create structured directories under reports/ and generate markdown files following specific templates defined in the skills/ directory, ensuring consistent analysis format across all investment research.
Why does the guide require using tools/financial_rigor.py?
The tools/financial_rigor.py utility is required to ensure financial calculation accuracy and data integrity. The behavior guide mandates this tool for computing precise metrics like market capitalization and currency conversions, preventing manual calculation errors and maintaining the objective, data‑first standards required by the Investment‑Research Core Principles section of CLAUDE.md.
How does the guide specify Git operations should be performed?
The behavior guide specifies that Git operations must follow a rebase workflow with Chinese commit messages. When pushing new reports, users must pull with --rebase to ensure the repository remains up‑to‑date before pushing, and write commit messages in Chinese (e.g., "添加腾讯最终报告") to align with the project's localization requirements.
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 →