Agent skill

Quality Screen

by xbtlin in xbtlin/ai-berkshire

Screens companies against seven hard financial tests and exemption rules to rule out clearly non-top-tier businesses, for single stocks, industries or indexes.

MITAuto-check passedBusiness, Finance & HR

SKILL.md written in Chinese; this summary is our English description.

Install Quality Screen

skills CLI
$ npx skills add xbtlin/ai-berkshire --skill quality-screen -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install xbtlin/ai-berkshire quality-screen --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/xbtlin/ai-berkshire.git skills-src && mkdir -p .claude/skills && cp -r skills-src/codex-skills/quality-screen .claude/skills/quality-screen && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
quality-screen
GitHub stars
17k
Token cost
~1.2k tokens
SKILL.md length
339 words
Files
1
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Screens companies against seven hard financial tests and exemption rules to rule out clearly non-top-tier businesses, for single stocks, industries or indexes.

  • Works in 3 steps: 上市不足10年 → 毛利率 > 30%(证明商业模式本身有定价权) → 最近2年经营现金流为正(证明造血能力已具备)
  • Quickly eliminating weak companies from a long stock list
  • SKILL.md covers Codex adapter note, 设计原则, 7条去劣指标 and 3条豁免规则, plus 3 more sections
  • Calls python3

What it does

The skill filters companies against seven exclusion metrics: ten-year average ROE below 8 percent, negative five-year cumulative free cash flow, interest coverage under 2x, long-run gross margin under 15 percent, operating cash flow to net profit under 0.7, long-run net margin under 5 percent, and share count growth above 20 percent over five years that did not come from acquisitions. Banks and insurers are excluded from the interest coverage test.

Exemption rules protect high-quality companies that miss a metric for strategic reasons: an investment-phase exemption for ROE, a deliberately low margin exemption for net margin, and a high-turnover thin-margin exemption for gross and net margin. Input can be individual stocks, an industry, an index or a theme; for the last three the agent first finds the companies, screens each one and adds pass rates and rankings. The stated aim is never to wrongly exclude a good company, accepting that some weak ones slip through.

When your agent uses it

  • Quickly eliminating weak companies from a long stock list
  • Screening the listed companies in one industry for quality
  • Screening the constituents of an index
  • Checking whether a low ROE or margin is a justified exception

Example prompts

  • “Run the quality screen on Tencent, Meituan and Nvidia.”
  • “Screen the Chinese beer industry and rank the companies that pass.”
  • “Screen the Hang Seng Index constituents and report the pass rate.”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 上市不足10年
  2. 毛利率 > 30%(证明商业模式本身有定价权)
  3. 最近2年经营现金流为正(证明造血能力已具备)

What it can do on your machine

Read from SKILL.md and the folder at commit efa220f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Quality Screen loads about 1.2k tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 339 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~22
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from xbtlin/ai-berkshire at commit efa220f, republished under its MIT licence (© xbtlin). 339 words, ~1,177 tokens.

Download SKILL.mdSave it as .claude/skills/quality-screen/SKILL.md (or your agent's skills folder).
name
quality-screen
description
AI Berkshire skill: 去劣筛选:7条指标快速排除非一流公司. Source: skills/quality-screen.md.

Codex adapter note

This skill is generated from skills/quality-screen.md so Claude Code and Codex users share one canonical workflow.

  • Treat $ARGUMENTS as the user's request in the current Codex thread.
  • When the source mentions Claude-only surfaces such as Task, Agent, WebSearch, Bash, Read, or Write, use the closest Codex capability available in this session: subagents when available, web search when needed, shell commands for local tools, and normal file edits for workspace files.
  • Use shared project tools from tools/ in this repository. Prefer running commands from the repository root with paths like python3 tools/financial_rigor.py ...; if the current thread starts outside the repo, locate the actual checkout path first instead of assuming a fixed home-directory path.
  • Before starting research, run the date command to confirm today's date; treat it as the baseline for "latest" data and state the data cutoff date in the report header. Never assume the current date from training data.
  • Preserve the research quality rules from AGENTS.md: cross-check financial data, use exact arithmetic tools for valuation/math, and clearly label uncertainty and source gaps.

去劣筛选:7条指标快速排除非一流公司

对 $ARGUMENTS 执行去劣指标筛选,快速排除不符合一流公司标准的标的。

支持输入格式:

输入方式示例说明
个股腾讯, 美团, 英伟达逐家筛选
行业中国啤酒行业 全球云计算 港股运动品牌先搜索该行业主要上市公司(10-20家),再逐家筛选
市场/指数恒生指数成分股 沪深300 纳斯达克100拉取成分股列表,逐家筛选
主题中国高股息50强 全球AI算力链先搜索主题相关公司,再逐家筛选

行业/市场/主题模式下,输出额外包含:通过率统计、行业内排名、板块对比总结。

设计原则

  • 目标:不错杀任何一流好公司,但能排除确定的非一流公司
  • 逻辑:7条硬指标 + 2条豁免规则,宁可漏网不可误杀
  • 适用范围:所有上市公司(银行/保险不适用第3条利息覆盖倍数)

7条去劣指标

#指标排除条件衡量的是什么
110年平均ROE< 8%资本效率——股东的钱能不能跑赢机会成本
25年累计自由现金流为负真金白银——利润是不是"纸面富贵"
3利息覆盖倍数(EBIT/利息)< 2倍偿债安全——还利息的能力
4长期毛利率< 15%定价权——产品/服务有没有差异化
5经营现金流 / 净利润(5年均值)< 0.7利润质量——赚到的利润能不能收回现金
6长期净利率< 5%抗风险能力——收入波动时利润是否归零
75年总股本膨胀> 20%(非并购原因)股东利益——管理层是否在稀释你的权益

3条豁免规则

豁免A:战略投入期豁免(适用于第1条)

如果同时满足以下3个条件,可豁免第1条ROE不达标:

  1. 上市不足10年
  2. 毛利率 > 30%(证明商业模式本身有定价权)
  3. 最近2年经营现金流为正(证明造血能力已具备)

逻辑:高毛利率+现金流转正说明商业模式没问题,ROE低只是因为还在投入期。典型案例:美团。

豁免B:主动低利润率豁免(适用于第6条)

如果同时满足以下2个条件,可豁免第6条净利率不达标:

  1. 毛利率 > 30%(有能力赚但选择不赚)
  2. 近2年净利率已回升至5%以上,或呈明确上升趋势

逻辑:毛利率高说明有定价权,净利率低是战略选择(再投资)而非能力缺失。典型案例:亚马逊。

豁免C:高周转薄利模式豁免(适用于第4条和第6条)

如果同时满足以下3个条件,可豁免第4条毛利率和第6条净利率不达标:

  1. ROE > 20%(证明虽然利润率低,但资本回报率极高)
  2. 经营现金流/净利润 > 1.0(利润质量无问题)
  3. 商业模式属于"会员制/平台佣金/高周转薄利"类型(利润不体现在商品加价上)

逻辑:有些一流公司的利润不藏在毛利率里,而是藏在会员费、周转效率或平台抽成中。它们的毛利率和净利率天然很低,但ROE极高说明资本效率一流。典型案例:Costco(毛利率12%、净利率2.5%,但ROE 25%+、会员续费率90%+)。


执行流程

第一步:解析输入,确定筛选范围

模式判断:

  • 如果输入是具体公司名/代码 → 个股模式,直接进入第二步
  • 如果输入是行业/市场/主题 → 批量模式,先执行以下操作:
    1. 用 WebSearch 搜索该行业/市场/主题下的主要上市公司
    2. 行业模式:覆盖该行业市值前15-20家上市公司
    3. 指数模式:拉取完整成分股列表
    4. 主题模式:搜索相关公司,覆盖15-30家
    5. 列出完整公司清单供确认(如公司数>30,分批并行处理)

对每家公司确定全称、代码、交易所。

第二步:并行数据收集

为每家公司启动独立后台Agent,使用 WebSearch 搜索以下数据:

  1. ROE:近10年(或上市以来)的逐年ROE,计算平均值
  2. 自由现金流:近5年的经营现金流和资本开支,计算5年累计FCF
  3. 利息覆盖:最新年度EBIT和利息支出,计算倍数
  4. 毛利率:近5年毛利率趋势
  5. 经营现金流/净利润:近5年的比值,计算均值
  6. 净利率:近10年净利率趋势,计算均值
  7. 总股本变化:5年前和当前的总股本,计算膨胀比例

数据来源优先级:公司年报 > 券商研报 > 财经数据平台

第三步:逐条检验

对每家公司,逐条检验7个指标:

  • ✅ 通过
  • ❌ 未通过
  • ⚠️ 边界(附数值说明)

如果触犯某条,检查是否满足对应豁免条件。

第四步:输出结果
输出格式
markdown
# 去劣筛选结果

**筛选日期**:{当天日期}
**公司数量**:{N}家

## 汇总表

| 公司 | ①ROE | ②FCF | ③利息覆盖 | ④毛利率 | ⑤OCF/NI | ⑥净利率 | ⑦稀释 | 结果 |
|------|------|------|----------|---------|---------|---------|-------|------|
| xxx | ✅ 24% | ✅ | ✅ | ✅ 56% | ✅ | ✅ 30% | ✅ | **通过** |
| yyy | ❌ 3% | ❌ | ❌ | ✅ 20% | ✅ | ❌ 2% | ✅ | **排除** |
| zzz | ⚠️→✅ | ✅ | ✅ | ✅ 35% | ✅ | ⚠️→✅ | ✅ | **豁免通过** |

## 通过的公司(N家)
[列表]

## 排除的公司(N家)
| 公司 | 触犯指标 | 具体数据 | 排除理由 |
|------|---------|---------|---------|

## 豁免通过的公司(N家)
| 公司 | 豁免条款 | 具体数据 | 豁免理由 |
|------|---------|---------|---------|

## 边界争议(如有)
[对处于阈值附近的公司做补充说明]

## 板块总结(行业/市场模式专用)

**通过率**:{通过数}/{总数} = {百分比}
**行业质量判断**:[根据通过率给出行业整体质量评价]

| 质量分层 | 公司 | 共同特征 |
|---------|------|---------|
| 一流(全过+高ROE) | xxx, yyy | ... |
| 合格(全过但指标平庸) | aaa, bbb | ... |
| 淘汰 | ccc, ddd | ... |

**行业选股结论**:[一句话总结该行业值不值得深挖,最值得关注的2-3家是谁]

注意事项

  1. 银行/保险:不适用第3条(利息覆盖),其商业模式本质就是利差经营
  2. REIT:ROE可能因物业重估波动大,用"核心营运利润ROE"代替
  3. 数据不足:如果某项数据无法获取,标注为"数据不足"而非直接判定通过/不通过
  4. 周期性行业:用完整周期(至少覆盖一个高点和一个低点)的平均值,不用单一年份
  5. 上市时间短:不足5年的公司用全部可得数据,但在结果中标注"数据窗口不足"

局限性声明

这套指标能排除"确定不好"的公司,但通过筛选不等于"确定好"。通过的公司仍需进一步研究:

  • 商业模式是否可持续
  • 管理层是否值得信赖
  • 当前估值是否合理
  • 竞争格局是否在恶化

去劣是第一步,不是最后一步。

© xbtlin, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in codex-skills/quality-screen of xbtlin/ai-berkshire.

Open the folder on GitHubat commit efa220f

Compare with similar skills

Quality Screen next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Quality Screen compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Quality Screen this skillxbtlin/ai-berkshire17k—~1.2kAutomated safety check: PassMIT
AI-Trader Market IntelHKUDS/AI-Trader23k—~1.1kAutomated safety check: PassNone
Eastmoney Market DataHKUDS/Vibe-Trading35k—~1kAutomated safety check: PassMIT
Stock Deep Analysis Workflowwbh604/UZI-Skill7.1k—~9.1kAutomated safety check: NotesMIT
Zhengxi Fund Manager Views Librarylyra81604/zhengxi-views1.7k—~1.6kAutomated safety check: PassMIT
SEC EDGAR Filings FetcherHKUDS/Vibe-Trading35k—~1.4kAutomated safety check: PassMIT

Similar skills

  • AI-Trader Market Intel

    HKUDS/AI-Trader

    Reads AI-Trader's read-only market snapshots, grouped financial news and events board through its market-intel endpoints, for context before trading or posting.

    23k GitHub stars~1.1k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed
  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Runs a staged deep analysis of a single stock on China A-share, Hong Kong and US markets, ending in an HTML report with valuation models and investor-panel scores.

    7.1k GitHub stars~9.1k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check: notes
  • Zhengxi Fund Manager Views Library

    lyra81604/zhengxi-views

    Answers questions with sourced quotes from one Chinese fund manager's public writings, applies his stated investment method and compares his words with real fund holdings.

    1.7k GitHub stars~1.6k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • SEC EDGAR Filings Fetcher

    HKUDS/Vibe-Trading

    Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.

    35k GitHub stars~1.4k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Longbridge Earnings

    helsome/folio

    Earnings analysis — pre- and post-earnings. An agent skill from helsome/folio.

    269 GitHub starsUsed in 1 repo~2.5k tokens
    Business, Finance & HRAuto-check passed

More from xbtlin/ai-berkshire

All 22 skills in this repo
  • Scans a long-running industry trend for supply chain chokepoints, aiming to find second- and third-layer suppliers that the market has not yet priced in.

    17k GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Deep Company Article Series

    xbtlin/ai-berkshire

    Plans and writes a three-to-eight-part long-form article series that breaks down one company, built on fact-checked financials, valuation and management analysis.

    17k GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Earnings Report Deep Reading

    xbtlin/ai-berkshire

    Reads a company's filings and earnings call material in depth, rates how complete the sources are and extracts the key figures into a structured review.

    17k GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • Runs four parallel analyst personas over one earnings report, then an editor and reader-review pass turn the findings into a publishable article.

    17k GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check passed
  • A four-step research framework for finding and tracking high-growth core companies in one industry: map the sector, ask core questions, verify, then hold to the turning point.

    17k GitHub stars~974 tokensUpdated 2 days ago
    Auto-check passed
  • A research rule set for pulling company financials from prioritized sources by market and cross-checking every key figure against two independent sources.

    17k GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed

Questions about Quality Screen

What does Quality Screen do?

Screens companies against seven hard financial tests and exemption rules to rule out clearly non-top-tier businesses, for single stocks, industries or indexes. 7, long-run net margin under 5 percent, and share count growth above 20 percent over five years that did not come from acquisitions. Banks and insurers are excluded from the interest coverage test.

When should I use Quality Screen?

Quality Screen fits situations like: quickly eliminating weak companies from a long stock list; screening the listed companies in one industry for quality; screening the constituents of an index; checking whether a low ROE or margin is a justified exception.

How do I install Quality Screen in Claude Code?

Run `npx skills add xbtlin/ai-berkshire --skill quality-screen -a claude-code`. Or copy the skill folder (codex-skills/quality-screen in xbtlin/ai-berkshire) into .claude/skills/quality-screen in your project. Claude Code loads it when a task matches its description.

How do I install Quality Screen in Codex?

Run `npx skills add xbtlin/ai-berkshire --skill quality-screen -a codex`. Or copy the skill folder (codex-skills/quality-screen in xbtlin/ai-berkshire) into .agents/skills/quality-screen in your project. Codex loads it when a task matches its description.

Can I use Quality Screen in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xbtlin/ai-berkshire --skill quality-screen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/quality-screen, .gemini/skills/quality-screen, .github/skills/quality-screen and .opencode/skills/quality-screen in your project.

What does Quality Screen need to run?

Going by SKILL.md and its folder, Quality Screen needs the command-line tools its instructions call (python3).

Does Quality Screen access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Quality Screen safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Quality Screen use?

Quality Screen is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Quality Screen use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Quality Screen?

Skills that share tags, products or a category with Quality Screen: AI-Trader Market Intel (HKUDS/AI-Trader, 23k stars), Eastmoney Market Data (HKUDS/Vibe-Trading, 35k stars), Stock Deep Analysis Workflow (wbh604/UZI-Skill, 7.1k stars) and Zhengxi Fund Manager Views Library (lyra81604/zhengxi-views, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Quality Screen?

xbtlin (a GitHub user) maintains it in xbtlin/ai-berkshire, which has 16,652 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 6, 2026.

Source: xbtlin/ai-berkshire on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.