How to Implement the Bottleneck-Hunter Skill for Supply Chain Constraint Analysis
The bottleneck-hunter skill is a seven-stage AI workflow that transforms high-level macro trends into actionable supply-chain bottleneck maps and investable company shortlists through quantitative filtering and cross-validation.
The bottleneck-hunter skill in the xbtlin/ai-berkshire repository provides a structured methodology for identifying supply-chain constraints within major secular trends. Implemented in the canonical skill definition at skills/bottleneck-hunter.md, this AI-driven pipeline decomposes "supertrends" into physical supply layers, scores bottlenecks using quantitative criteria, and screens for investable companies that meet strict financial guardrails.
Understanding the Skill Architecture
The skill operates as a deterministic workflow defined in skills/bottleneck-hunter.md (lines 1–475). It bridges macro trend analysis with microscopic supply-chain verification, ensuring that only companies meeting rigorous operational and financial criteria surface in the final output. The architecture maintains a single source of truth: the canonical markdown file serves both Claude Code users and Codex users through a lightweight wrapper at codex-skills/bottleneck-hunter/SKILL.md.
The Seven-Stage Implementation Workflow
Stage 1: Super-Trend Confirmation
Filter incoming trends against four quantitative criteria—continuity, physicality, scale, and acceleration—defined in the trend validation table (L21–L27). Trends must demonstrate sustained momentum and physical-world impact rather than speculative narratives.
Stage 2: Physical Supply-Chain Decomposition
Decompose the validated trend into five hierarchical layers (Layer 0 → Layer 4) that trace from end-products to underlying infrastructure (L58–L75). This physical mapping ensures the analysis targets tangible constraints rather than abstract demand.
Stage 3: Bottleneck Identification
Evaluate every Layer 2–3 element against six quantitative criteria: concentration, expansion cycle, substitutability, utilization, demand growth, and customer-validation lag (L18–L26). Apply a red-yellow-green rating system to classify constraints as S-level (critical), A-level (significant), or B-level (moderate) bottlenecks.
Stage 4: Company Screening
Map each high-rated bottleneck to listed firms, then apply fast-filter rules (L68–L74):
- Public trading status
- Bottleneck-business revenue share > 30%
- Market capitalization < $10 billion
- Daily turnover > $1 million
Stage 5: Valuation Guardrails
Enforce hard valuation guards to prevent overpriced entries (L77–L90):
- Reject if PS ratio > 30× paired with growth < 100%
- Reject if market-cap exceeds 20% of Total Addressable Market (TAM)
- Flag companies failing margin or leverage thresholds
Stage 6: Cross-Validation
Corroborate each candidate with at least two independent data sources (L45–L69). Valid sources include client contracts, production-capacity utilization data, and third-party analyst reports. This step eliminates false positives from promotional materials.
Stage 7: Output Generation
Render a concise bottleneck opportunity board containing a ranking table, one-page investment summary, and action recommendation (L70–L85). Persist daily updates to reports/bottleneck-map/ to maintain a living repository of constraint analyses.
Invoking the Skill via CLI
Activate the workflow using the slash command documented in README.md (lines 191–200):
/bottleneck-hunter AI基础设施
The command loader resolves the skill definition through codex-skills/bottleneck-hunter/SKILL.md, which points back to the canonical skills/bottleneck-hunter.md file. This indirection ensures synchronized behavior across AI coding platforms while maintaining a single editable source.
Core Implementation Logic
The underlying Python execution flow follows this structural pattern:
def run_bottleneck_hunter(trend):
# 1️⃣ Validate trend against criteria (L21-L27)
if not validate_trend(trend):
return "Trend rejected"
# 2️⃣ Decompose supply-chain (L58-L75)
layers = decompose(trend)
# 3️⃣ Score bottlenecks (L18-L26)
bottlenecks = score_layers(layers)
# 4️⃣ Find listed companies (L68-L74)
candidates = screen_companies(bottlenecks)
# 5️⃣ Apply valuation guardrails (L77-L90)
vetted = valuation_filter(candidates)
# 6️⃣ Cross-validate (L45-L69)
verified = cross_validate(vetted)
# 7️⃣ Render report (L70-L85)
return render_report(verified)
Output Format and Repository Structure
The final deliverable generates a standardized opportunity board:
| 排名 | 公司 | 代码 | 市值 | 年收入 | PS | PE | 瓶颈环节 | 瓶颈评级 | 市场份额 | 收入增速 | 信号强度 | 估值判断 |
|------|------|------|------|--------|----|----|----------|----------|----------|----------|----------|----------|
| 1 | 光模块公司A | 600123 | $8B | $1.2B | 12× | 18× | 光模块 | S | 22% | 45% | ★★★★★ | 估值绿灯 |
Persistent storage maintains historical scans in reports/bottleneck-map/, enabling longitudinal tracking of constraint evolution and company performance.
Summary
- The bottleneck-hunter skill operates through seven sequential stages defined in
skills/bottleneck-hunter.md, from trend confirmation to final output generation. - Quantitative rigor drives the pipeline: six criteria identify bottlenecks, four filters screen companies, and strict valuation guards prevent overpayment.
- Cross-validation requires dual-source verification for every candidate, eliminating reliance on single-point promotional data.
- Invocation occurs via
/bottleneck-hunterwith automatic resolution through the Codex wrapper atcodex-skills/bottleneck-hunter/SKILL.md. - Outputs persist to
reports/bottleneck-map/as standardized opportunity boards containing investment rankings and valuation signals.
Frequently Asked Questions
What defines a valid super-trend for the bottleneck-hunter skill?
According to the criteria table at L21–L27, valid trends must satisfy four dimensions: continuity (multi-year persistence), physicality (tangible resource impact), scale (market size > $10B), and acceleration (growth rate inflection). Trends lacking physical supply-chain implications fail at this initial gate.
How are bottleneck ratings (S, A, B) determined?
The scoring matrix at L18–L26 evaluates Layer 2–3 supply chain elements against concentration ratios, expansion cycle duration, substitutability indices, utilization rates, demand growth curves, and customer-validation lag. Red-yellow-green indicators translate to S-level (critical scarcity), A-level (significant friction), or B-level (moderate constraint) classifications.
What valuation guardrails automatically exclude companies?
The valuation filters at L77–L90 automatically exclude companies trading at PS ratios exceeding 30× when growth sits below 100%, or where market capitalization exceeds 20% of TAM. Additional flags trigger for insufficient margins or excessive leverage, ensuring the final shortlist contains only structurally sound candidates.
How does the skill integrate with different AI coding platforms?
The repository maintains a single source of truth in skills/bottleneck-hunter.md. For Codex users, codex-skills/bottleneck-hunter/SKILL.md acts as a pointer file that loads the canonical definition, while Claude Code users access the skill directly through the repository structure. Both paths converge on identical logic, ensuring consistent execution across environments.
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 →