How to Use the Industry-Funnel Skill in AI-Berkshire for Value Investing Research

The industry-funnel skill narrows a broad thematic search to three final investment candidates through a four-stage quantitative filter, invoked via /industry-funnel <theme> in Claude Code or the Codex prompt wrapper.

The industry-funnel skill is a declarative workflow defined in the xbtlin/ai-berkshire repository that transforms broad industry themes into rigorously vetted investment shortlists. Unlike traditional screening tools, this skill implements a multi-stage funnel process that combines quantitative hard filters with qualitative deep-dive analysis, outputting auditable markdown reports ready for value-oriented decision making.

Four-Stage Quantitative Workflow

The skill orchestrates a disciplined progression from market scan to final selection, documented entirely in skills/industry-funnel.md.

Stage 1: Market Scan

Collect all relevant tickers across A-shares, Hong Kong, US exchanges, and pre-IPO candidates using data sources like 同花顺, 东方财富, 富途, and NASDAQ.

Stage 2: Hard-Filter

Apply five quantitative criteria to eliminate weak candidates:

  • PE ratio thresholds
  • ROE minimums
  • Cash-flow stability
  • Debt-ratio caps
  • Moat rating of ★★★ or higher

Stage 3: Structured Analysis

Generate a 300-500 word structured review for each surviving company, analyzing business model durability and competitive positioning.

Stage 4: Deep-Dive Selection

Produce an 800-1200 word "Four Masters" analysis for the final three picks, evaluating investment portfolio complementarity and margin of safety.

Invocation Methods

The skill exposes identical functionality through two interfaces that both resolve to the same underlying markdown workflow.

Claude Code Slash Command

Type the command directly in the Claude UI:

/industry-funnel AI 算力

The parser substitutes $ARGUMENTS with your input and executes the four-stage workflow defined in skills/industry-funnel.md.

Codex Prompt Wrapper

For Codex users, invoke via the generated prompt:

python3 -m codex.run codex-prompts/industry-funnel.md "AI 算力"

This loads codex-prompts/industry-funnel.md, which forwards the request to the master skill file.

Auditing Generated Reports

After the funnel produces a report in reports/{行业}-funnel-{YYYYMMDD}.md, verify data accuracy using the audit tool.

Extract data points for verification:

python3 tools/report_audit.py extract --report reports/AI算力-funnel-20260710.md

Fill the generated JSON template with fetched values from macrotrends, eastmoney, and other sources, then run:

python3 tools/report_audit.py verdict --results '<filled-json>'

A 【准出】 verdict indicates the report cleared validation and is ready for publication.

Key Architecture and Source Files

Understanding the file structure ensures correct usage and debugging:

  • skills/industry-funnel.md – Master workflow definition containing stage descriptions, filter thresholds, and output table schemas.
  • codex-prompts/industry-funnel.md – Generated prompt wrapper that exposes the skill to Codex runners.
  • tools/report_audit.py – Extraction and verification engine that cross-checks financial figures against external data providers.
  • reports/ – Dynamic output directory storing completed funnel analyses with standardized naming conventions.

Summary

  • The industry-funnel skill implements a four-stage filter (Market Scan → Hard-Filter → Structured Analysis → Deep-Dive) defined in skills/industry-funnel.md.
  • Invoke via /industry-funnel <theme> in Claude Code or the Codex prompt wrapper for identical results.
  • The skill contains no executable code; it provides a declarative workflow for human or AI execution.
  • Validate outputs using tools/report_audit.py to ensure financial data accuracy before publishing.
  • Final reports follow strict templates in reports/ with naming convention {行业}-funnel-{YYYYMMDD}.md.

Frequently Asked Questions

What makes the industry-funnel skill different from standard stock screeners?

Unlike automated screeners that only handle quantitative data, the industry-funnel skill mandates a 300-500 word structured qualitative analysis for surviving candidates and an 800-1200 word "Four Masters" deep-dive for final selections, ensuring both numerical and business-quality validation.

Can I modify the filter thresholds in the hard-filter stage?

Yes. The thresholds for PE, ROE, cash-flow, debt-ratio, and moat ratings are defined in skills/industry-funnel.md. Edit this markdown file to adjust quantitative criteria before running the funnel.

How do I know if the generated report data is accurate?

Run python3 tools/report_audit.py extract to pull all financial claims from the report into a verification JSON template. After cross-referencing with external sources like macrotrends and eastmoney, submit the filled JSON to report_audit.py verdict to receive a 【准出】 clearance or flagged discrepancies.

Does the skill automatically execute trades or fetch real-time data?

No. The industry-funnel skill is purely declarative and contains no executable trading logic. It structures a workflow for data gathering and analysis, but requires manual execution or AI assistance to populate the research stages and verify data through the audit tool.

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 →