Agent skill

Financial Data Cross-Validation

by xbtlin in xbtlin/ai-berkshire

A research rule set for pulling company financials from prioritized sources by market and cross-checking every key figure against two independent sources.

MITAuto-check passedBusiness, Finance & HR

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

Install Financial Data Cross-Validation

skills CLI
$ npx skills add xbtlin/ai-berkshire --skill financial-data -a claude-code

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

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

At a glance

A research rule set for pulling company financials from prioritized sources by market and cross-checking every key figure against two independent sources.

  • Works in 5 steps: 货币单位是新台币(TWD),与港币/人民币/美元混排时必须显式标注,跨市场对比先统… → 月营收是台股独有优势:上市柜公司每月10日前强制披露上月营收,是跟踪基本面拐点最快… → FinMind… → …
  • Collecting financial statements for a US, Hong Kong, A-share or Taiwan stock
  • SKILL.md covers Codex adapter note, 数据源优先级, 执行规范 and 常见差异原因(不一定是数据错误), plus 3 more sections
  • Calls python3; needs FINMIND_TOKEN

What it does

The core rule is that every key figure must come from two independent sources, and a gap above 1% must be flagged. The skill lists primary, secondary and original-filing sources by market: for US stocks macrotrends and stockanalysis with SEC EDGAR filings, for Hong Kong stocks aastocks, macrotrends through ADR codes and HKEX filings, for A-shares East Money and CNINFO, and for Taiwan stocks FinMind through a bundled script, Goodinfo and MOPS.

A Codex adapter note says the skill is generated from a shared source so Claude Code and Codex users get one workflow. The agent runs the `date` command first and states the data cutoff date in the report header, uses exact arithmetic tools for valuation math and labels uncertainty and source gaps. Shared scripts such as `tools/financial_rigor.py` are run from the repository root. The excerpt is cut off inside the Taiwan section.

When your agent uses it

  • Collecting financial statements for a US, Hong Kong, A-share or Taiwan stock
  • Cross-checking revenue and profit figures from two sources
  • Stating a data cutoff date in an investment research report

Example prompts

  • “Pull the latest revenue and net income for a Hong Kong-listed company and cross-check it against two sources.”
  • “Collect Taiwan stock financials with the FinMind script and verify the market cap.”
  • “Flag any figures in this report that differ between sources by more than 1 percent.”

Requirements

  • Python 3 and the repository's `tools/` scripts such as `financial_rigor.py`
  • Web access to the listed data sources

Workflow steps

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

  1. 货币单位是新台币(TWD),与港币/人民币/美元混排时必须显式标注,跨市场对比先统一换算
  2. 月营收是台股独有优势:上市柜公司每月10日前强制披露上月营收,是跟踪基本面拐点最快的公开信号,earnings-review/thesis-tracker 类分析应优先利用(revenue 子命令)
  3. FinMind 损益表为单季值,工具已自动加总为年度值;不足4季的年份会标注"仅前N季累计"
  4. FinMind 未注册可直接用(有小时级限额)。注册后的 API token 只存本机、严禁提交到 git,工具按优先级自动读取:①环境变量 FINMIND_TOKEN;②本地文件 local/finmind_token.txt(local/ 已被 .gitignore…
  5. 交叉验证:FinMind 数值与 Goodinfo(或 macrotrends 上的 ADR,如 TSM)对照,误差规则同下;台积电等有 ADR 的公司注意 ADR 与台股原股的汇率/存托比率差异(1 TSM ADR = 5 股 2330)

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 these keys or tokens, usually read from environment variables:

    • FINMIND_TOKEN

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

Context cost

Financial Data Cross-Validation loads about 1.4k tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 402 words of instructions outside code blocks.

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

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). 402 words, ~1,405 tokens.

Download SKILL.mdSave it as .claude/skills/financial-data/SKILL.md (or your agent's skills folder).
name
financial-data
description
AI Berkshire skill: 财务数据获取与交叉验证规范. Source: skills/financial-data.md.

Codex adapter note

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

财务数据获取与交叉验证规范

本规范适用于所有涉及企业财务数据的研究。每个关键数据必须来自两个独立来源,误差>1%须标记。


数据源优先级

美股(PDD、腾讯ADR、网易ADR等)
优先级来源URL获取方式
1(主)macrotrendsmacrotrends.net/stocks/charts/{ticker}直接访问,无需注册
2(副)stockanalysisstockanalysis.com/stocks/{ticker}/financials直接访问,无需注册
原始一手SEC EDGARsec.gov/cgi-bin/browse-edgar10-K / 10-Q 原文
港股(腾讯0700、网易9999、美团3690等)
优先级来源URL获取方式
1(主)aastocksaastocks.com/tc/stocks/analysis/company-fundamental直接访问
2(副)macrotrends(ADR代码)腾讯用TCEHY,网易用NTES直接访问
原始一手HKEX披露易hkexnews.hk年报PDF
A股(三七互娱、吉比特等)
优先级来源URL获取方式
1(主)东方财富eastmoney.com → 搜股票代码 → 财务报表直接访问
2(副)巨潮资讯cninfo.com.cn原始年报/季报PDF
Show full SKILL.md (172 more words)Show less
台股(台积电2330、联发科2454、大立光3008等)
优先级来源URL获取方式
1(主)FinMind APIapi.finmindtrade.comtools/twstock_data.py(零依赖脚本,见下)
2(副)Goodinfo台湾股市资讯网goodinfo.tw/tw/StockDetail.asp?STOCK_ID={代码}直接访问
原始一手公开资讯观测站(MOPS)mops.twse.com.tw财报原文/月营收公告

FinMind 取数工具(分析台股时优先调用,输出自带市值验算):

bash
python3 tools/twstock_data.py quote 2330        # 最新行情 + PER/PBR/殖利率 + 市值验算
python3 tools/twstock_data.py valuation 2330    # 估值指标 + PER一年区间 + 52周高低
python3 tools/twstock_data.py financials 2330   # 近5年年度核心财务(营收/毛利率/归母净利/EPS/ROE)
python3 tools/twstock_data.py revenue 2330      # 近13个月月营收及同比
python3 tools/twstock_data.py dividend 2330     # 近年股利政策(现金/股票股利、除息日)
python3 tools/twstock_data.py search 台積        # 搜索股票代码(注意台股名称为繁体)

台股特别注意:

  1. 货币单位是新台币(TWD),与港币/人民币/美元混排时必须显式标注,跨市场对比先统一换算
  2. 月营收是台股独有优势:上市柜公司每月10日前强制披露上月营收,是跟踪基本面拐点最快的公开信号,earnings-review/thesis-tracker 类分析应优先利用(revenue 子命令)
  3. FinMind 损益表为单季值,工具已自动加总为年度值;不足4季的年份会标注"仅前N季累计"
  4. FinMind 未注册可直接用(有小时级限额)。注册后的 API token 只存本机、严禁提交到 git,工具按优先级自动读取:①环境变量 FINMIND_TOKEN;②本地文件 local/finmind_token.txt(local/ 已被 .gitignore 永久排除,把 token 单独一行写入该文件即可)。token 不得出现在报告、skill、commit 中
  5. 交叉验证:FinMind 数值与 Goodinfo(或 macrotrends 上的 ADR,如 TSM)对照,误差规则同下;台积电等有 ADR 的公司注意 ADR 与台股原股的汇率/存托比率差异(1 TSM ADR = 5 股 2330)

执行规范

第一步:获取数据

对每个财务指标(收入、净利润、毛利率、经营现金流、资产负债率等),分别从来源1和来源2取数。

第二步:误差计算与标记
误差率 = |来源1数值 - 来源2数值| / 来源1数值 × 100%
误差处理方式
≤ 1%✅ 一致,取来源1数值,标注两个来源
1% ~ 5%⚠️ 标记"数据存在差异",注明两个数值,说明可能原因(汇率/会计口径)
> 5%❌ 标记"数据存在重大差异",必须查原始财报核实,不得直接使用
第三步:数据呈现格式

每个关键数据必须按以下格式标注:

收入:1,239亿元 ✅
  - macrotrends: 1,241亿元
  - stockanalysis: 1,237亿元
  - 误差: 0.3%

差异示例:

净利润:245亿元 ⚠️ 数据存在差异
  - macrotrends: 245亿元(GAAP)
  - stockanalysis: 278亿元(Non-GAAP)
  - 误差: 13.5% — 原因:会计口径不同(GAAP vs Non-GAAP)

常见差异原因(不一定是数据错误)

原因说明
GAAP vs Non-GAAP最常见,尤其是利润类数据
汇率换算港币/人民币/美元换算时间点不同
财年定义自然年 vs 财年(如苹果财年10月结束)
合并口径是否含少数股东权益
数据更新滞后某平台尚未更新最新一期财报

特别规则

  1. 未上市公司(米哈游、莉莉丝等):只有一手数据来源时,数据前标记 [估计],不执行交叉验证
  2. 季度数据 vs 年度数据:优先使用年度数据做交叉验证,季度数据部分来源可能有滞后
  3. 原始财报优先:若两个来源均与原始财报(10-K/年报PDF)不符,以原始财报为准,标记来源错误

股价与复权(历史序列必读)

价格有三种口径,混用会让历史股价位置、长期涨幅、历史估值分位全部失真:

口径含义用途
不复权实际成交价,除权除息日跳空仅用于"当前时点"快照
前复权以最新价为基准回调历史价历史股价对比、N年涨幅、历史PE band 一律用它
后复权以上市首日为基准前推计算历史总回报/年化收益

规则:

  1. 涉及历史价格的分析统一用前复权,且同一分析内不得混用复权与不复权来源。
  2. 当前市值/当前PE 用当前实际股价 × 当前总股本即可,与复权无关——复权只影响历史序列。
  3. 跨越拆股/大比例送转的每股指标(历史EPS、历史股价),必须复权还原后再同比。
  4. 总回报/年化收益需计入分红(后复权已含),只看价格涨幅会低估。
  5. 增发/回购后市值验算以最新总股本为准(financial_rigor.py verify-market-cap 偏差>5% 会提示核对)。

快速索引

场景主要来源备用来源
PDD / 拼多多macrotrends.net/stocks/charts/PDDstockanalysis.com/stocks/pdd
腾讯macrotrends.net/stocks/charts/TCEHYaastocks(0700.HK)
网易macrotrends.net/stocks/charts/NTESaastocks(9999.HK)
三七互娱eastmoney.com(002555)cninfo.com.cn
吉比特eastmoney.com(603444)cninfo.com.cn
Nintendomacrotrends.net/stocks/charts/NTDOYstockanalysis.com/stocks/ntdoy
Capcommacrotrends(CCOEY)stockanalysis(CCOEY)
台积电tools/twstock_data.py(2330)goodinfo.tw / macrotrends(TSM,注意1 ADR=5股)
联发科tools/twstock_data.py(2454)goodinfo.tw

© 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/financial-data of xbtlin/ai-berkshire.

Open the folder on GitHubat commit efa220f

Compare with similar skills

Financial Data Cross-Validation 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.

Financial Data Cross-Validation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Financial Data Cross-Validation this skillxbtlin/ai-berkshire17k—~1.4kAutomated safety check: PassMIT
Eastmoney Market DataHKUDS/Vibe-Trading35k—~1kAutomated safety check: PassMIT
SEC EDGAR Filings FetcherHKUDS/Vibe-Trading35k—~1.4kAutomated safety check: PassMIT
Financial Researchfirecrawl/web-agent1.2k—~1.1kAutomated safety check: PassMIT
US Market Data ToolkitGeeksfino/finskills283—~1.2kAutomated safety check: PassApache-2.0
Financial Statement Deep DiveGeeksfino/finskills283—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • 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
  • 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
  • Financial Research

    firecrawl/web-agent

    Pulls a public company's latest 10-K or 10-Q figures and analyst consensus from SEC EDGAR and Yahoo Finance, then cross-checks the two sources.

    1.2k GitHub stars~1.1k tokensUpdated 5 mo ago
    Business, Finance & HRAuto-check passed
  • US Market Data Toolkit

    Geeksfino/finskills

    Free Python scripts that fetch US stock data, SEC filings, insider trades and macro indicators, and run financial score calculators and portfolio analytics.

    283 GitHub stars~1.2k tokensUpdated 7 mo ago
    Business, Finance & HRAuto-check passed
  • Runs a forensic review of one company's financial statements covering DuPont profitability, earnings quality, financial health scores and fraud-risk signals.

    283 GitHub stars~1.8k tokensUpdated 7 mo ago
    Business, Finance & HRAuto-check passed
  • SEC EDGAR Filing Analysis

    HKUDS/Vibe-Trading

    Interprets US company filings from SEC EDGAR (10-K, 10-Q, 8-K, proxy statements, Form 4) to pull out financials, risk factors and investment signals.

    35k GitHub stars~3.1k tokensUpdated today
    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
  • Income Investment Analysis

    xbtlin/ai-berkshire

    Assesses whether a company's distributions are durable enough to earn a place in an income portfolio, starting from a ticker or company name.

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

Works with

Questions about Financial Data Cross-Validation

What does Financial Data Cross-Validation do?

A research rule set for pulling company financials from prioritized sources by market and cross-checking every key figure against two independent sources. The core rule is that every key figure must come from two independent sources, and a gap above 1% must be flagged. The skill lists primary, secondary and original-filing sources by market: for US stocks macrotrends and stockanalysis with SEC EDGAR filings, for Hong Kong stocks aastocks, macrotrends through ADR codes and HKEX filings, for A-shares East Money and CNINFO, and for Taiwan stocks FinMind through a bundled script, Goodinfo and MOPS.

When should I use Financial Data Cross-Validation?

Financial Data Cross-Validation fits situations like: collecting financial statements for a US, Hong Kong, A-share or Taiwan stock; cross-checking revenue and profit figures from two sources; stating a data cutoff date in an investment research report.

How do I install Financial Data Cross-Validation in Claude Code?

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

How do I install Financial Data Cross-Validation in Codex?

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

Can I use Financial Data Cross-Validation 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 financial-data -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/financial-data, .gemini/skills/financial-data, .github/skills/financial-data and .opencode/skills/financial-data in your project.

What does Financial Data Cross-Validation need to run?

Going by SKILL.md and its folder, Financial Data Cross-Validation needs the command-line tools its instructions call (python3) and credentials named FINMIND_TOKEN. Our summary lists: Python 3 and the repository's `tools/` scripts such as `financial_rigor.py`; Web access to the listed data sources.

Does Financial Data Cross-Validation 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 Financial Data Cross-Validation 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 Financial Data Cross-Validation use?

Financial Data Cross-Validation 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 Financial Data Cross-Validation use?

About 1.4k tokens (SKILL.md is roughly 5.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 Financial Data Cross-Validation?

Skills that share tags, products or a category with Financial Data Cross-Validation: Eastmoney Market Data (HKUDS/Vibe-Trading, 35k stars), SEC EDGAR Filings Fetcher (HKUDS/Vibe-Trading, 35k stars), Financial Research (firecrawl/web-agent, 1.2k stars) and US Market Data Toolkit (Geeksfino/finskills, 283 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Financial Data Cross-Validation?

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.