SKILLS/market-sizing/SKILL.md
市场规模测算工具 (TAM/SAM/SOM)。适用于用户提到「市场规模」「market size」「TAM」「SAM」「SOM」或需要估算目标市场大小时使用。
npx skillsauth add pinkpixel-dev/skills-collection-2 market-sizingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
专业级市场规模测算工具,支持 Fermi 估算、Monte Carlo 模拟和多数据源集成。
| 能力 | 描述 | |------|------| | Fermi 估算 | 5 种分解模式,结构化计算 | | Monte Carlo | 输出置信区间,而非单点估计 | | 数据 API | 6 个免费数据源 (AkShare, FRED, World Bank 等) | | 专业报告 | Markdown + HTML 交互图表 |
当用户提到以下内容时触发:
在开始任何计算之前,必须收集以下信息:
## 🎯 Clarifying Questions
1. **市场定义**
- 产品/服务的边界是什么?
- 包含什么?排除什么?
- 是否包含售后服务/MRO?
2. **客户画像**
- 目标客户是谁?B2B 还是 B2C?
- 企业规模/人口特征要求?
3. **地域范围**
- 全球/区域/单一国家?
- 是否含港澳台?
4. **时间范围**
- 当前年份还是预测期?
- 需要几年预测?
5. **数据可得性**
- 用户有现成资料吗?
- 是否有竞品信息?
只有在收集完必要信息后,才能进入计算阶段。
根据数据可得性选择方法:
graph TD
A[有直接市场数据?] -->|是| B[Top-Down 方法]
A -->|否| C{目标客户类型?}
C -->|B2C 消费者| D[人口基数法]
C -->|B2B 企业| E[机构基数法]
C -->|替代现有方案| F[替代法]
C -->|产业链环节| G[价值链法]
C -->|无法归类| H[价值基础法]
详细方法说明见 fermi_patterns.md。 如果已知行业类型 (SaaS/Marketplace/Consumer/B2B/Hardware),优先参考 industry_templates.md。
使用 data_fetcher.py 获取真实数据支撑假设:
from scripts.data_fetcher import DataFetcher
df = DataFetcher()
# 中国 GDP
gdp = df.get_china_gdp()
# 行业数据
industry = df.search_akshare_functions("汽车")
详细 API 说明见 data_sources.md。
🚨 数据三原则 (强制): 每一个数字只能是以下三种之一,不允许凭空出现任何数据: | 类型 | 标记 | 要求 | |------|------|------| | 引用 | 📚 | 来自可靠报告/公开数据,必须标注具体来源 (报告名+页码/URL) | | 计算 | 🧮 | 由已有数据推导得出,必须写出完整计算公式 | | 假设 | ⚠️ | 无法获取的合理估计,必须说明估计依据并给出范围 |
使用 fermi_calculator.py 执行结构化计算:
from scripts.fermi_calculator import FermiCalculator
calc = FermiCalculator()
result = calc.population_based(
base_population=1.4e9,
filters=[
("城市人口", 0.65),
("20-50岁", 0.45),
("目标用户", 0.20),
],
penetration_rate=0.8,
average_spend=100,
frequency=12,
unit="元"
)
print(result)
使用 monte_carlo.py 量化不确定性:
from scripts.monte_carlo import MonteCarloSimulator, Assumption
sim = MonteCarloSimulator(seed=42)
result = sim.run(
assumptions={
"市场基数(亿)": Assumption(min=20, max=35, most_likely=25),
"目标占比": Assumption(min=0.35, max=0.55, most_likely=0.45),
"市占率": Assumption(min=0.10, max=0.20, most_likely=0.15),
},
formula=lambda **k: k["市场基数(亿)"] * k["目标占比"] * k["市占率"],
n_simulations=10000,
unit="亿元"
)
print(result)
# 输出 90% 置信区间和敏感性分析
使用 report_generator.py 输出专业报告。报告格式选择见 presentation_guide.md。
from scripts.report_generator import ReportGenerator, MarketSizingData
gen = ReportGenerator()
data = MarketSizingData(
market_name="中国航空活塞发动机 (200-500HP)",
geography="中国大陆",
base_year=2024,
forecast_years=5,
tam=25.5,
sam=11.5,
som=1.7,
unit="亿元",
cagr=0.08,
monte_carlo_result=result.to_dict(),
)
gen.generate(data, output_dir="./output", formats=["md", "html", "xlsx"])
[!IMPORTANT] Excel 公式链依赖
assumptions中的key字段命名。必须遵循以下规范,否则 Excel 将降级为静态值。
Excel 引擎通过 key 名自动检测 Fermi 分解模式并构建公式链。
模式 1: 机构基数法 (institution_based)
每个分段使用 {prefix}_count + {prefix}_adopt + {prefix}_price 三件套:
# 段前缀可自由命名 (ka/mid/smb/enterprise/startup...)
# 引擎自动检测 *_count/*_vol + *_adopt/*_rate + *_price
{"key": "ka_count", "numeric_value": 5000, ...},
{"key": "ka_adopt", "numeric_value": 0.85, ...},
{"key": "ka_price", "numeric_value": 150, ...},
模式 2: 人口基数法 (population_based) — 使用固定 key 名:
| key | 含义 | 示例 |
|-----|------|------|
| base_pop | 基础人口 (亿人) | 9.3 |
| core_pop_pct | 核心人群占比 | 0.45 |
| pene_rate | 渗透率 | 0.65 |
| freq | 消费频次 | 45 |
| price | 单价 (元) | 5.5 |
模式 3: 替代法 (substitution_based):
| key | 含义 |
|-----|------|
| existing_market | 现有市场规模 |
| substitution_rate | 替代率 |
| price_premium | 价格系数 (可选, 默认 1.0) |
模式 4: 价值链法 (value_chain_based):
| key | 含义 |
|-----|------|
| end_market | 终端市场规模 |
| value_share | 环节价值占比 |
模式 5: 价值基础法 (value_based):
| key | 含义 |
|-----|------|
| target_count | 目标客户数 |
| prob_freq | 问题频率 (可选) |
| prob_cost | 单次问题成本 |
| wtp_ratio | 愿付比例 |
通用 key (所有模式都需要):
| key | 含义 | Excel 用途 |
|-----|------|-----------|
| sam_ratio | SAM/TAM 比例 | SAM = TAM × sam_ratio |
| som_share | 目标市占率 | SOM = SAM × som_share |
| cagr | 复合增长率 | Growth Forecast 公式 |
numeric_value 规则: 百分比/比率填小数 (0.85=85%),金额单位与计算模型一致。
{
"key": "ka_count", # 🔴 必填 — 引擎用此构建公式
"name": "KA机构数量", # 🔴 必填 — 显示名
"numeric_value": 5000, # 🔴 必填 — 用于 Excel 计算
"value": "5000家", # 用于 MD/HTML 展示
"source": "⚠️ 假设: ...", # 🔴 必填 — 📚/🧮/⚠️ + 依据
"type": "⚠️", # 🔴 必填 — 📚/🧮/⚠️
"used_in": "Bottom-Up KA", # 可选 — 标注使用环节
}
在完成分析后,必须进行以下检查:
任何市场规模估算都必须使用至少两种方法进行交叉验证:
| 方法组合 | 适用场景 | |----------|----------| | Top-Down + Bottom-Up | 最常用,大多数 B2C 市场 | | 人口基数 + 机构基数 | 同时覆盖 B2C 和 B2B | | 替代法 + 价值链法 | 新品类进入成熟市场 |
验证标准:
⚠️ 禁止为了凑近偏差者而恶意调整假设。偏差本身是信号,不是错误。如果两种方法差异很大,应该诚实报告并分析原因,而不是修改数字让它们“看起来一致”。
market-sizing/
├── SKILL.md # 本文件
├── references/
│ ├── methodology.md # 方法论详解
│ ├── fermi_patterns.md # Fermi 分解模式库 (含深度指南)
│ ├── industry_templates.md # 行业特化模板 (SaaS/Marketplace/Consumer/B2B/Hardware)
│ ├── presentation_guide.md # 呈现策略指南 (投资人 vs 战略)
│ ├── data_sources.md # 数据源使用指南
│ └── prompts.md # 后续分析提示库
├── examples/
│ ├── tech_ai_dev_tools.md # 完整案例: 科技 (AI 开发工具)
│ ├── consumer_prefab_food.md # 完整案例: 消费 (预制菜)
│ └── software_finance_saas.md # 完整案例: 软件 (财务 SaaS)
├── scripts/
│ ├── data_fetcher.py # 数据 API 封装
│ ├── fermi_calculator.py # Fermi 计算引擎
│ ├── monte_carlo.py # Monte Carlo 模拟
│ └── report_generator.py # 报告生成器
└── templates/
├── market_sizing_report.md # Markdown 模板
└── market_sizing_template.xlsx # Excel 模板
pip install pandas numpy akshare baostock yfinance pytrends plotly openpyxl
# FRED 需要注册 API Key
pip install fredapi
# 设置环境变量 FRED_API_KEY
# World Bank
pip install wbdata
用户: 估算中国咖啡市场规模
AI 响应:
首先收集信息:
确认后选择人口基数法
获取数据支撑假设
执行 Fermi 计算 + Monte Carlo
输出完整报告
development
A cryptographic audit systematically reviews an application's use of cryptographic primitives, protocols, and key management to identify vulnerabilities such as weak algorithms, insecure modes, hardco
tools
Extract stored credentials from compromised endpoints using the LaZagne post-exploitation tool to recover passwords from browsers, databases, system vaults, and applications during authorized red team operations.
testing
Analyze and bypass Content Security Policy implementations to achieve cross-site scripting by exploiting misconfigurations, JSONP endpoints, unsafe directives, and policy injection techniques.
testing
Scan container images, filesystems, and Kubernetes manifests for vulnerabilities, misconfigurations, exposed secrets, and license compliance issues using Aqua Security Trivy with SBOM generation and CI/CD integration.