us-cpi-pce-comparator

us-cpi-pce-comparator is a skill for Claude Code, Codex from fatfingererr/macro-skills. It costs 78 tokens per session (2,246 once invoked), scanned A, original, MIT.

A comparison of US CPI, which measures a fixed household shopping basket, and PCE, which changes its spending weights as buying habits change. PCE is the inflation measure closely watched by the Federal Reserve.

In plain words
What is it for?
Measure the CPI–PCE gap, identify which spending categories are pushing PCE higher, and assess whether the increase may continue.
Why use it?
It shows why CPI may appear to cool while PCE is still rising, especially when high-weight, normally stable spending categories accelerate.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Measure the CPI–PCE gap, identify which spending categories are pushing PCE higher, and assess whether the increase may continue.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fatfingererr/macro-skills/us-cpi-pce-comparator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fatfingererr/macro-skills --skill us-cpi-pce-comparator
Clone the repo
git clone --depth 1 https://github.com/fatfingererr/macro-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin us-cpi-pce-comparator/plugin install us-cpi-pce-comparator after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for us-cpi-pce-comparator

README.md
[![agentmods](https://agentmods.dev/badge/skills/fatfingererr/macro-skills/us-cpi-pce-comparator/github.svg)](https://agentmods.dev/skills/fatfingererr/macro-skills/us-cpi-pce-comparator)
Your own site
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/us-cpi-pce-comparator"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/us-cpi-pce-comparator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for us-cpi-pce-comparator

Your own site · 80×15
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/us-cpi-pce-comparator"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/us-cpi-pce-comparator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.02246
Opus 5 $0.00039 $0.01123
Sonnet 5 $0.00016 $0.00449
Haiku 4.5 $0.00008 $0.00225

Measured 11d ago against content hash a93c5a291690, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

us-cpi-pce-comparator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/cpi_pce_analyzer.py, scripts/fetch_bls_data.py, scripts/fetch_fred_data.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/us-cpi-pce-comparator/SKILL.md · 219 lines

How it starts

The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<essential_principles>

  • CPI(固定權重): BLS Relative Importance,每年或每兩年更新,反映「固定籃子」
  • PCE(動態/鏈結權重): BEA 名目支出占比,每月隨實際消費行為調整

關鍵洞見:當消費者把錢花在「價格較不波動」的品項時,若這些品項的通膨走高,PCE 會比 CPI 更敏感地反映這個上行壓力。

識別邏輯:

  1. 找出 PCE 權重較高的消費桶(consumer spending buckets)
  2. 在這些桶中,篩選價格波動度較低者
  3. 若這些桶的通膨近期轉正或加速,標記為 PCE upside risk

PCE 涵蓋項目比 CPI 更廣:

  • 第三方支付的醫療費用(employer-paid healthcare)
  • 非營利機構對家庭的服務
  • 某些金融服務的隱含費用

這些 scope 差異也會造成 CPI/PCE 分歧。詳見 references/cpi-pce-methodology.md

本 skill 使用無需 API key 的資料來源:

  • FRED CSV: https://fred.stlouisfed.org/graph/fredgraph.csv?id={SERIES_ID}
  • BLS Public API: https://api.bls.gov/publicAPI/v2/timeseries/data/

腳本位於 scripts/ 目錄,可直接執行。

</essential_principles>

輸出三層訊號:

  1. Headline level: CPI vs PCE divergence(bps)
  2. Attribution: 哪些 buckets 在推升 PCE(weighted contribution)
  3. Risk framing: 觀察點與延續性風險評估

<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>

  1. 快速檢查 - 查看最新的 CPI/PCE 分歧數據
  2. 完整分析 - 執行完整的三步驟分析工作流
  3. 方法論學習 - 了解 CPI/PCE 差異的深層原因

請選擇或直接提供分析參數。

路由後,閱讀對應文件並執行。

<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

  • CPI vs PCE 的五大差異(權重、範圍、公式、住房、人口)
  • 分歧模式與交易含義
  • Fed 如何解讀兩指標

資料來源: references/data-sources.md

  • FRED CSV endpoint(無需 API key)
  • FRED 系列代碼對照表
  • 桶位定義與近似計算

實作指南: references/implementation.md

  • 通膨計算公式(YoY, MoM SAAR, QoQ SAAR)
  • 權重效應計算
  • 波動度分析

</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>

Read the full file on GitHub · 219 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 219 lines · 78 tokens per session scan A a93c5a291690

Subscribe to this mod's changes

us-cpi-pce-comparator is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 78 tokens to every session and 2,246 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

trading-risk-gate

Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

winstonkoh87/Athena-Public · 53 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens