xiaodingdang2333/ai/commodity-analysis
Claude Code and agent skill by xiaodingdang2333/ai
- community
Checking that the SKILL.md file is still in the repository.
Commodity analysis (oil supply-demand balance / gold pricing / copper as an economic predictor / inventory cycles / futures premium-discount structure / seasonality), generating directional commodity signals.
Install
npx vskill@latest install xiaodingdang2333/ai/commodity-analysisSKILL.md
The same SKILL.md was published earlier as xiaodingdang2333/ai/commodity-analysis.
Commodity Analysis
Overview
Analyze commodities from four dimensions — supply-demand balance, pricing model, inventory cycle, and futures structure — and output directional signals suitable for backtesting. Focuses on crude oil (global pricing anchor), gold (safe haven + inflation hedge), and copper (economic barometer).
Core Concepts
1. Crude Oil Supply-Demand Balance
Key supply-side variables:
| Variable | Data Source | Frequency | Direction of Impact | |
|---|---|---|---|---|
| OPEC production | OPEC monthly report | Monthly | Production cuts → oil price ↑ | |
| US shale output | EIA weekly report | Weekly | Higher output → oil price ↓ | |
| Rig count (Baker Hughes) | Baker Hughes | Weekly | Leads production by 3-6 months | |
| Strategic Petroleum Reserve (SPR) | EIA | Weekly | SPR release → short-term oil price ↓ |
Key demand-side variables:
- IEA global oil demand forecast (quarterly)
- China crude imports (customs monthly data)
- US gasoline demand (EIA weekly report, implied demand)
- Global PMI (leads demand by 1-2 months)
Supply-demand balance signals:
2. Gold Pricing Framework
Four-factor model:
| Factor | Weight | Logic | Indicator | |
|---|---|---|---|---|
| Real rates | 40% | Real rates ↓ → lower opportunity cost of holding gold → gold ↑ | 10Y TIPS yield | |
| US dollar index | 25% | USD ↓ → gold becomes cheaper in pricing terms → gold ↑ | DXY | |
| Safe-haven demand | 20% | Risk ↑ → safe-haven buying → gold ↑ | VIX + geopolitical risk index | |
| Central-bank buying | 15% | Central-bank purchases → structural demand support | WGC quarterly report |
Practical rules:
- 10Y TIPS < 0%: strong support for gold (negative real rates mean negative holding cost)
- 10Y TIPS > 2%: pressure on gold (positive real rates reduce attractiveness)
- Correlation between DXY and gold is around -0.6, but not absolute (they both rose in 2022 due to safe-haven demand)
- Central-bank purchases >1000 tons / year (2022-2023 level): long-term structural bullish support
3. Dr. Copper as an Economic Predictor
Copper as a leading indicator:
- YoY copper-price change leads industrial production by about 2-3 months
- Copper / gold ratio is highly positively correlated with the US 10Y Treasury yield (
r > 0.7) - Copper breakout above the prior high confirms economic recovery
Copper fundamental tracking:
| Indicator | Data Source | Threshold | |
|---|---|---|---|
| LME copper inventory | LME daily report | <150k tons = tight | |
| SHFE copper inventory | SHFE weekly report | WoW decline >10% = tight | |
| Copper concentrate TC/RC | SMM | TC < $30/ton = tight mining supply | |
| China copper imports | Customs monthly report | YoY growth >10% = strong demand |
4. Inventory Cycle Analysis
Visible inventory vs hidden inventory:
- Visible inventory: published by exchanges (LME / SHFE / COMEX), transparent and trackable
- Hidden inventory: bonded areas / trader warehouses, opaque but potentially larger
- The true turning point in prices is the turning point in total inventory
Four inventory-cycle stages (using copper as example):
Signal mapping:
| Stage | Inventory Direction | Price Direction | Trading Signal | |
|---|---|---|---|---|
| Passive destocking | ↓ | ↑ | Long (best buying point) | |
| Active restocking | ↑ | ↑ | Keep long positions | |
| Passive restocking | ↑ | ↓ | Close longs (warning) | |
| Active destocking | ↓ | ↓ | Short or stay neutral |
5. Futures Premium / Discount Structure
Contango (futures > spot, normal market):
- Supply is abundant, and the market prices in carrying costs (storage + funding)
- Roll yield is negative (
roll yield < 0), unfavorable for long holders - Deep contango (
far month - near month > 5%) = severe oversupply
Backwardation (futures < spot, inverted market):
- Supply is tight, and spot premium reflects strong immediate demand
- Roll yield is positive (
roll yield > 0), favorable for long holders - Deep backwardation (
near month - far month > 3%) = squeeze or extreme shortage
Term-structure signal:
6. Seasonality
Oil seasonality:
- March-May: refinery maintenance ends + summer inventory build → seasonal rise (ahead of the "driving season")
- September-October: hurricane season (Gulf of Mexico) → supply disruption → higher volatility
- November-December: heating-oil demand → stronger diesel crack spread
Gold seasonality:
- January-February: Lunar New Year + Indian wedding-season physical demand → relatively strong
- July-August: traditional soft season → relatively weak
- October-November: Diwali + Christmas restocking → relatively strong
Copper seasonality:
- March-April: China construction season starts → demand recovery
- June-July: off-season inventory buildup → pressure
- September-October: "Golden September, Silver October" → demand recovery
Analysis Framework
Five-Step Commodity Analysis
- Supply-demand sets direction: is the balance in surplus or shortage? Which way are marginal variables moving?
- Inventory sets rhythm: which inventory-cycle stage are we in? Is a turning point close?
- Term structure confirms: contango or backwardation? Does it confirm the supply-demand judgment?
- Seasonality overlay: is seasonality currently a tailwind or a headwind?
- Macro validation: do the dollar / rates / risk appetite support the directional judgment?
Composite Scoring Template
Output Format
Notes
- Commodity data sources are fragmented (EIA / OPEC / LME / SHFE, etc.). This skill provides the analytical framework; data should be retrieved through
web-readeror entered manually - Futures prices include roll costs, so direct comparison across different contracts must account for expiry-roll effects
- Seasonal patterns are statistical averages and may be completely overwhelmed by fundamentals in a given year
- Gold has both commodity and financial attributes, and the financial side (rates / dollar) usually dominates short-term pricing
- Copper’s financial characteristics have strengthened since 2020 (copper futures are used as a macro hedge), so pure fundamental analysis may be insufficient
- Inventory data is lagged (hidden inventories cannot be tracked in real time), so cross-check with price and basis behavior
- This framework is for research backtesting only and does not constitute investment advice
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcodex/skills/vibe-trading/src/skills/commodity-analysis/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xiaodingdang2333/ai/commodity-analysis)