How to Use the Quality-Screen Skill with Hard Indicators for Stock Filtering

The quality-screen skill in the xbtlin/ai-berkshire repository applies seven non-negotiable financial thresholds—ROE, free cash flow, interest coverage, margins, cash conversion, and equity dilution—to automatically exclude low-quality stocks from investment consideration.

The quality-screen skill is a built-in AI Berkshire workflow that automates rigorous Buffett-style quality criteria through hard-coded financial filters. Located in the skills/quality-screen.md specification, this tool evaluates companies against first-class quality standards to eliminate poor investments before deeper analysis begins.

The Seven Hard Indicators

The skill defines seven "hard" financial metrics in skills/quality-screen.md that serve as binary pass/fail gates. Any company failing a single metric is immediately excluded unless an exemption rule applies.

  • 10-year average ROE: Excludes companies below 8%, measuring capital efficiency and the ability to generate returns above the cost of equity.
  • 5-year cumulative free cash flow: Excludes negative values, distinguishing real cash generation from accounting earnings.
  • Interest-coverage ratio: Excludes ratios below 2× (EBIT ÷ Interest), assessing debt service capacity.
  • Long-term gross margin: Excludes margins below 15%, indicating pricing power and product differentiation.
  • Operating-cash-flow ÷ Net profit (5-year average): Excludes ratios below 0.7, verifying earnings quality and cash conversion.
  • Long-term net profit margin: Excludes margins below 5%, testing resilience against revenue fluctuations.
  • 5-year total equity dilution: Excludes dilution above 20% (excluding M&A), protecting shareholder interests from excessive share issuance.

How the Quality-Screen Skill Works

According to the implementation in codex-skills/quality-screen/SKILL.md, the workflow executes through three distinct stages:

Input Parsing

The skill determines the screening scope by parsing whether you provided a single ticker, an industry sector, an index constituent list, or a thematic universe.

Parallel Data Collection

A background agent retrieves required financial figures from company filings, broker research, and financial data platforms simultaneously.

Rule Evaluation

The system applies the "7+2" rule set—seven hard filters plus two exemption rules. Any failure on a hard metric triggers immediate exclusion unless an exemption applies (e.g., a strategic investment phase for a young, high-margin company). This design guarantees no false positives, preferring to miss potential winners rather than retain clear losers.

Invoking the Quality-Screen Command

The skill exposes a slash-command /quality-screen documented in README_EN.md. Provide comma-separated tickers for single-stock mode or natural-language phrases for batch screening:

/quality-screen 腾讯, 美团, 英伟达
/quality-screen 恒生指数成分股
/quality-screen 全球AI算力链
/quality-screen 中国啤酒行业

When processing indices or themes, the skill first searches for constituent lists (typically 10-30 top companies) then applies the hard-indicator filter to each.

Understanding the Output

The skill generates a markdown table showing for each ticker:

  • Pass (✅) or fail (❌) status per indicator
  • Numeric values used for the decision
  • A brief "Reason" column explaining exclusion triggers
  • Summary statistics including pass-rate and industry ranking

Example output for single-stock mode:

| 股票 | ROE (10 yr) | FCF 5yr | 利息覆盖 | 毛利率 | 运营/净利 | 净利率 | 股本膨胀 | 结论 |
|------|-------------|---------|----------|--------|-----------|--------|----------|------|
| 腾讯 | 12% ✅ | 45B ✅ | 3.8× ✅ | 43% ✅ | 1.2 ✅ | 25% ✅ | 7% ✅ | ✅ Pass |
| 美团 | 6% ❌ | 2B ✅ | 5.1× ✅ | 31% ✅ | 1.1 ✅ | 8% ✅ | 12% ✅ | ❌ Fail (ROE) |

The prompt wrapper in codex-prompts/quality-screen.md forwards requests to the skill engine, which returns the formatted results.

Summary

  • The quality-screen skill applies seven hard financial thresholds defined in skills/quality-screen.md to filter stocks.
  • Metrics include ROE (>8%), cumulative FCF (positive), interest coverage (>2×), gross margin (>15%), cash conversion (>0.7), net margin (>5%), and equity dilution (<20%).
  • The "7+2" rule set ensures non-negotiable exclusion unless exemption criteria apply, eliminating false positives.
  • Invoke via /quality-screen with tickers, indices, or thematic phrases.
  • Source files include skills/quality-screen.md, codex-skills/quality-screen/SKILL.md, and codex-prompts/quality-screen.md.

Frequently Asked Questions

What happens if a company fails only one hard indicator?

The company is immediately excluded from the pass list unless it qualifies for one of the two exemption rules. The quality-screen skill treats the seven hard indicators as non-negotiable gates according to the specification in skills/quality-screen.md.

Can I adjust the threshold values for the hard indicators?

No. The thresholds are hard-coded in the skill specification to maintain consistency with first-class quality standards. The design intentionally prevents customization to avoid diluting the screening criteria.

Where does the financial data come from?

The skill uses a parallel data collection process that aggregates figures from company filings, broker research, and financial data platforms. This happens automatically when you invoke the /quality-screen command.

How is the quality-screen skill different from other screening tools?

Unlike flexible screeners that allow partial matches, the AI Berkshire quality-screen skill implements a "7+2" rule set that prioritizes specificity over sensitivity. It guarantees no false positives by excluding any company that fails hard metrics, whereas traditional tools might rank companies on a sliding scale.

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 →