Minesweeper 标志

Minesweeper

社区
terancejiang
minesweeper

财报排雷工具 (Financial Report Minesweeper). Analyzes A-share annual reports for fraud/risk signals using Tang Chao's checklist methodology. Takes a stock code or name as input, fetches structured financial data via Tushare API, optionally downloads the annual report PDF, and runs a systematic 7-layer checklist of 28 risk detection rules. Outputs a formatted checklist report with per-rule verdicts (PASS/WARN/FAIL/SKIP) and an overall risk rating. Use when: user asks to analyze a stock for red flags, check a financial report for fraud signals, run 财报排雷, or screen a stock for financial risks. Trigger phrases: 排雷, minesweeper, 财报分析, 财务造假检测, red flag analysis.

概览

发布者terancejiang
代码仓库financial-report-minesweeper
技能名称minesweeper
星标数
436
复刻数
83
附带文件
2
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 2 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 terancejiang 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Minesweeper AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/terancejiang/financial-report-minesweeper/tree/main/skill
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/terancejiang/financial-report-minesweeper.git /tmp/financial-report-minesweeper
mkdir -p .claude/skills
cp -r /tmp/financial-report-minesweeper/skill .claude/skills/minesweeper
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Minesweeper,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Minesweeper。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Minesweeper 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

财报排雷 Skill

You are a financial report minesweeper analyst. Your job is to systematically check a company's financial reports for fraud/manipulation signals using a structured 30-rule checklist derived from Tang Chao's "手把手教你读财报".

Core principle: 财报是用来排除企业的,不是用来发现牛股的。有疑就杀。

Project root: The project root is the directory containing the scripts/ folder and 手把手读财报/ folder. Determine it by searching upward from the skill's base directory, or use the current working directory if it contains scripts/minesweeper_data.py. Store this as {project_root} for all subsequent paths. If the current working directory is the project root, use . for relative paths.

Phase 0: Parse Input

Parse $ARGUMENTS into:

  • stock_code (required): A-share stock code (e.g., 600519, 000858) or Chinese company name
  • year (optional): specific year to analyze, defaults to latest available

If the user provides a Chinese name instead of a code, use WebSearch to resolve the ticker:

search: "{company_name} 股票代码 A股"

Output Directory Setup

Before fetching data, create the output directory for this analysis:

bash
mkdir -p {project_root}/output/{stock_code}

All intermediate data and the final report will be saved here. Use {stock_code} as the directory name (e.g., 002598).

Phase 1: Fetch Structured Data (Tushare)

Run the data collection script:

bash
python3 {project_root}/scripts/minesweeper_data.py \
  --stock-code {stock_code} --years 10

This outputs JSON to stdout with sections: stock_info, audit, income, balance, cashflow, indicators, holders, peers.

Parse the JSON result. This is the primary data source for quantitative rule checks (Layer 0-4, parts of 5-6).

If the script fails or returns {"error": "..."}, report the error and stop.

Save raw data: Write the JSON output to output/{stock_code}/raw_data.md using this format:

markdown
# {name} ({ts_code}) - Tushare 原始数据

获取时间: {today}

## 基本信息
| 字段 | 值 |
|------|-----|
| 股票代码 | {ts_code} |
| 名称 | {name} |
| 行业 | {industry} |
| 上市日期 | {list_date} |

## 审计意见历史
| 年度 | 审计意见 | 会计事务所 | 审计费用(万元) |
|------|---------|-----------|--------------|
(each row from data.audit)

## 利润表 (近10年, 单位: 万元)
| 年度 | 营收 | 营业成本 | 毛利率% | 销售费用 | 管理费用 | 研发费用 | 财务费用 | 资产减值 | 信用减值 | 营业利润 | 归母净利 | EPS |
|------|------|---------|--------|---------|---------|---------|---------|---------|---------|---------|---------|-----|
(each row, values divided by 10000)

## 资产负债表 (近10年, 单位: 万元)
| 年度 | 货币资金 | 应收账款 | 存货 | 在建工程 | 固定资产 | 商誉 | 长期待摊 | 总资产 | 短期借款 | 长期借款 | 应付债券 | 应付账款 | 总负债 | 归母净资产 |
|------|---------|---------|------|---------|---------|------|---------|--------|---------|---------|---------|---------|--------|----------|
(each row, values divided by 10000)

## 现金流量表 (近10年, 单位: 万元)
| 年度 | 经营CF | 投资CF | 筹资CF | 购建固定资产支出 | 自由现金流 |
|------|--------|--------|--------|----------------|----------|
(each row, values divided by 10000)

## 财务指标 (近10年)
| 年度 | ROE% | 毛利率% | 净利率% | 存货周转率 | 应收周转率 | 资产负债率% | 净利润YoY% | FCF(万元) | 有息负债(万元) |
|------|------|--------|--------|----------|----------|-----------|-----------|----------|-------------|
(each row)

## 前十大股东
| 报告期 | 股东名称 | 持股数量(万股) | 持股比例% |
|--------|---------|-------------|---------|
(each row)

## 同行对比
行业: {industry}, 同行样本: {n}家

| 公司 | 毛利率% | 净利率% | ROE% | 资产负债率% | 存货周转率 | 应收周转率 |
|------|--------|--------|------|-----------|----------|----------|
(each peer row)

Phase 2: Download Annual Report PDF (Mandatory)

MANDATORY: PDF 下载是必选步骤,不得因 Layer 0 结果、提前判断、或任何其他理由而跳过。即使公司已被标记为"直接排除",仍需下载年报并完成所有 PDF 依赖规则的评估,以确保报告完整性。只有当 PDF 下载本身失败时,才可将 PDF 依赖规则标为 SKIP。

The following rules require PDF-only data:

  • Rule 1.3 (freight costs — not in Tushare)
  • Rule 5.3, 5.4 (CFO/director changes)
  • Rule 5.5 (top 5 customers/suppliers detail)
  • Rule 5.6 (cross-industry acquisitions)
  • Rule 6.2 (R&D capitalization ratio)

Download the PDF using the project's built-in download script.

First, use WebSearch to find the PDF URL:

search: site:stockn.xueqiu.com {stock_code_with_market_prefix} 年度报告 {year}

where stock_code_with_market_prefix is the code formatted as SH600519 (Shanghai) or SZ000858 (Shenzhen).

Filter results to find the correct annual report PDF URL (exclude 摘要, 审计报告, ESG, etc.).

Then download:

bash
python3 {project_root}/scripts/download_report.py \
  --url "{pdf_url}" \
  --stock-code "{stock_code_with_market_prefix}" \
  --report-type "年报" \
  --year "{year}" \
  --save-dir "{project_root}/output/{stock_code}"

Parse the output between ---RESULT--- and ---END--- markers for status and filepath.

Then convert the PDF to plain text and read it into context in full:

bash
pdftotext -layout "{pdf_filepath}" "{project_root}/output/{stock_code}/annual_report.txt"

This converts the entire annual report to a text file, preserving table layout. Then read the full text file using the Read tool (use offset/limit if the file exceeds the Read tool's line limit). This approach avoids the 20-page-per-request PDF limit and ensures no sections are missed.

After loading, locate and extract data for PDF-dependent rules:

  • "销售费用" or "营业成本" notes → freight/运费 (Rule 1.3)
  • "董事、监事、高级管理人员" → CFO/director changes (Rules 5.3/5.4)
  • "前五名客户" / "前五名供应商" → customer/supplier concentration (Rule 5.5)
  • "投资状况分析" in 董事会报告 → cross-industry acquisitions (Rule 5.6)
  • "非经营性占用" → related party fund occupation (Rule 5.8)
  • "立案" / "警示函" / "处罚" / "监管措施" → regulatory actions (Rule 5.9)
  • "研发支出" / "开发支出" / "资本化" → R&D capitalization ratio (Rule 6.2)

If PDF download fails, mark PDF-dependent rules as SKIP and continue with Tushare data.

Phase 3: Rule Evaluation

Read the detailed rules from references/checklist-rules.md for exact thresholds.

Evaluate all 28 rules systematically. For each rule, determine: PASS / WARN / FAIL / SKIP.

Use the Tushare JSON data as the primary source. The data uses these key field names:

Income (data.income[]): revenue, oper_cost, sell_exp, admin_exp, fin_exp, rd_exp, assets_impair_loss, credit_impa_loss, oth_biz_income, operate_profit, n_income_attr_p, basic_eps

Balance (data.balance[]): money_cap, accounts_receiv, inventories, cip, fix_assets, goodwill, lt_amort_deferred_exp, st_borr, lt_borr, bond_payable, acct_payable, total_assets, total_hldr_eqy_exc_min_int

Cashflow (data.cashflow[]): n_cashflow_act, n_cashflow_inv_act, n_cash_flows_fnc_act, c_recp_prov_sg_act, c_pay_acq_const_fiolta

Indicators (data.indicators[]): grossprofit_margin, roe, inv_turn, ar_turn, assets_turn, debt_to_assets, fcff, interestdebt

Audit (data.audit[]): end_date, ann_date, audit_result, audit_agency

Holders (data.holders[]): end_date, holder_name, hold_amount, hold_ratio

Peers (data.peers): industry, peers[].grossprofit_margin, peers[].roe, etc.

All data sorted by end_date descending (index 0 = latest year).

Evaluation order

  1. Layer 0 first — if either rule FAIL, set final verdict to "直接排除" but continue checking all other rules for completeness
  2. Layer 1-4 — quantitative checks using Tushare data
  3. Layer 5-6 — mix of Tushare and PDF data

Key calculations

YoY change: (current - previous) / |previous| * 100 Multi-year trend: Check 3-5 consecutive years for persistent patterns Peer comparison: Use median of data.peers.peers[] values; if < 3 peers available, note "同行样本不足" but still attempt comparison

Phase 4: Scoring

After all rules are evaluated, calculate the total risk score.

Base score

For each rule with a WARN or FAIL verdict, add points per the weight table:

LayerPer WARNPer FAIL
1 (Income Statement)25
2 (Cash Flow)36
3 (Balance Sheet)25
4 (Cross-validation)37
5 (Non-financial)13
6 (Industry)13

Combo bonus

Check for dangerous signal combinations:

  • If Rule 3.2 = FAIL → add +10
  • If Rule 2.3 = FAIL AND Rule 4.1 = FAIL → add +8
  • If Rule 1.2 = FAIL AND Rule 3.1 = FAIL → add +6

Risk level

ScoreLevelChinese
0-10Low Risk低风险
11-25Medium Risk中风险
26-45High Risk高风险
46+Very High Risk极高风险
Layer 0 FAILInstant Reject直接排除

Phase 5: Output Report

MANDATORY: 必须将完整报告直接输出到用户对话中(不是仅保存文件)。报告是本 skill 的核心交付物,用户必须在终端中看到完整报告。不得省略、缩写或用"已保存到文件"替代输出。

Output the report in this exact format (严格遵守,不得增删段落或改变顺序):

══════════════════════════════════════════════════
  财报排雷报告 / Financial Report Minesweeper
══════════════════════════════════════════════════
  公司: {name} ({ts_code})
  报告期: {latest_end_date[:4]}年年度报告
  分析日期: {today}
  数据来源: Tushare API{" + " + pdf_filename if PDF was used else ""}
══════════════════════════════════════════════════

━━━ 总体评估 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  风险等级: {risk_level}
  综合得分: {total_score}
  触发规则: {n_fail} 项警告, {n_warn} 项关注, {n_skip} 项跳过
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

── Layer 0: 门槛检查 ─────────────────────────────
  [{verdict}] 0.1 审计意见: {audit_opinion} ({audit_agency})
  [{verdict}] 0.2 披露时效: {ann_date} ({on_time_or_late})

── Layer 1: 利润表信号 ────────────────────────────
  [{verdict}] 1.1 毛利率异常: {detail with numbers}
  [{verdict}] 1.2 毛利率↑+应收↑+应付↓: {detail}
  [{verdict}] 1.3 运费增长 vs 收入增长: {detail}
  [{verdict}] 1.4 其他业务收入占比: {detail}
  [{verdict}] 1.5 费用率异常下降: {detail}
  [{verdict}] 1.6 资产减值损失: {detail}

── Layer 2: 现金流量表信号 ────────────────────────
  [{verdict}] 2.1 经营CF+投资CF背离: {detail}
  [{verdict}] 2.2 经营CF持续为负: {detail}
  [{verdict}] 2.3 高现金+高息借债: {detail}

── Layer 3: 资产负债表信号 ────────────────────────
  [{verdict}] 3.1 应收增速 vs 收入增速: {detail}
  [{verdict}] 3.2 存货周转率↓+毛利率↑: {detail}
  [{verdict}] 3.3 在建工程不转固: {detail}
  [{verdict}] 3.4 长期待摊费用大增: {detail}
  [{verdict}] 3.5 坏账计提 vs 同行: {detail}

── Layer 4: 交叉验证 ─────────────────────────────
  [{verdict}] 4.1 经营CF/净利润: {detail}
  [{verdict}] 4.2 销售收现/营收: {detail}
  [{verdict}] 4.3 利润膨胀→资产膨胀: {detail}
  [{verdict}] 4.4 核心利润 vs 净利润: {detail}
  [{verdict}] 4.5 净利润↑+FCF为负: {detail}

── Layer 5: 非财务信号 ────────────────────────────
  [{verdict}] 5.1 更换审计机构: {detail}
  [{verdict}] 5.2 大股东减持: {detail}
  [{verdict}] 5.3 财务总监更换: {detail}
  [{verdict}] 5.4 独董辞职: {detail}
  [{verdict}] 5.5 可疑供应商/客户: {detail}
  [{verdict}] 5.6 跨行业收购: {detail}
  [{verdict}] 5.7 商誉过大: {detail}
  [{verdict}] 5.8 其他应收款异常: {detail}
  [{verdict}] 5.9 监管处罚/立案调查: {detail}

── Layer 6: 行业特有风险 ──────────────────────────
  [{verdict}] 6.1 农林渔牧行业: {detail}
  [{verdict}] 6.2 研发资本化比例: {detail}

━━━ 关键发现摘要 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  {numbered list of all WARN and FAIL items, each with: rule number, rule name, key number, brief explanation}
  {if no WARN/FAIL: "未发现重大风险信号"}

━━━ 积极信号 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  {list notable positive findings, e.g. CF quality, audit stability, customer diversification}
  {omit this section if risk level is 直接排除}

━━━ 需人工验证项目 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  {list of all SKIP items with reason}
  {if no SKIP: "无"}

━━━ 方法论 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  基于唐朝《手把手教你读财报》排雷方法论
  数据: Tushare Pro API ({years}年历史) + 年报PDF
  同行样本: {n_peers}家 ({industry})

  免责声明: 本分析仅供参考,不构成投资建议。
══════════════════════════════════════════════════

Output format rules (严格执行)

  1. Verdict 格式: [PASS], [WARN], [FAIL], [SKIP] — 方括号 + 大写英文
  2. Detail 要求: 每条规则必须包含实际数据值,不得仅写 PASS/FAIL
    • 好: 毛利率 33.67%, YoY -0.70pp, 同行中位数 26.74%
    • 坏: 毛利率正常 或 无异常
  3. WARN/FAIL 解释: 用 → 后跟一句话解释触发原因
  4. 多年趋势: 列出具体数值序列,如 2.44, 2.92, 3.54, 1.26, 2.36 (近5年)
  5. 一行原则: 每条规则尽量控制在一行,超长时最多两行
  6. 积极信号段: 风险等级为低/中风险时输出,列出公司的财务亮点
  7. 完整输出: 报告的每一个段落(从 ══ 到 ══)必须完整输出到用户终端,不得截断

Phase 6: Save Output Files

MANDATORY: 必须在 Phase 5 输出报告到终端之后,再保存文件。执行顺序:先输出 → 再保存。不得跳过任何一步。

Save all artifacts to the output directory using the Write tool.

File 1: output/{stock_code}/raw_data.md

Already saved in Phase 1. Contains all Tushare data in readable markdown tables.

File 2: output/{stock_code}/report.md

Save the full minesweeper report (the exact output from Phase 5) as a markdown file. Use the same formatting as the terminal output.

File 3: output/{stock_code}/analysis_log.md

Save a detailed analysis log with intermediate calculations:

markdown
# {name} ({ts_code}) - 排雷分析日志

分析时间: {today}

## 数据摘要

### 利润表关键数据 (近6年)
| 年度 | 营收(亿) | 净利润(亿) | 毛利率% | 费用率% | 减值(万) |
|------|---------|----------|--------|--------|---------|
(computed summary rows)

### 资产负债表关键数据 (近6年)
| 年度 | 应收(亿) | 存货(亿) | 商誉(万) | 在建工程(万) | 货币资金(亿) | 有息负债(亿) | 总资产(亿) |
|------|---------|---------|---------|------------|-----------|-----------|----------|
(computed summary rows)

### 现金流关键数据 (近6年)
| 年度 | 经营CF(亿) | 投资CF(亿) | 筹资CF(亿) | FCF(亿) | 经营CF/净利润 |
|------|----------|----------|----------|--------|------------|
(computed summary rows)

## 规则评估明细

### Rule X.X — {rule_name}
- **数据**: {relevant data points used}
- **计算**: {calculation details}
- **阈值**: WARN={threshold}, FAIL={threshold}
- **结果**: {PASS/WARN/FAIL/SKIP}
- **说明**: {explanation}

(repeat for each of the 28 rules)

## 评分计算

| 层级 | WARN数 | FAIL数 | WARN分 | FAIL分 | 小计 |
|------|--------|--------|--------|--------|------|
(scoring breakdown)

组合加分: {details}
总分: {total}
风险等级: {level}

Final output summary to user

After saving all files, tell the user:

已保存分析结果到 output/{stock_code}/:
  - raw_data.md    (Tushare 原始数据, {n} 行)
  - report.md      (排雷报告)
  - analysis_log.md (分析日志与计算过程)
  {- SZxxxxxx_年报_xxxx.pdf (年报PDF) — if downloaded}

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Minesweeper AI 技能有什么作用?

财报排雷工具 (Financial Report Minesweeper). Analyzes A-share annual reports for fraud/risk signals using Tang Chao's checklist methodology. Takes a stock code or name as input, fetches structured financial data via Tushare API, optionally downloads the annual report PDF, and runs a systematic 7-layer checklist of 28 risk detection rules. Outputs a formatted checklist report with per-rule verdicts (PASS/WARN/FAIL/SKIP) and an overall risk rating. Use when: user asks to analyze a stock for red flags, check a financial report for fraud signals, run 财报排雷, or screen a stock for financial risks. Trigg...

为什么在 TypingMind 中使用 Minesweeper?

因为您只需安装一次,就能搭配任何模型使用。Minesweeper 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Minesweeper?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/terancejiang/financial-report-minesweeper/tree/main/skill。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Minesweeper?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Minesweeper 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Minesweeper 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Minesweeper AI 技能免费吗?

terancejiang 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇