# How to Implement the Investment-Checklist with Buffett's Screening Process in AI-Berkshire

> Implement Warren Buffett's investment checklist in AI-Berkshire. Discover a powerful screening process for evaluating businesses and generating auditable reports.

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

---

**The investment-checklist skill in AI-Berkshire implements Warren Buffett's six-gate pre-buy screening methodology through a parallelized, tool-driven workflow that evaluates business understanding, economic characteristics, competitive moats, and margin of safety before generating auditable markdown reports.**

The AI-Berkshire repository provides a sophisticated `/investment-checklist` slash-command that transforms Buffett's qualitative investment philosophy into a repeatable, automated screening process. This skill functions as both a Claude Code command and a Codex skill, leveraging parallel Task-based agents and deterministic Python tools to evaluate stocks against six rigorous gates inspired by Warren Buffett's "circle of competence" and margin-of-safety principles.

## Architectural Overview of the Investment-Checklist

The skill workflow begins with input processing and proceeds through parallelized data collection before executing the six-gate evaluation. According to [`skills/investment-checklist.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-checklist.md), the architecture follows a layered orchestration designed to minimize latency while maximizing analytical rigor.

### Input Normalisation and Bias Assessment

The process starts at lines 5-13 of [`skills/investment-checklist.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-checklist.md), where the skill receives free-form company identifiers (e.g., "Tencent, 茅台, NVDA"). It parses each entry to extract full names, tickers, and exchanges, flagging unlisted firms for bypass. Immediately following (lines 15-24), an AI-driven "information-richness" rating (A/B/C) is assigned to determine how strictly the subsequent checklist applies to each candidate.

### Parallel Data Harvesting

For every validated company, the system spawns a Task-based background agent (lines 29-40). These agents concurrently pull eight data groups: profitability, valuation, growth, financial health, competitive landscape, moat evidence, management quality, and recent news. This parallelism dramatically reduces latency compared to sequential processing.

## The Six-Gate Buffett Screening Process

The core evaluation occurs within six gates that mirror Buffett's buying criteria, as implemented in [`skills/investment-checklist.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-checklist.md) between lines 44-172. Each gate yields a ★-rating (1-5) and can trigger a hard-stop if mandatory conditions fail.

### Gate 1 – Business Understanding (能力圈)

Lines 44-72 verify that the business model can be described succinctly and remains viable a decade ahead. This gate enforces Buffett's "circle of competence" rule—a hard-stop occurs if the system cannot articulate how the company makes money.

### Gate 2 – Economic Characteristics (经济特征)

Lines 84-92 invoke [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) to compute quantitative metrics including ROE, margin, free-cash-flow, asset intensity, and debt ratios. Unlike manual calculations, this Python script ensures reproducible financial rigor through deterministic algorithms.

### Gate 3 – Moat Depth Assessment

Lines 95-112 evaluate sustainable competitive advantages through brand strength, switching costs, network effects, scale advantages, and IP barriers. The gate includes a "competitor replication" thought experiment to test moat durability.

### Gate 4 – Management Trustworthiness

Lines 116-133 assess qualitative factors including capital-allocation skill, shareholder orientation, founder versus professional management, and governance structures. Honesty and transparency in communications carry significant weight in this evaluation.

### Gate 5 – Margin of Safety Valuation

Lines 136-162 execute a three-scenario valuation using [`financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/financial_rigor.py) to obtain PE, forward-PE, PB, dividend yield, and FCF-Yield bands. The system compares current price against intrinsic value estimates, requiring a sufficient safety margin for passage.

### Gate 6 – Position-Sizing Discipline

Lines 165-172 screen for emotional triggers including FOMO and hype indicators. This final gate ensures the investment thesis can be expressed in ≤200 words, enforcing clarity and conviction before capital allocation.

## Mirror Test and Final Evaluation

Following the six gates, the skill generates a "mirror-test" paragraph (lines 75-85) and runs a quick-reject checklist (lines 90-102) examining red-flag items such as negative cash-flow trends, management scandals, or eroding moats. Any triggered item immediately marks the company as **Reject**, preventing further analysis.

For multi-company runs, the system builds a comparison table (lines 105-124) summarizing gate results, safety-margin scores, and final verdicts. The complete analysis writes to `~/巴菲特Checklist-{公司名}.md` (lines 125-140), creating an auditable record with full citations.

## Invoking the Skill and Tool Commands

You can trigger the Buffett screening process through the Claude Code interface or invoke underlying tools directly.

Run the complete checklist for multiple tickers:

```bash
claude-code run /investment-checklist "Tencent, Moutai, NVDA"

```

Execute direct valuation verification (used in Gate 2):

```bash
python3 tools/financial_rigor.py verify-valuation \
  --price 215.30 --eps 8.24 --bvps 45.12 --fcf-per-share 6.58 --dividend 2.10

```

Run three-scenario valuation analysis (Gate 5):

```bash
python3 tools/financial_rigor.py three-scenario \
  --price 215.30 --eps 8.24 --shares 1.2 \
  --growth 0.12 0.08 0.04 \
  --pe 15 20 30 \
  --currency CNY

```

Access generated reports programmatically:

```python
from pathlib import Path
report_path = Path.home() / "巴菲特Checklist-多公司对比.md"

# The skill automatically writes compiled markdown to this location

```

## File Structure and Sync Automation

The investment-checklist implementation spans several coordinated files:

- **[`skills/investment-checklist.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-checklist.md)** – Canonical markdown definition of the six-gate process and data requirements (lines 5-172)
- **[`codex-skills/investment-checklist/SKILL.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-skills/investment-checklist/SKILL.md)** – Auto-generated Codex wrapper mapping slash commands to skill logic
- **[`codex-prompts/investment-checklist.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-prompts/investment-checklist.md)** – Prompt declarations for downstream agent loading
- **[`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py)** – Core financial-analysis utilities invoked by Gates 2 and 5
- **[`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py)** – Automation script that regenerates Codex artifacts when source markdown changes

According to the AI-Berkshire source code, maintaining synchronization between the human-readable skill definition and the Codex runtime requires running [`scripts/sync-codex-skills.py`](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py) after any modifications to [`skills/investment-checklist.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-checklist.md).

## Summary

- The **investment-checklist** skill implements Buffett's six-gate screening via parallel Task-based agents and deterministic Python tools.
- **Input normalisation** (lines 5-13) and **bias pre-checks** (lines 15-24) filter candidates before parallel data harvesting begins.
- **Six quantitative and qualitative gates** evaluate business understanding, financial rigor, moat depth, management quality, margin of safety, and emotional discipline.
- **Hard stops** enforce Buffett's "don't buy what you don't understand" rule, while the **mirror test** and **quick-reject list** catch red flags post-evaluation.
- **Financial rigor** relies on [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) for reproducible valuation calculations rather than AI estimation.
- **Auditable outputs** write to `~/巴菲特Checklist-{公司名}.md`, enabling transparent review of every rating and data source.

## Frequently Asked Questions

### How does the investment-checklist handle multiple companies simultaneously?

The skill spawns a Task-based background agent for each company (lines 29-40), enabling concurrent data harvesting across profitability, valuation, growth, and competitive metrics. This parallel architecture reduces total execution time significantly compared to sequential processing, then aggregates results into a single comparison table written to `~/巴菲特Checklist-多公司对比.md`.

### What triggers a hard-stop rejection in the Buffett screening gates?

Hard-stops occur when mandatory conditions fail, such as the inability to articulate how a company makes money (Gate 1), or when the mirror-test quick-reject list (lines 90-102) identifies red flags including negative cash-flow trends, management scandals, or eroding competitive moats. These stops enforce Buffett's discipline of avoiding investments outside the "circle of competence" or exhibiting fundamental deterioration.

### Which Python tools perform the quantitative calculations in Gates 2 and 5?

The [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) script handles all deterministic financial calculations. Gate 2 invokes verification functions for ROE, margin, and debt ratios, while Gate 5 executes the `three-scenario` command to generate PE, PB, and FCF-Yield bands across optimistic, baseline, and pessimistic growth assumptions, ensuring reproducible valuation metrics rather than AI hallucinations.

### How do I synchronize the skill definition after making edits?

Run `python3 scripts/sync-codex-skills.py` after modifying [`skills/investment-checklist.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/investment-checklist.md). This script regenerates the auto-generated wrappers in [`codex-skills/investment-checklist/SKILL.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-skills/investment-checklist/SKILL.md) and updates prompt declarations in [`codex-prompts/investment-checklist.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-prompts/investment-checklist.md), ensuring the Claude Code and Codex runtimes reflect your latest screening logic.