Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/fatfingererr/macro-skillsnpx agentmods add skills/fatfingererr/macro-skills/analyze-silver-miner-metal-ratioWrote 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/analyze-silver-miner-metal-ratio)<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/analyze-silver-miner-metal-ratio"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/analyze-silver-miner-metal-ratio/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/analyze-silver-miner-metal-ratio"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/analyze-silver-miner-metal-ratio.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.00088 | $0.04011 |
| Opus 5 | $0.00044 | $0.02005 |
| Sonnet 5 | $0.00018 | $0.00802 |
| Haiku 4.5 | $0.00009 | $0.00401 |
Grade A, and why
analyze-silver-miner-metal-ratio 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.
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 — 347 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<essential_principles>
礦業股/金屬比率(Miner-to-Metal Ratio):
ratio_t = miner_price_t / metal_price_t
其中:
- miner_price:銀礦股代表(ETF 如 SIL/SILJ,或自建礦業股指數)
- metal_price:白銀價格(期貨 SI=F、現貨 XAGUSD、ETF SLV)
此比率衡量「礦業股相對於金屬本體」的估值水位:
- 比率高:礦業股相對白銀偏貴(可能過度樂觀、槓桿溢價高)
- 比率低:礦業股相對白銀偏便宜(可能被低估、或反映成本/股權稀釋風險)
使用歷史分位數(Percentile Rank)判斷當前比率位置:
| 分位數區間 | 標籤 | 直覺 |
|---|---|---|
| ≤ 20% | bottom (底部) | 礦業股相對白銀歷史上很便宜 |
| 20-40% | low (偏低) | 礦業股相對估值偏低 |
| 40-60% | neutral (中性) | 歷史中位區間 |
| 60-80% | high (偏高) | 礦業股相對估值偏高 |
| ≥ 80% | top (頂部) | 礦業股相對白銀歷史上很貴 |
底部區間不等於白銀必漲:可能是礦業股因成本/稀釋被合理定價。
當出現「比率低 + 白銀高」的組合:
- 比率處於底部區:礦業股相對白銀偏便宜
- 白銀處於高位:金屬價格已在歷史高檔
此「背離」意味著:
- 礦業股可能有追趕空間(均值回歸邏輯)
- 或礦業股正確反映了結構性問題(成本、稀釋、地緣風險)
需結合基本面交叉驗證,而非盲目視為買入訊號。
目標:若比率要回到歷史頂部(或中位),需要什麼條件?
假設當前比率 = 1.14,目標比率(頂部門檻)= 2.45:
情境 A:白銀不變,礦業股需漲多少?
miner_multiplier = target_ratio / current_ratio
= 2.45 / 1.14 = 2.15x (需漲 115%)
情境 B:礦業股不變,白銀需跌多少?
metal_multiplier = current_ratio / target_ratio
= 1.14 / 2.45 = 0.46 (需跌 54%)
此推演提供「極端情境」的量化參考,非預測。
- 頻率選擇:長週期訊號建議使用週頻(1wk)或月頻(1mo)
- 平滑視窗:可選 4 週或 3 個月移動平均降低雜訊
- 事件去重:類比事件間隔需 ≥ min_separation_days(如 180 天)
本 skill 使用 yfinance 取得 ETF/期貨數據,預設週頻對齊。
</essential_principles>
- 數據整合:取得礦業股代理與白銀價格序列
- 比率計算:計算相對比率並可選平滑
- 分位數判斷:當前比率在歷史的位置
- 類比事件:歷史底部區間的事件識別
- 前瞻驗證:底部事件後白銀的 1/2/3 年表現
- 情境推演:礦業股需漲多少 / 白銀需跌多少才回到頂部
輸出:當前狀態、歷史類比、情境推演、風險提示。
<quick_start>
最快的方式:執行預設情境分析
cd skills/analyze-silver-miner-metal-ratio
pip install pandas numpy yfinance matplotlib # 首次使用
python scripts/ratio_analyzer.py --quick
生成視覺化圖表(基本版)
python scripts/ratio_plotter.py --quick --output-dir ../../output
生成完整版圖表(含底部事件、前瞻報酬統計)
python scripts/ratio_plotter.py --comprehensive --start-date 2010-01-01 --output-dir ../../output
圖表輸出路徑:
- 基本版:
output/sil_silver_ratio_YYYY-MM-DD.png - 完整版:
output/sil_silver_ratio_comprehensive_YYYY-MM-DD.png
輸出範例:
{
"skill": "analyze_silver_miner_metal_ratio",
"current": {
"ratio": 1.14,
"ratio_percentile": 18.7,
"zone": "bottom",
"bottom_threshold": 1.16,
"top_threshold": 2.45
},
"history_analogs": {
"bottom_event_dates": ["2010-08-06", "2016-01-29", "2020-03-20"],
"forward_metal_returns": {
"252": {"count": 3, "median": 0.42, "win_rate": 1.0}
}
},
"scenarios": {
"target": "return_to_top",
"miner_multiplier_if_metal_flat": 2.15,
"metal_drop_pct_if_miner_flat": 0.54
}
}
完整情境分析:
python scripts/ratio_analyzer.py \
--miner-proxy SIL \
--metal-proxy SI=F \
--start-date 2008-01-01 \
--freq 1wk \
--smoothing-window 4 \
--bottom-quantile 0.20 \
--top-quantile 0.80 \
--output result.json
</quick_start>
- 快速分析 - 使用預設參數(SIL / SI=F)計算當前比率狀態
- 完整分析 - 自訂參數進行情境分析(可選擇礦業股/金屬代理、分位門檻)
- 視覺化圖表 - 生成比率走勢圖,標記當前位置與分位數區間
- 歷史驗證 - 查看底部區間事件的前瞻報酬統計
- 情境推演 - 計算「回到頂部」需要的礦業股漲幅或白銀跌幅
- 方法論學習 - 了解比率邏輯與分位數解讀
請選擇或直接提供分析參數。
What ships with it
13 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 3.2 KB
- manifest.json 2.5 KB
- methodology.md 2.4 KB
- references/data-sources.md 4.9 KB
- references/input-schema.md 4.6 KB
- references/method.md 5.4 KB
- scripts/ratio_analyzer.py 19 KB runs code
- scripts/ratio_plotter.py 20 KB runs code
- skill.yaml 23 KB
- templates/output-json.md 6.5 KB
- templates/output-markdown.md 5.0 KB
- workflows/analyze.md 5.2 KB
- workflows/data-research.md 4.2 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.
- 12d ago First seen · 347 lines · 88 tokens per session scan A a7d2c6661a0a
analyze-silver-miner-metal-ratio is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 88 tokens to every session and 4,011 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.
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.
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.