Agent skill

Investment Thesis Drift Check

by xbtlin in xbtlin/ai-berkshire

Compares two dated research reports on one company to separate real factual change from price moves and rewording, then reports whether the investment thesis has drifted.

MITAuto-check passedBusiness, Finance & HR

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

Install Investment Thesis Drift Check

skills CLI
$ npx skills add xbtlin/ai-berkshire --skill thesis-drift -a claude-code

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

GitHub CLI
$ gh skill install xbtlin/ai-berkshire thesis-drift --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/thesis-drift .claude/skills/thesis-drift && 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
thesis-drift
GitHub stars
17k
Token cost
~1.5k tokens
SKILL.md length
436 words
Files
1
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Compares two dated research reports on one company to separate real factual change from price moves and rewording, then reports whether the investment thesis has drifted.

  • Works in 5 steps: 论文是否漂移? 未漂移 / 正向漂移 / 负向漂移 / 证据不足无法判断 → 漂移来自哪里? 估值 / 基本面 / 管理层 / 竞争格局 / 红线事件 → 是事实变化还是价格变化? 明确拆开说明 → …
  • Comparing an old and a new research report on the same company
  • SKILL.md covers Codex adapter note, 设计理念, 执行流程 and 模式A:指定报告对比, plus 3 more sections
  • Calls python3

What it does

The skill separates three kinds of change in a long-held position: facts that changed, such as revenue, margins, competition, management behavior or capital allocation; price changes from sentiment or valuation multiples; and wording changes where the evidence is the same. It recognizes drift only when the evidence changed. It depends on the structured output of a thesis tracker: a list of core assumptions, red lines, valuation anchors and a tracking log.

It works in three modes. Given two report paths, it compares those. Given only a company name, it looks for that company's thesis file in the reports folder along with earlier snapshots. With one report or none, it switches to a missing-baseline process, and if the reports cover different companies it stops and asks you to confirm. Evidence from both reports goes into one table, and dimensions it cannot extract are marked as impossible to judge rather than invented.

When your agent uses it

  • Comparing an old and a new research report on the same company
  • Deciding whether a stock's fall means the thesis changed
  • Auditing a history of thesis snapshots for real versus cosmetic changes
  • Preparing a periodic review of a long-term holding

Example prompts

  • “Compare my two Tencent thesis snapshots in reports/ and tell me if anything factual changed.”
  • “Check thesis drift for Nvidia using the latest saved snapshots.”
  • “Tell me whether the Moutai thesis really changed or only its wording.”

Requirements

  • Dated thesis report files, ideally produced by a thesis tracker

Workflow steps

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

  1. 论文是否漂移? 未漂移 / 正向漂移 / 负向漂移 / 证据不足无法判断
  2. 漂移来自哪里? 估值 / 基本面 / 管理层 / 竞争格局 / 红线事件
  3. 是事实变化还是价格变化? 明确拆开说明
  4. 建议动作如何迁移? 例如:Watch → Buy、Buy → Hold、Hold → Reduce、Reduce → Exit
  5. 下一步需要什么证据? 下一份财报 / 监管披露 / 管理层说明 / 竞对数据

What it can do on your machine

Read from SKILL.md and the folder at commit a221a20. 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

Investment Thesis Drift Check loads about 1.5k tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 436 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.5k

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 a221a20, republished under its MIT licence (© xbtlin). 436 words, ~1,500 tokens.

Download SKILL.mdSave it as .claude/skills/thesis-drift/SKILL.md (or your agent's skills folder).
name
thesis-drift
description
AI Berkshire skill: 投资论文漂移检测:分清事实变化与措辞变化. Source: skills/thesis-drift.md.

Codex adapter note

This skill is generated from skills/thesis-drift.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.

投资论文漂移检测:分清事实变化与措辞变化

对 $ARGUMENTS 执行投资论文漂移检测。

支持输入格式:

  • 公司名 旧报告路径 新报告路径 — 指定两份研究报告或论文快照进行对比
  • 公司名 reports/{公司名}-thesis-旧日期.md reports/{公司名}-thesis-新日期.md — 对比两份带日期的论文快照
  • 公司名 — 自动查找 reports/{公司名}-thesis.md 及同目录历史快照;如果没有基线则转入缺失基线处理

"当事实改变时,我就改变想法。你呢?" —— 凯恩斯

"股价波动不是论文漂移,事实变了才是。" —— AI Berkshire

设计理念

长期持仓最难的不是每天读新闻,而是区分三件事:

  • 事实改变:收入、利润率、竞争格局、管理层行为、资本配置发生可验证变化
  • 价格改变:市场情绪或估值倍数变化,但生意本身未变
  • 措辞改变:两份报告表达不同,但底层证据和判断没有变化

投资论文漂移检测的目标是:只在证据变化时承认论文变化。不能因为报告换了写法就制造漂移,也不能因为股价涨跌就误判基本面。

本 Skill 依赖 /thesis-tracker 输出的结构化维度:核心假设清单、红线清单、估值锚点、追踪记录表。没有这些结构时,先补齐基线,再做漂移检测。

执行流程

第一步:判断操作模式

解析 $ARGUMENTS:

  • 如果提供两份报告路径 → 进入指定报告对比模式
  • 如果只提供公司名 → 查找 reports/{公司名}-thesis.md 及历史快照,进入自动快照对比模式
  • 如果只找到一份报告或没有历史基线 → 进入缺失基线处理模式
  • 如果两份报告不是同一家公司 → 停止并要求用户确认,不做跨公司漂移判断

模式A:指定报告对比

A1:读取并校验两份报告

读取旧报告和新报告,提取:

  • 报告日期、公司名、股票代码
  • 核心论文(5句话)
  • 核心假设清单
  • 红线清单
  • 估值锚点
  • 追踪记录表
  • 管理层质量判断
  • 竞争护城河判断
  • 当前建议动作(买入 / 持有 / 观察 / 减仓 / 清仓)

如果报告缺少关键结构,先标注"结构缺失",但仍尽量从正文中抽取证据;抽取不到的维度标为"无法判断",不能编造结论。

A2:证据归一化

把两份报告中的事实证据整理成同一张表:

维度旧报告证据新报告证据数据来源是否可验证
估值锚点
核心假设
红线
管理层质量
竞争护城河

只比较证据,不比较文风。 如果新旧报告只是同义改写、排序变化、语气变化,但事实数据和判断阈值没有变化,判定为 Unchanged。

A3:数值与估值校验

所有数值变化必须使用 tools/financial_rigor.py 做精确计算,禁止 LLM 心算:

bash
python3 tools/financial_rigor.py verify-valuation \
  --price {当前价格} \
  --eps {EPS} \
  --bvps {每股净资产} \
  --fcf-per-share {每股自由现金流}

如需计算市值、百分比变化、目标价差异或情景估值,使用:

bash
python3 tools/financial_rigor.py verify-market-cap --price {价格} --shares {股本} --reported {报告市值} --currency {币种}
python3 tools/financial_rigor.py cross-validate --field {字段} --values '{JSON}' --unit {单位}
python3 tools/financial_rigor.py three-scenario --price {价格} --eps {EPS} --shares {股本亿} --growth {乐观} {中性} {悲观} --pe {乐观PE} {中性PE} {悲观PE}
python3 tools/financial_rigor.py calc --expr '{精确算式}'

关键财务数据必须至少两处独立来源交叉验证。来源不足、口径不一致、无法复核的数字必须标注为"低置信度 / 待核实"。

Show full SKILL.md (173 more words)Show less
A4:逐维度判定漂移

固定使用以下维度,不要临时增减:

维度判定重点ImprovedUnchangedWeakened
估值锚点内在价值、PE/PB/FCF Yield、安全边际、目标价区间安全边际扩大或内在价值上修且经工具验算估值区间和安全边际无实质变化安全边际收窄、内在价值下修或估值假设失效
核心假设清单收入增速、利润率、现金流、用户/订单/产能等可验证假设更多假设被新证据强化假设状态与证据基本一致假设边际弱化、受损或破裂
红线清单诚信、监管、业务衰退、竞争突破、管理层异常动作原有红线风险解除或显著下降未触发且风险水平不变红线被触发或触发概率上升
管理层质量诚信、资本配置、回购分红、执行力、股东友好度新行为提高信任度行为延续旧判断行为损害信任或资本配置变差
竞争护城河市占率、定价权、网络效应、成本优势、替代威胁护城河变宽或竞争优势被验证格局无实质变化护城河被削弱或竞对突破

每个维度只能给出三类结论:Improved / Unchanged / Weakened。

A5:证据驱动规则

每个非 Unchanged 的结论必须引用导致变化的具体新证据:

  • 财报行项目:例如收入增速、毛利率、经营现金流、回购金额、净现金
  • 监管披露:例如 10-K/20-F、年报、中报、港交所公告、SEC filing
  • 新闻事件:例如管理层变动、监管处罚、重大客户流失、竞品突破
  • 价格与估值:必须说明这是"估值变化"还是"基本面变化",不能混淆

如果找不到能解释变化的证据,必须判定为 Unchanged 或 无法判断,不能用措辞差异推断漂移。

A6:输出漂移报告
报告结构
一、对比对象与时间跨度
二、总体结论:论文是否漂移
三、维度漂移表
四、证据差异明细
五、估值与数值验算
六、建议动作迁移
七、不确定项与需补充来源
八、下次跟踪重点
维度漂移表
维度旧判断新判断漂移方向触发证据置信度
估值锚点Improved / Unchanged / Weakened高/中/低
核心假设清单Improved / Unchanged / Weakened高/中/低
红线清单Improved / Unchanged / Weakened高/中/低
管理层质量Improved / Unchanged / Weakened高/中/低
竞争护城河Improved / Unchanged / Weakened高/中/低

Unchanged 行的触发证据写 —,不要为了填表编造证据。

总体结论必须回答
  1. 论文是否漂移? 未漂移 / 正向漂移 / 负向漂移 / 证据不足无法判断
  2. 漂移来自哪里? 估值 / 基本面 / 管理层 / 竞争格局 / 红线事件
  3. 是事实变化还是价格变化? 明确拆开说明
  4. 建议动作如何迁移? 例如:Watch → Buy、Buy → Hold、Hold → Reduce、Reduce → Exit
  5. 下一步需要什么证据? 下一份财报 / 监管披露 / 管理层说明 / 竞对数据

模式B:自动快照对比

B1:查找快照

在 reports/ 中查找:

  • reports/{公司名}-thesis.md
  • reports/{公司名}-thesis-*.md
  • reports/{公司名}/ 目录下包含 thesis、论文、追踪 的报告

选择时间最早且结构完整的文件作为旧报告,时间最新的文件作为新报告。若用户指定日期,以用户指定为准。

B2:防止错误配对

对比前必须确认:

  • 公司名或股票代码一致
  • 报告日期不同
  • 两份报告都包含可抽取的论文结构或研究结论

如果无法确认同一公司,停止并要求用户提供明确路径。

B3:执行模式A

找到两份有效快照后,按模式A完整执行。


模式C:缺失基线处理

如果只找到一份报告或没有找到旧快照:

  1. 明确说明:缺少可比较的历史基线,不能执行漂移检测
  2. 不要根据记忆或市场印象补造旧论文
  3. 引导用户先使用 /thesis-tracker {公司名} 建立论文 建立结构化基线
  4. 如果当前报告已足够完整,可建议将它保存为 reports/{公司名}-thesis.md 作为未来漂移检测基线

输出格式:

无法执行论文漂移检测:缺少历史基线。

已找到:
- 当前报告:{路径 / 未找到}
- 历史基线:未找到

建议:
1. 先运行 /thesis-tracker {公司名} 建立论文
2. 下次有新财报或重大事件后,再运行 /thesis-drift {公司名} 旧报告 新报告

关键原则

  • 证据优先于措辞 — 同义改写不是漂移,只有事实证据变化才是漂移
  • 基本面优先于股价 — 股价涨跌只影响估值锚点,不自动改变生意质量
  • 数值必须验算 — 所有百分比、估值倍数、目标价差异必须用 tools/financial_rigor.py
  • 不确定就标注不确定 — 来源缺失、口径不一致、无法复核时,不要硬判
  • 红线单独处理 — 红线触发优先级高于估值便宜,不能被低 PE 掩盖
  • 输出必须可复盘 — 每个 Improved / Weakened 结论都要能追溯到具体证据

© 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/thesis-drift of xbtlin/ai-berkshire.

Open the folder on GitHubat commit a221a20

Compare with similar skills

Investment Thesis Drift Check 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.

Investment Thesis Drift Check compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Investment Thesis Drift Check this skillxbtlin/ai-berkshire17k—~1.5kAutomated 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.8k—~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 4 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.8k 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.

    270 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 yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    Auto-check passed

Questions about Investment Thesis Drift Check

What does Investment Thesis Drift Check do?

Compares two dated research reports on one company to separate real factual change from price moves and rewording, then reports whether the investment thesis has drifted. The skill separates three kinds of change in a long-held position: facts that changed, such as revenue, margins, competition, management behavior or capital allocation; price changes from sentiment or valuation multiples; and wording changes where the evidence is the same. It recognizes drift only when the evidence changed.

When should I use Investment Thesis Drift Check?

Investment Thesis Drift Check fits situations like: comparing an old and a new research report on the same company; deciding whether a stock's fall means the thesis changed; auditing a history of thesis snapshots for real versus cosmetic changes; preparing a periodic review of a long-term holding.

How do I install Investment Thesis Drift Check in Claude Code?

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

How do I install Investment Thesis Drift Check in Codex?

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

Can I use Investment Thesis Drift Check 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 thesis-drift -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/thesis-drift, .gemini/skills/thesis-drift, .github/skills/thesis-drift and .opencode/skills/thesis-drift in your project.

What does Investment Thesis Drift Check need to run?

Going by SKILL.md and its folder, Investment Thesis Drift Check needs the command-line tools its instructions call (python3). Our summary lists: Dated thesis report files, ideally produced by a thesis tracker.

Does Investment Thesis Drift Check 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 Investment Thesis Drift Check 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 Investment Thesis Drift Check use?

Investment Thesis Drift Check 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 Investment Thesis Drift Check use?

About 1.5k tokens (SKILL.md is roughly 6k 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 Investment Thesis Drift Check?

Skills that share tags, products or a category with Investment Thesis Drift Check: 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.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Investment Thesis Drift Check?

xbtlin (a GitHub user) maintains it in xbtlin/ai-berkshire, which has 16,664 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 8, 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.