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-gas-fertilizer-contract-shockWrote 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-gas-fertilizer-contract-shock)<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/analyze-gas-fertilizer-contract-shock"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/analyze-gas-fertilizer-contract-shock/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-gas-fertilizer-contract-shock"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/analyze-gas-fertilizer-contract-shock.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.00078 | $0.03185 |
| Opus 5 | $0.00039 | $0.01592 |
| Sonnet 5 | $0.00016 | $0.00637 |
| Haiku 4.5 | $0.00008 | $0.00318 |
Grade A, and why
analyze-gas-fertilizer-contract-shock 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 — 328 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<essential_principles>
本技能專注於「用數據檢驗敘事」:
- 輸入:社群/新聞宣稱「天然氣暴漲導致化肥供應/價格異常」
- 輸出:時間序列上的因果假說檢驗結果
不做價格預測,只回答:「這個敘事在數據上是否有支撐?」
敘事成立需要三段條件同時滿足:
| 階段 | 條件 | 檢驗方式 |
|---|---|---|
| A 段 | 天然氣出現 shock regime | z-score 或斜率突破閾值 |
| B 段 | 化肥在 A 段後出現 spike | 同法檢驗,且起點晚於天然氣 |
| C 段 | 領先落後關係支持因果 | cross-correlation 顯示 gas 領先 fert |
若 A→B→C 成立,敘事有量化支撐;否則提供替代解釋。
使用 rolling z-score + 斜率雙重確認:
# z-score 偵測
z_t = (r_t - rolling_mean(r, window)) / rolling_std(r, window)
shock = z_t >= threshold_z # 預設 3.0
# 斜率偵測(補充)
slope_t = (price_t / price_{t-k} - 1) / k
shock |= slope_t >= threshold_slope # 預設 1.5%/day
連續 shock 日合併為 regime,輸出起點/終點/峰值。
Cross-correlation 結果解讀:
| lag 值 | 意義 | 敘事支撐度 |
|---|---|---|
| lag > 0 | 天然氣領先化肥 | 高(符合預期) |
| lag ≈ 0 | 同時變動 | 中(共同驅動) |
| lag < 0 | 化肥領先天然氣 | 低(敘事較弱) |
合理領先期:1-8 週(7-56 天)
主要:TradingEconomics(透過全自動 Chrome CDP 爬取) 備援:FRED Henry Hub + World Bank Pink Sheet
全自動 Chrome CDP 爬取: 腳本自動完成以下步驟,無需手動操作:
- 自動啟動 Chrome 調試模式
- 開啟 TradingEconomics 頁面並等待圖表載入
- 透過 WebSocket 連接執行 JavaScript 提取 Highcharts 數據
- 自動導航到多個商品頁面(如天然氣→化肥)
- 完成後自動關閉 Chrome
完全繞過 Cloudflare,無需手動驗證。
</essential_principles>
輸出三層分析:
- Shock Regimes: 天然氣與化肥的拋物線/暴衝區間
- Lead-Lag Test: 領先落後相關分析
- Narrative Assessment: 敘事可信度判斷
<quick_start>
全自動模式:一鍵完成數據抓取、分析與視覺化
腳本會自動啟動 Chrome、抓取數據、關閉 Chrome,無需手動操作。
Step 1:安裝依賴
pip install requests websocket-client pandas numpy matplotlib scipy
Step 2:全自動抓取數據(自動啟動/關閉 Chrome)
cd scripts
python fetch_te_data.py --symbol natural-gas --symbol urea
Step 3:執行因果假說分析
python gas_fertilizer_analyzer.py \
--gas-file ../data/cache/natural-gas.csv \
--fert-file ../data/cache/urea.csv \
--output ../data/analysis_result.json
Step 4:生成視覺化圖表(Bloomberg 風格)
python visualize_shock_regimes.py
# 自動輸出到: output/gas_fert_shock_YYYY-MM-DD.png
輸出範例:
{
"signal": "narrative_supported",
"confidence": "medium",
"gas_shock_regimes": [
{"start": "2026-01-20", "peak": "2026-01-22", "regime_return_pct": 29.1}
],
"fert_spike_regimes": [
{"start": "2025-10-27", "peak": "2025-10-27", "regime_return_pct": 0.0}
],
"lead_lag_test": {
"best_lag_days_gas_leads_fert": 21,
"best_corr": 0.131
},
"interpretation": "天然氣領先化肥約 21 天,敘事有量化支撐"
}
注意:首次執行時,Chrome 會自動啟動並在背景抓取數據(約 60 秒),完成後自動關閉。
</quick_start>
- 快速檢查 - 查看最近是否有天然氣 shock 及化肥跟隨
- 完整分析 - 執行三段式因果檢驗並生成報告
- 合約對沖假說 - 輸入合約價格,計算價差壓力指標
- 方法論學習 - 了解 shock 偵測與領先落後分析原理
請選擇或直接提供分析參數。
路由後,閱讀對應文件並執行。
<directory_structure>
analyze-gas-fertilizer-contract-shock/
├── SKILL.md # 本文件(路由器)
├── skill.yaml # 前端展示元數據
├── manifest.json # 技能元資料
├── workflows/
│ ├── analyze.md # 完整三段式分析工作流
│ ├── quick-check.md # 快速檢查工作流
│ └── hedge-hypothesis.md # 合約對沖假說分析
├── references/
│ ├── data-sources.md # Chrome CDP 爬蟲說明
│ ├── methodology.md # Shock 偵測與領先落後方法論
│ ├── input-schema.md # 輸入參數定義
│ └── historical-episodes.md # 歷史案例對照
├── templates/
│ ├── output-json.md # JSON 輸出模板
│ └── output-markdown.md # Markdown 報告模板
├── scripts/
│ ├── fetch_te_data.py # TradingEconomics CDP 爬蟲
│ ├── gas_fertilizer_analyzer.py # 主分析腳本
│ └── visualize_shock_regimes.py # Shock regime 視覺化
├── data/ # 數據快取目錄
│ └── cache/ # 快取檔案
└── 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 3.6 KB
- manifest.json 3.7 KB
- methodology.md 2.6 KB
- references/data-sources.md 10 KB
- references/historical-episodes.md 4.6 KB
- references/input-schema.md 7.4 KB
- references/methods.md 7.7 KB
- scripts/fetch_te_data.py 31 KB runs code
- scripts/gas_fertilizer_analyzer.py 17 KB runs code
- scripts/visualize_shock_regimes.py 12 KB runs code
- skill.yaml 14 KB
- templates/output-json.md 6.4 KB
- templates/output-markdown.md 6.8 KB
- workflows/analyze.md 7.6 KB
- workflows/hedge-hypothesis.md 3.7 KB
- workflows/quick-check.md 3.8 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 · 328 lines · 78 tokens per session scan A 14d5f1f47674
analyze-gas-fertilizer-contract-shock is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 78 tokens to every session and 3,185 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.