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.
npx skills add fatfingererr/macro-skills --skill detect-fed-unamortized-discount-patterngit clone --depth 1 https://github.com/fatfingererr/macro-skillsWrote 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.
[](https://agentmods.dev/skills/fatfingererr/macro-skills/detect-fed-unamortized-discount-pattern)<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/detect-fed-unamortized-discount-pattern"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/detect-fed-unamortized-discount-pattern/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.
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/detect-fed-unamortized-discount-pattern"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/detect-fed-unamortized-discount-pattern.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00086 | $0.03946 |
| Opus 5 | $0.00043 | $0.01973 |
| Sonnet 5 | $0.00017 | $0.00789 |
| Haiku 4.5 | $0.00009 | $0.00395 |
Grade A, and why
detect-fed-unamortized-discount-pattern 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.
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.
How it starts
The opening of the file, as written. The whole thing — 322 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<essential_principles>
核心認知:把「肉眼類比」轉成可量化的「形狀比對」,但「像」不等於「會發生」:
- 相關係數 (corr):近期窗口 vs. 基準窗口的線性形狀相似
- 動態時間校正 (DTW):允許「快一點/慢一點」但形狀相似
- 形狀特徵 (shape_features):趨勢斜率、拐點結構、波動擴張
輸出「pattern_similarity_score」只回答「像不像」,不回答「會不會發生」。
把「形狀相似」與「壓力驗證」拆開:
- pattern_similarity_score:只測量形狀相似度
- stress_confirmation_score:測量交叉驗證指標是否同步惡化
- composite_risk_score:加權合成,但必須附上「哪些指標支持/反對」
反直覺檢查:
- 若相似度很高,但交叉驗證指標沒有壓力訊號 → 可能只是利率/持有結構/會計攤銷造成的圖形相似
- 若相似度中等,但多數壓力指標同步惡化 → 反而要提高警覺
WUDSHO(Unamortized Discounts)成因:
- 聯準會購買債券時,若買入價低於面值,差額計為「未攤銷折價」
- 利率上升期:市價下跌 → 購入債券折價增加 → WUDSHO 上升
- 利率下降期:市價上升 → 購入債券溢價增加 → WUDSHO 下降
重要:WUDSHO 變動可能反映:
- 利率環境變化(最常見)
- 持有債券久期結構
- 會計攤銷時程
- 真正的金融壓力(需交叉驗證才能確認)
社群常見的「圖形類比敘事」往往缺乏反證:
- ❌「這條線複製 COVID,60 天內黑天鵝」→ 只有類比,沒有驗證
- ✅ 本技能輸出:「形狀相似度 0.88,但信用利差中性、股市波動偏低 → 不支持系統性壓力假說」
必須輸出的反證項目:
- 「形狀相似」的替代解釋(利率效果、會計效果)
- 「壓力指標」的現況(支持/反對風險假說)
- 「歷史後續」的條件分布(不是預測)
本技能使用 FRED 公開週資料:
- WUDSHO: Fed 持有證券的未攤銷折價
- 交叉驗證指標:信用利差、波動率、短端利差等
必須揭露:
- FRED 週資料可能有 T+1 ~ T+3 延遲
- 部分指標(如窗口工具用量)需要替代代理
- 形狀比對結果受 resample 頻率影響
</essential_principles>
- 取得目標序列:從 FRED 取得 WUDSHO(或指定序列)的週資料
- 窗口比對:將近期窗口與歷史基準窗口(如 COVID 2020)做形狀比對
- 相似度計算:使用相關係數、DTW、形狀特徵等多種方法
- 交叉驗證:檢查信用利差、波動率、流動性指標是否同步惡化
- 風險分數合成:輸出可量化的風險分數與反證分析
- 情境敘事:描述歷史類比後續發展(非預測)
輸出:形狀相似度、壓力驗證分數、合成風險分數、反證分析、情境推演。
<quick_start>
最快的方式:執行完整分析
cd skills/detect-fed-unamortized-discount-pattern
pip install pandas numpy requests scipy matplotlib # 首次使用
python scripts/pattern_detector.py --quick
輸出:
output/pattern_analysis_YYYY-MM-DD.json- JSON 結果
完整分析(指定參數):
python scripts/pattern_detector.py \
--target_series WUDSHO \
--baseline_windows "COVID_2020:2020-01-01:2020-06-30" \
--recent_window_days 120 \
--output result.json
Bloomberg 風格視覺化(輸出至專案根目錄 output/):
python scripts/visualize_pattern.py
使用現有分析結果生成圖表:
python scripts/visualize_pattern.py --json output/pattern_analysis_YYYY-MM-DD.json
輸出圖表:
output/fed_unamortized_discount_pattern_YYYY-MM-DD.png- 形狀比對與壓力儀表板output/fed_unamortized_discount_history_YYYY-MM-DD.png- 歷史走勢總覽
</quick_start>
- 快速檢查(推薦) - 查看目前的形狀相似度與壓力分數
- 完整分析 - 執行完整的形狀比對與交叉驗證
- 視覺化分析 - 生成形狀比對圖表
- 歷史事件對照 - 深入了解歷史基準窗口的後續發展
- 方法論學習 - 了解形狀比對與交叉驗證的邏輯
- 自訂參數 - 指定序列、窗口、門檻等參數
請選擇或直接提供分析參數。
路由後,閱讀對應文件並執行。
<directory_structure>
detect-fed-unamortized-discount-pattern/
├── SKILL.md # 本文件(路由器)
├── skill.yaml # 前端展示元數據
├── manifest.json # 技能元數據
├── workflows/
│ ├── execute-analysis.md # 完整分析工作流
│ ├── visualize-analysis.md # 視覺化分析工作流
│ └── historical-episodes.md # 歷史事件對照工作流
├── references/
│ ├── methodology.md # 形狀比對與交叉驗證方法論
│ ├── data-sources.md # 資料來源與 FRED 系列代碼
│ ├── wudsho-mechanism.md # WUDSHO 指標機制說明
│ └── input-schema.md # 完整輸入參數定義
├── templates/
│ ├── output-json.md # JSON 輸出模板
│ └── output-markdown.md # Markdown 報告模板
├── scripts/
│ ├── pattern_detector.py # 主分析腳本
│ ├── visualize_pattern.py # 視覺化腳本
│ └── fetch_data.py # 資料抓取工具
└── examples/
└── sample_output.json # 範例輸出
</directory_structure>
What ships with it
16 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/sample_output.json 5.7 KB
- manifest.json 4.7 KB
- references/data-sources.md 4.9 KB
- references/input-schema.md 7.2 KB
- references/methodology.md 11 KB
- references/wudsho-mechanism.md 4.7 KB
- scripts/fetch_data.py 9.6 KB runs code
- scripts/pattern_detector.py 22 KB runs code
- scripts/visualize_pattern.py 33 KB runs code
- scripts/visualize_pre_covid.py 12 KB runs code
- skill.yaml 14 KB
- templates/output-json.md 8.8 KB
- templates/output-markdown.md 7.3 KB
- workflows/execute-analysis.md 4.4 KB
- workflows/historical-episodes.md 4.1 KB
- workflows/visualize-analysis.md 3.0 KB
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.
- 11d ago First seen · 322 lines · 86 tokens per session scan A 428e7a91186a
detect-fed-unamortized-discount-pattern is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 86 tokens to every session and 3,946 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.
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.
strategy-pivot-designer
Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.
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…
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.
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.
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.