How to Use the Investment-Research Skill in AI Berkshire: A Complete Guide

The /investment-research command in AI Berkshire executes a seven-step master-master workflow defined in skills/investment-research.md to generate audited valuation reports for any public company.

AI Berkshire is an open-source investment research framework that automates institutional-grade equity analysis. The investment-research skill orchestrates data collection, cross-validation, and multi-scenario valuation through a declarative markdown workflow and deterministic Python tools, producing reproducible research reports every time you run the command.

Understanding the Three-Layer Architecture

Skill Layer

The skill layer defines what the command does. The workflow is purely declarative, residing in skills/investment-research.md. This file specifies a seven-module analysis pipeline: data collection, business model analysis, moat evaluation, reverse-thinking exercises, management assessment, civilization trend analysis, and final valuation.

Agent Layer

When you invoke /investment-research <Company>, the agent layer executes the skill sequentially. It spawns background tasks to gather data, then walks through each analytical module, appending "master's 追问" (follow-up questions) at each stage to enforce rigorous reasoning.

Tool Layer

Deterministic calculations are delegated to the tool layer. The skill relies on tools/financial_rigor.py for exact-decimal operations including market-cap verification (verify-market-cap), cross-source validation (cross-validate), and three-scenario valuation modeling.

Step-by-Step Execution Flow

The command follows a twelve-stage pipeline from input to audited output:

  1. Input Parsing: You invoke /investment-research 腾讯 (or any ticker/company name) via the CLI front-end.

  2. Data Collection: The agent spawns a background Task scraping financial statements and macro-trends, using the source list defined in skills/financial-data.md.

  3. Cross-Validation: Key numbers are passed to tools/financial_rigor.py for market-cap verification and multi-source cross-validation to ensure accuracy.

  4. Analysis Modules: The agent sequentially executes the seven master-master modules (business model, moat, reverse-thinking, management, civilization trend, valuation), building a Markdown section for each.

  5. Report Assembly: The completed report is written to ~/[Company]投资研究报告.md.

  6. Audit Verification: tools/report_audit.py extracts a random 15% sample of data points for a final sanity check before marking the report as准出 (approved for release).

Installation and Setup

To enable the skill in your environment, first clone the repository:

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

For Codex users, install the skills and optional prompt adapters:

./scripts/install-codex-skills.sh
./scripts/install-codex-prompts.sh

For Claude Code users, run the dedicated installer:

./scripts/install-claude-commands.sh

Restart your Codex or Claude client to load the new skill definitions from codex-skills/investment-research/SKILL.md.

Running the Investment-Research Command

After installation, invoke the skill with a company name or ticker:

Codex CLI:

investment-research 阿里巴巴

Claude Code (slash command):

/investment-research 拼多多

Each command automatically:

Key Files and Their Roles

Summary

  • The investment-research skill uses a declarative markdown workflow in skills/investment-research.md to define a seven-step research process.
  • Execution relies on a three-layer architecture: Skill (declaration), Agent (orchestration), and Tool (deterministic calculation).
  • Validation tools (tools/financial_rigor.py) ensure data accuracy through market-cap verification and cross-source validation.
  • Audit requirements (tools/report_audit.py) mandate a 15% random sample check before report approval.
  • Reports are saved to ~/[Company]投资研究报告.md and require no manual formatting.

Frequently Asked Questions

What is the seven-step workflow in the investment-research skill?

The workflow defined in skills/investment-research.md comprises: data collection, business model analysis, moat evaluation, reverse-thinking exercises, management assessment, civilization trend analysis, and final valuation. Each module appends a "master's 追问" (follow-up question) to enforce analytical rigor.

How does the skill validate financial data?

The skill delegates validation to tools/financial_rigor.py, which performs market-cap verification via verify-market-cap and cross-source checks via cross-validate. These deterministic Python functions ensure exact-decimal calculations and reproducible results across multiple data sources.

Where are the generated reports saved?

Completed research reports are written to ~/[Company]投资研究报告.md in your home directory. Before finalization, tools/report_audit.py performs a mandatory 15% random sample audit to verify data integrity against original sources.

Can I use the investment-research skill with Claude Code instead of Codex?

Yes. Run ./scripts/install-claude-commands.sh to install the slash-command adapter, then invoke the skill using /investment-research <Company>. The underlying workflow and validation logic remain identical across both clients.

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 →