From fatfingererr-macro-skills
自動比較美國 CPI(固定權重)與 PCE(動態權重)的通膨訊號,識別低波動高權重桶位的 PCE 上行風險。用於分析 Fed 關注的 PCE 是否正在 re-accelerate,即使 CPI 看似降溫。
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin fatfingererr-macro-skillsThis skill uses the workspace's default tool permissions.
<essential_principles>
Creates new Angular apps using Angular CLI with flags for routing, SSR, SCSS, prefixes, and AI config. Follows best practices for modern TypeScript/Angular development. Use when starting Angular projects.
Generates Angular code and provides architectural guidance for projects, components, services, reactivity with signals, forms, dependency injection, routing, SSR, ARIA accessibility, animations, Tailwind styling, testing, and CLI tooling.
Executes ctx7 CLI to fetch up-to-date library documentation, manage AI coding skills (install/search/generate/remove/suggest), and configure Context7 MCP. Useful for current API refs, skill handling, or agent setup.
<essential_principles>
**CPI vs PCE 權重差異是核心**關鍵洞見:當消費者把錢花在「價格較不波動」的品項時,若這些品項的通膨走高,PCE 會比 CPI 更敏感地反映這個上行壓力。
**低波動 + 高權重 = PCE 上行風險訊號**識別邏輯:
PCE 涵蓋項目比 CPI 更廣:
這些 scope 差異也會造成 CPI/PCE 分歧。詳見 references/cpi-pce-methodology.md。
本 skill 使用無需 API key 的資料來源:
https://fred.stlouisfed.org/graph/fredgraph.csv?id={SERIES_ID}https://api.bls.gov/publicAPI/v2/timeseries/data/腳本位於 scripts/ 目錄,可直接執行。
</essential_principles>
比較 CPI 與 PCE 通膨訊號的分歧,並識別「低波動、高 PCE 權重」的消費桶是否正在推升 Fed 關注的 PCE 通膨路徑。輸出三層訊號:
<quick_start>
最快的方式:執行快速檢查
cd skills/us-cpi-pce-comparator
pip install pandas numpy requests # 首次使用
python scripts/cpi_pce_analyzer.py --quick
輸出範例:
{
"headline": {"cpi_yoy": 2.65, "pce_yoy": 2.79, "gap_bps": 14},
"core": {"cpi_core_yoy": 2.65, "pce_core_yoy": 2.83, "gap_bps": 18},
"momentum": {"cpi_3m_saar": 2.07, "pce_3m_saar": 2.82}
}
完整分析:
python scripts/cpi_pce_analyzer.py --start 2020-01-01 --measure yoy
</quick_start>
需要進行什麼分析?請選擇或直接提供分析參數。
| Response | Action | |------------------------------|---------------------------------------------------| | 1, "快速", "quick", "check" | 執行 `python scripts/cpi_pce_analyzer.py --quick` | | 2, "完整", "full", "analyze" | 閱讀 `workflows/analyze.md` 並執行 | | 3, "學習", "方法論", "why" | 閱讀 `references/cpi-pce-methodology.md` | | 提供參數 (如日期範圍) | 閱讀 `workflows/analyze.md` 並使用參數執行 |路由後,閱讀對應文件並執行。
<directory_structure>
us-cpi-pce-comparator/
├── SKILL.md # 本文件(路由器)
├── skill.yaml # 前端展示元數據
├── workflows/
│ ├── analyze.md # 完整分析工作流
│ └── quick-check.md # 快速檢查工作流
├── references/
│ ├── data-sources.md # FRED/BLS 系列代碼與資料來源
│ ├── cpi-pce-methodology.md # CPI/PCE 方法論深度解析
│ └── implementation.md # 計算公式與程式碼範例
├── templates/
│ ├── output-json.md # JSON 輸出模板
│ └── output-markdown.md # Markdown 報告模板
└── scripts/
├── fetch_fred_data.py # FRED 資料抓取(無需 API key)
├── fetch_bls_data.py # BLS 資料抓取
└── cpi_pce_analyzer.py # 主分析腳本
</directory_structure>
<reference_index>
方法論: references/cpi-pce-methodology.md
資料來源: references/data-sources.md
實作指南: references/implementation.md
</reference_index>
<workflows_index>
| Workflow | Purpose | 使用時機 |
|---|---|---|
| analyze.md | 完整三步驟分析 | 需要深度分析時 |
| quick-check.md | 快速檢查分歧 | 日常監控或快速回答 |
| </workflows_index> |
<templates_index>
| Template | Purpose |
|---|---|
| output-json.md | JSON 輸出結構定義 |
| output-markdown.md | Markdown 報告模板 |
| </templates_index> |
<scripts_index>
| Script | Command | Purpose |
|---|---|---|
| cpi_pce_analyzer.py | --quick | 快速檢查最新分歧 |
| cpi_pce_analyzer.py | --start DATE --measure yoy | 完整分析 |
| fetch_fred_data.py | --series CPIAUCSL,PCEPI | 抓取 FRED 資料 |
| fetch_bls_data.py | --full | 抓取 BLS CPI 資料 |
| </scripts_index> |
<input_schema>
**Type**: string (ISO YYYY-MM-DD) **Description**: 分析起始日 **Type**: string (ISO YYYY-MM-DD) **Description**: 分析結束日 **Type**: string **Options**: `yoy` | `mom_saar` | `qoq_saar` **Type**: string **Format**: `YYYY-MM-DD:YYYY-MM-DD` **Description**: 基準期範圍,用於計算偏離度</input_schema>
<output_schema>
參見 templates/output-json.md 的完整結構定義。
摘要:
{
"headline": {"cpi_yoy": 2.65, "pce_yoy": 2.79, "gap_bps": 14},
"low_vol_high_weight_buckets": [{"bucket": "...", "signal": "upside"}],
"attribution": {"top_contributors": [...], "weight_effect_bps": 12},
"interpretation": ["..."],
"caveats": ["..."]
}
</output_schema>
<success_criteria> 分析成功時應產出: