demographic-fiscal-trap-analyzer

demographic-fiscal-trap-analyzer is a skill for Claude Code, Codex from fatfingererr/macro-skills. It costs 82 tokens per session (3,835 once invoked), scanned A, original, MIT.

A country-risk analysis workflow for studying how population ageing, public debt, government costs, and weak growth can combine into a fiscal trap.

In plain words
What is it for?
Use it to compare countries or regions, calculate fiscal-trap and inflation-incentive scores, and identify possible monetary-devaluation paths.
Why use it?
It organizes several long-term pressures into scores that show a government's financial vulnerability and its incentive to reduce debt through inflation or financial restrictions.

Skill for Claude CodeCodex

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

Good fit Use it to compare countries or regions, calculate fiscal-trap and inflation-incentive scores, and identify possible monetary-devaluation paths.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fatfingererr/macro-skills/demographic-fiscal-trap-analyzer
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 demographic-fiscal-trap-analyzer
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 demographic-fiscal-trap-analyzer/plugin install demographic-fiscal-trap-analyzer 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 demographic-fiscal-trap-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/fatfingererr/macro-skills/demographic-fiscal-trap-analyzer/github.svg)](https://agentmods.dev/skills/fatfingererr/macro-skills/demographic-fiscal-trap-analyzer)
Your own site
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/demographic-fiscal-trap-analyzer"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/demographic-fiscal-trap-analyzer/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 demographic-fiscal-trap-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/demographic-fiscal-trap-analyzer"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/demographic-fiscal-trap-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,835 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.00082 $0.03835
Opus 5 $0.00041 $0.01917
Sonnet 5 $0.00016 $0.00767
Haiku 4.5 $0.00008 $0.00383

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

Security

Grade A, and why

demographic-fiscal-trap-analyzer 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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/fiscal_trap_analyzer.py, scripts/visualize_combined.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/demographic-fiscal-trap-analyzer/SKILL.md · 267 lines

How it starts

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

<essential_principles>

「人口-財政陷阱」(Demographic-Fiscal Trap) 是指:當高齡化撫養比持續攀升、政府債務/GDP 居高不下、官僚體系低效膨脹、且名義成長無法覆蓋利息支出時,政府傾向透過「金融抑制」(financial repression) 或「通膨稀釋」(inflation erosion) 來削減實質負債。

此陷阱的核心特徵:

  1. 人口結構剛性:老年撫養比上升是不可逆的長期趨勢
  2. 債務自我強化:r > g 時債務比率自動膨脹
  3. 政治阻力:削減福利支出的政治成本極高
  4. 貨幣出口:當財政改革無路可走,貨幣稀釋成為「最小阻力路徑」

本技能採用四維度評分框架:

支柱 權重(預設) 核心指標
老化壓力 (Aging Pressure) 35% 老年撫養比水準 + 10年斜率
債務動態 (Debt Dynamics) 35% 債務/GDP + 5年斜率 + (r-g)
官僚膨脹 (Bloat Index) 15% 政府消費/GDP + 政府支出/GDP
成長拖累 (Growth Drag) 15% 名義GDP成長率(負向計分)

最終 fiscal_trap_score = Σ(權重 × z-score) 加權總和

通膨激勵指數 (Inflation Incentive Score) 衡量政府選擇「通膨稀釋」路徑的動機強度:

inflation_incentive =
    0.40 × zscore(debt_level)           # 高債務 → 強動機
  + 0.20 × zscore(r - g)                # r > g → 難以自然去槓桿
  + 0.20 × zscore(neg_real_rate_share)  # 負實質利率持續 → 已在執行
  + 0.20 × zscore(bloat_index)          # 高官僚膨脹 → 難以削減支出

當此指數 > 1.5 時,表示該經濟體有強烈動機維持負實質利率環境。

本技能採用公開可重現的資料源:

資料類型 首選來源 次選來源 API/下載方式
撫養比 World Bank WDI UN WPP API / CSV
政府債務 IMF WEO World Bank API / CSV
政府支出 IMF GFS World Bank API / CSV
健康支出 WHO GHED World Bank API / CSV
名義GDP成長 World Bank IMF WEO API
CPI通膨 World Bank IMF API
10年公債殖利率 OECD / 各國央行 Trading Economics API / 爬蟲

所有指標均可透過 wbdataimfpy 或直接 API 取得。

為使跨國比較有意義,所有原始指標均轉換為 z-score:

zscore(x) = (x - μ_cross_section) / σ_cross_section

其中 μ 和 σ 為同期跨國截面統計量。

這使得:

  • z > 1.5 → 顯著高於平均(警戒)
  • z > 2.0 → 極端值(紅燈)
  • z < -1.0 → 顯著優於平均

根據 Aging Pressure 和 Debt Dynamics 兩主軸,將經濟體分為四象限:

象限 老化壓力 債務動態 典型國家 政策空間
Q1: 雙高危機 高 (>1) 高 (>1) 日本、義大利、希臘 極窄
Q2: 老化主導 高 (>1) 低 (<1) 德國、南韓 中等(債務可用)
Q3: 債務主導 低 (<1) 高 (>1) 美國、巴西 中等(人口紅利)
Q4: 相對健康 低 (<1) 低 (<1) 印度、印尼 寬廣

Q1 象限國家最可能進入「財政陷阱」並選擇通膨稀釋路徑。

</essential_principles>

  1. 量化財政脆弱度:計算各國/地區的 fiscal_trap_scoreinflation_incentive_score
  2. 識別結構風險:透過四支柱分解,診斷哪個維度貢獻最大風險
  3. 象限定位:將經濟體歸類至四象限,判斷其政策空間
  4. 趨勢預警:利用撫養比預測至 2050 年,前瞻性評估陷阱演化
  5. 跨國比較:支援多國並排比較,識別相對風險排序

<quick_start>

快速開始

單一國家分析

請分析日本的人口財政陷阱風險,使用 2010-2023 年資料,預測至 2050 年

多國比較

比較 G7 國家的財政陷阱分數,並按通膨激勵指數排序

自訂權重

分析台灣的財政陷阱,使用自訂權重:老化 40%、債務 40%、膨脹 10%、成長 10%

</quick_start>

Read the full file on GitHub · 267 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. 12d ago First seen · 267 lines · 82 tokens per session scan A 54205170f08d

Subscribe to this mod's changes

demographic-fiscal-trap-analyzer is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 82 tokens to every session and 3,835 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

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

reading-receipt

An image-reading workflow for extracting structured information from receipts, invoices, and hometown-tax donation certificates. It can first extract text from PDFs and otherwise read their images.

kazukinagata/shinkoku · 64 tokens