How the Industry-Funnel Skill Filters Investment Opportunities in AI-Berkshire
The industry-funnel skill is a reusable Markdown workflow that narrows thousands of potential stocks into a focused investment list by applying declarative sector, liquidity, valuation, and growth filters.
The industry-funnel skill in the xbtlin/ai-berkshire repository automates the initial screening phase of quantitative investment research. Defined in skills/industry-funnel.md, this component follows the repository’s skill-as-markdown pattern to eliminate irrelevant companies before deeper fundamental analysis begins.
What Is the Industry-Funnel Skill?
The industry-funnel skill is a declarative automation script written in Markdown that implements a systematic narrowing workflow. Unlike static screeners, it operates as a dynamic skill that can be invoked across AI coding agents, accepting variable inputs such as target sectors, market-cap ranges, and valuation thresholds. The skill resides in the repository’s skills/ directory and serves as the primary entry point for sector-specific investment screening.
How the Filtering Logic Works
The core mechanism consists of four sequential filtering stages that transform raw unfiltered data into an actionable watchlist.
Input Parameter Capture
The skill begins by parsing user-defined criteria from the invocation context. Required inputs include one or more target industries (e.g., "Technology" or "Healthcare") and optional constraints such as minimum market capitalization or revenue growth rates. These parameters are validated against the schema defined in skills/industry-funnel.md before processing begins.
Data Gathering via Industry Research
Once inputs are validated, the skill delegates data retrieval to the complementary Industry Research skill located at skills/industry-research.md. This component interfaces with integrated financial data providers through tools/financial_rigor.py to pull real-time company metrics, sector classifications, and liquidity statistics for the requested universe.
Four-Stage Declarative Filtering
The funnel applies a cascading filter series defined in the skill’s Markdown code blocks:
- Sector match – Retains only companies whose primary SIC or NAICS code aligns with the requested industry classification.
- Liquidity thresholds – Removes securities with average daily trading volume below a configurable floor, ensuring investability.
- Valuation screens – Discards firms whose price-to-earnings or EV/EBITDA multiples fall outside user-defined bounds.
- Growth constraints – Optionally requires a minimum trailing twelve-month revenue growth percentage to ensure momentum.
Structured Output Generation
The surviving companies are formatted as a Markdown table containing ticker symbols, company names, market capitalizations, and key valuation multiples. This output can be copied directly into research reports or passed as input to downstream skills such as valuation-model or risk-analysis.
Cross-Platform Synchronization
Because the skill is authored as plain Markdown, it can be synchronized automatically into Codex-compatible packages. Running the repository’s helper script propagates changes from the source definition to the target environment:
python3 scripts/sync-codex-skills.py
This command generates codex-skills/industry-funnel/SKILL.md from the canonical source, ensuring that updates to the filtering logic remain consistent across both Claude-Code and Codex usage contexts. The synchronization protocol is documented in AGENTS.md, which establishes the single-source-of-truth principle for all skill definitions in the xbtlin/ai-berkshire project.
Practical Implementation Examples
Command-Line Screening
You can execute the skill directly from the terminal using the generated CLI entry point:
# Filter for technology companies with market cap exceeding $5 billion
ai-berkshire industry-funnel \
--industry "Technology" \
--min-market-cap 5B
Embedding in Research Pipelines
The skill can be embedded within larger analytical workflows using markdown directives:
# Step 1 – Gather industry candidates
{{skill:industry-funnel
industry="Technology"
min_market_cap="5B"
}}
# Step 2 – Run valuation model on filtered results
{{skill:valuation-model
input=skill_output
}}
Summary
- The industry-funnel skill is defined in
skills/industry-funnel.mdand follows the skill-as-markdown pattern used throughout xbtlin/ai-berkshire. - It filters investment opportunities through four stages: sector matching, liquidity screening, valuation bounds, and growth constraints.
- Data retrieval is handled by
skills/industry-research.mdusing utilities fromtools/financial_rigor.py. - Use
scripts/sync-codex-skills.pyto maintain compatibility across Claude-Code and Codex environments. - Output is formatted as a Markdown table suitable for direct inclusion in research reports or downstream analytical skills.
Frequently Asked Questions
What file contains the industry-funnel skill definition?
The primary definition resides at skills/industry-funnel.md in the xbtlin/ai-berkshire repository. This Markdown file contains the declarative logic, parameter schemas, and filtering rules that define how the skill operates.
How does the skill access financial data?
The skill delegates data retrieval to skills/industry-research.md, which interfaces with underlying financial data providers through the tools/financial_rigor.py module. This architecture separates the filtering logic from data acquisition, allowing the skill to remain agnostic about specific data vendors.
Can I modify the filtering criteria for specific sectors?
Yes. The skill accepts optional parameters for custom liquidity floors, valuation ranges, and growth thresholds. These inputs are applied dynamically when the skill is invoked, allowing you to tailor the funnel for aggressive growth screens or conservative value approaches without modifying the underlying code.
How do I use this skill in both Claude-Code and Codex?
Execute python3 scripts/sync-codex-skills.py to convert the canonical Markdown skill into the Codex-compatible format stored at codex-skills/industry-funnel/SKILL.md. This ensures that any updates to the filtering logic in skills/industry-funnel.md are simultaneously available in both AI environments, as specified in the repository’s AGENTS.md guidelines.
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 →