analyze-silver-miner-metal-ratio

analyze-silver-miner-metal-ratio is a skill for Claude Code, Codex from fatfingererr/macro-skills. It costs 88 tokens per session (4,011 once invoked), scanned A, original, MIT.

A market analysis that compares silver-mining stocks with the price of silver to show whether mining companies look relatively expensive or cheap. It uses historical ranges to identify possible low or high zones and test scenarios.

In plain words
What is it for?
Use it to calculate the miner-to-silver ratio, rank its historical position, identify possible bottoms or tops, and estimate how much either price would need to change to reach a target ratio.
Why use it?
It helps separate a move in silver itself from a move in mining stocks, which can be affected by costs, debt, dilution, and other risks. The signals are reference points, not predictions or automatic buy signals.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is python scripts/ratio_plotter.py --quick --output-dir ../../output.

Good fit Use it to calculate the miner-to-silver ratio, rank its historical position, identify possible bottoms or tops, and estimate how much either price would need to change to reach a target ratio.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/fatfingererr/macro-skills
agentmods
npx agentmods add skills/fatfingererr/macro-skills/analyze-silver-miner-metal-ratio

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin analyze-silver-miner-metal-ratio/plugin install analyze-silver-miner-metal-ratio 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 analyze-silver-miner-metal-ratio

README.md
[![agentmods](https://agentmods.dev/badge/skills/fatfingererr/macro-skills/analyze-silver-miner-metal-ratio/github.svg)](https://agentmods.dev/skills/fatfingererr/macro-skills/analyze-silver-miner-metal-ratio)
Your own site
<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.

agentmods 80×15 button for analyze-silver-miner-metal-ratio

Your own site · 80×15
<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>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,011 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.00088 $0.04011
Opus 5 $0.00044 $0.02005
Sonnet 5 $0.00018 $0.00802
Haiku 4.5 $0.00009 $0.00401

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

Security

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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/ratio_analyzer.py, scripts/ratio_plotter.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/analyze-silver-miner-metal-ratio/SKILL.md · 347 lines

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. 礦業股可能有追趕空間(均值回歸邏輯)
  2. 或礦業股正確反映了結構性問題(成本、稀釋、地緣風險)

需結合基本面交叉驗證,而非盲目視為買入訊號。

目標:若比率要回到歷史頂部(或中位),需要什麼條件?

假設當前比率 = 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. 分位數判斷:當前比率在歷史的位置
  4. 類比事件:歷史底部區間的事件識別
  5. 前瞻驗證:底部事件後白銀的 1/2/3 年表現
  6. 情境推演:礦業股需漲多少 / 白銀需跌多少才回到頂部

輸出:當前狀態、歷史類比、情境推演、風險提示。

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

  1. 快速分析 - 使用預設參數(SIL / SI=F)計算當前比率狀態
  2. 完整分析 - 自訂參數進行情境分析(可選擇礦業股/金屬代理、分位門檻)
  3. 視覺化圖表 - 生成比率走勢圖,標記當前位置與分位數區間
  4. 歷史驗證 - 查看底部區間事件的前瞻報酬統計
  5. 情境推演 - 計算「回到頂部」需要的礦業股漲幅或白銀跌幅
  6. 方法論學習 - 了解比率邏輯與分位數解讀

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

Read the full file on GitHub · 347 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 · 347 lines · 88 tokens per session scan A a7d2c6661a0a

Subscribe to this mod's changes

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.

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