analyze-copper-inventory-rebuild-signal

analyze-copper-inventory-rebuild-signal is a skill for Claude Code, Codex from fatfingererr/macro-skills. It costs 63 tokens per session (3,821 once invoked), scanned A, original, MIT.

A copper-market analysis workflow that uses warehouse-inventory changes to assess short-term price risk and the longer-term relative cheapness of copper. SHFE and COMEX are futures exchanges, and a z-score shows how unusual a recent inventory change is compared with its history.

In plain words
What is it for?
Use it to collect SHFE and COMEX copper inventories and copper prices, detect unusually fast inventory rebuilding or drawdown, and classify conditions as cautionary, neutral, supportive, cheap, fair, or rich.
Why use it?
It turns the vague observation that inventory is rebuilding quickly into measurable short-term caution and long-term valuation signals.

Skill for Claude CodeCodex

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

Good fit Use it to collect SHFE and COMEX copper inventories and copper prices, detect unusually fast inventory rebuilding or drawdown, and classify conditions as cautionary, neutral, supportive, cheap, fair, or rich.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fatfingererr/macro-skills/analyze-copper-inventory-rebuild-signal
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 analyze-copper-inventory-rebuild-signal
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 analyze-copper-inventory-rebuild-signal/plugin install analyze-copper-inventory-rebuild-signal 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-copper-inventory-rebuild-signal

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/analyze-copper-inventory-rebuild-signal"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/analyze-copper-inventory-rebuild-signal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,821 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.00063 $0.03821
Opus 5 $0.00032 $0.01911
Sonnet 5 $0.00013 $0.00764
Haiku 4.5 $0.00006 $0.00382

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

Security

Grade A, and why

analyze-copper-inventory-rebuild-signal 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 4 executable files (scripts/fetch_copper_data.py, scripts/fetch_shfe_inventory.py, scripts/inventory_signal_analyzer.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-copper-inventory-rebuild-signal/SKILL.md · 327 lines

How it starts

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

<essential_principles>

本技能將「肉眼看圖」轉換為可量化、可自動更新的雙層訊號系統:

層次 問題 核心指標 決策輸出
短線 是否「有點超前」? SHFE 回補速度 z-score + 庫存水位 CAUTION / NEUTRAL / SUPPORTIVE
長線 是否「仍偏便宜」? 銅價歷史分位數(10 年) CHEAP / FAIR / RICH

關鍵洞察:SHFE 庫存快速回補 + 水位偏高 → 常常貼近價格局部高點。

使用 Chrome CDP 全自動抓取 Highcharts 圖表數據,共需三類數據:

數據 來源 URL
SHFE 銅庫存 MacroMicro (CDP) https://en.macromicro.me/series/8743/copper-shfe-warehouse-stock
COMEX 銅庫存 MacroMicro (CDP) https://www.macromicro.me/series/8742/copper-comex-warehouse-stock
銅期貨價格 Yahoo Finance HG=F(COMEX 銅期貨連續近月)

口徑:庫存為可交割銅庫存(噸)、價格為收盤價(USD/lb)

將主觀「回補很快」轉化為客觀可比較的標準化指標:

rebuild_W = inv_t - inv_{t-W}  (W = 4 週)
z_score = (rebuild_W - μ) / σ   (μ, σ 為 3 年滾動)
  • z-score > 1.5:回補速度「異常快」
  • z-score > 2.0:回補速度「極端快」
  • z-score < -1.5:去庫存速度「異常快」

</essential_principles>

<quick_start>

全自動執行(無需手動操作 Chrome)

Step 1:安裝依賴

pip install requests websocket-client pandas numpy yfinance matplotlib

Step 2:一鍵抓取所有數據(SHFE + COMEX 庫存 + 銅價)

cd skills/analyze-copper-inventory-rebuild-signal/scripts
python fetch_copper_data.py

腳本會自動:

  • 啟動 Chrome 調試模式
  • 依序抓取 SHFE 和 COMEX 庫存(~80 秒)
  • 抓取銅期貨價格(Yahoo Finance)
  • 儲存到 cache/shfe_inventory.csvcache/comex_inventory.csvcache/copper_price.csv
  • 關閉 Chrome

Step 3:執行庫存訊號分析

python inventory_signal_analyzer.py

Step 4:生成視覺化圖表

python visualize_inventory_signal.py

輸出{專案根目錄}/output/copper_inventory_signal_YYYY-MM-DD.png

</quick_start>

  1. 快速檢查 - 查看當前 SHFE 庫存回補訊號狀態
  2. 完整分析 - 執行回補訊號與價格高點的歷史驗證
  3. 長期分位數 - 銅價歷史分位數判讀(10 年)
  4. 視覺化 - 生成 Bloomberg 風格分析圖表

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

路由後,執行對應命令。

<directory_structure>

analyze-copper-inventory-rebuild-signal/
├── SKILL.md                              # 本文件(路由器)
├── manifest.json                         # 技能元資料
├── skill.yaml                            # 前端展示元數據
├── scripts/
│   ├── fetch_copper_data.py              # 全自動 CDP 數據爬蟲(SHFE + COMEX + 價格)
│   ├── fetch_shfe_inventory.py           # SHFE 專用爬蟲(向下相容)
│   ├── inventory_signal_analyzer.py      # 核心分析邏輯
│   └── visualize_inventory_signal.py     # Bloomberg 風格視覺化
├── references/
│   ├── data-sources.md                   # 數據來源說明
│   ├── methodology.md                    # 方法論說明
│   └── historical-episodes.md            # 歷史事件對照
├── templates/
│   ├── output-json.md                    # JSON 輸出格式
│   └── output-markdown.md                # Markdown 輸出格式
├── workflows/
│   ├── quick-check.md                    # 快速檢查流程
│   ├── full-analysis.md                  # 完整分析流程
│   └── visualize.md                      # 視覺化流程
├── cache/
│   ├── shfe_inventory.csv                # SHFE 庫存快取
│   ├── comex_inventory.csv               # COMEX 庫存快取
│   └── copper_price.csv                  # 銅價快取
└── examples/
    └── sample_output.json                # 範例輸出

# 視覺化輸出位置(專案根目錄)
{專案根目錄}/output/
└── copper_inventory_signal_YYYY-MM-DD.png  # 輸出圖表(含日期)

</directory_structure>

<scripts_index>

Script Command Purpose
fetch_copper_data.py python fetch_copper_data.py 全自動抓取所有數據(SHFE + COMEX + 價格)
fetch_copper_data.py --force-refresh 強制重新抓取(忽略快取)
fetch_copper_data.py --source shfe 只抓取 SHFE 庫存
fetch_copper_data.py --source comex 只抓取 COMEX 庫存
fetch_copper_data.py --source price 只抓取銅價
inventory_signal_analyzer.py --quick 快速檢查當前訊號狀態
inventory_signal_analyzer.py --full 完整歷史驗證分析
inventory_signal_analyzer.py --long-term 長期價格分位數分析
visualize_inventory_signal.py 無參數 生成 Bloomberg 風格圖表(輸出到專案根目錄 output/)
visualize_inventory_signal.py -o path.png 指定輸出路徑
</scripts_index>

Read the full file on GitHub · 327 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 · 327 lines · 63 tokens per session scan A 406da9770804

Subscribe to this mod's changes

analyze-copper-inventory-rebuild-signal is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 63 tokens to every session and 3,821 once invoked, about $0.0003 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