Four new skills: yield predictor (40yr weather-yield regression), Parana River drought logistics risk (watershed lag model), global crop anomaly scanner (32 regions, 30yr climatology), and planting window advisor (farmer-facing GO/WAIT/RISK decision tool). Updated team skill library. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2023 lines
108 KiB
Text
2023 lines
108 KiB
Text
Simulated Interaction: VS Code Copilot + agent-skill-creator
|
||
=============================================================
|
||
|
||
---
|
||
|
||
Setup (one time, already done)
|
||
|
||
git clone https://github.com/FrancyJGLisboa/agent-skill-creator.git ~/.claude/skills/agent-skill-creator
|
||
|
||
VS Code Copilot finds it at ~/.claude/skills/ automatically.
|
||
|
||
---
|
||
|
||
The Interaction
|
||
|
||
The user opens VS Code, opens Copilot Chat (Agent mode), and types:
|
||
|
||
User: /agent-skill-creator Every month I pull customer churn data from our Stripe API and Mixpanel, segment customers by plan tier and usage drop-off, calculate churn risk scores, and generate a PDF report for the leadership team. Here's our current script: scripts/churn_analysis.py
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
I'll build a complete agent skill from your churn analysis workflow. Let me start by reading your existing script and understanding the full picture.
|
||
|
||
Reading scripts/churn_analysis.py...
|
||
|
||
I can see this pulls from Stripe's subscription API and Mixpanel's engagement endpoint, segments by 3 plan tiers, and uses a weighted scoring model. Let me uncover the implicit requirements before building.
|
||
|
||
Implicit requirements I've identified:
|
||
- Error handling when Stripe/Mixpanel APIs are unreachable
|
||
- Date range defaults (last 30 days) vs custom ranges
|
||
- The PDF needs the Acme Corp header and formatting your leadership team expects
|
||
- Churn risk thresholds (>0.7 = high, >0.4 = medium) are hardcoded — should be configurable
|
||
- No handling for new customers with insufficient data
|
||
|
||
Building the skill now...
|
||
|
||
(Copilot creates the full skill directory)
|
||
|
||
customer-churn-skill/
|
||
├── SKILL.md # Activation: /customer-churn-skill
|
||
├── scripts/
|
||
│ ├── churn_analysis.py # Core analysis (refactored from your script)
|
||
│ ├── stripe_connector.py # Stripe API integration
|
||
│ ├── mixpanel_connector.py # Mixpanel API integration
|
||
│ └── pdf_report.py # PDF generation with formatting
|
||
├── references/
|
||
│ ├── scoring-model.md # Churn risk scoring methodology
|
||
│ ├── api-endpoints.md # Stripe + Mixpanel endpoint docs
|
||
│ └── report-format.md # PDF layout specification
|
||
├── assets/
|
||
│ └── report_template.html # PDF template
|
||
├── install.sh # Cross-platform installer (14 tools)
|
||
└── README.md # Installation instructions
|
||
|
||
Validation results:
|
||
- Spec compliance: PASSED (frontmatter, naming, structure, references)
|
||
- Security scan: PASSED (no hardcoded API keys, credentials use environment variables)
|
||
|
||
Installed at: ~/.claude/skills/customer-churn-skill
|
||
|
||
To use it, start a new chat and type:
|
||
/customer-churn-skill Generate the monthly churn report for March
|
||
|
||
Or with custom parameters:
|
||
/customer-churn-skill Analyze churn for Enterprise tier only, last 90 days
|
||
|
||
Want to share this skill with your team so they can install it too?
|
||
|
||
---
|
||
|
||
User: Yes, we use GitHub
|
||
|
||
Copilot:
|
||
|
||
Setting up sharing...
|
||
|
||
cd customer-churn-skill
|
||
git init
|
||
git add -A
|
||
git commit -m "feat: Initial skill — customer-churn-skill"
|
||
gh repo create customer-churn-skill --private --source=. --push
|
||
|
||
Done! Share this with your team:
|
||
|
||
# For VS Code Copilot / Claude Code:
|
||
git clone https://github.com/your-org/customer-churn-skill.git ~/.claude/skills/customer-churn-skill
|
||
|
||
# For Codex CLI / Gemini CLI / Kiro:
|
||
git clone https://github.com/your-org/customer-churn-skill.git ~/.agents/skills/customer-churn-skill
|
||
|
||
# For Cursor (per-project):
|
||
git clone https://github.com/your-org/customer-churn-skill.git .cursor/rules/customer-churn-skill
|
||
|
||
# Or install everywhere at once:
|
||
npx skills add your-org/customer-churn-skill
|
||
|
||
Your colleagues paste one line, and they can type /customer-churn-skill in their agent.
|
||
|
||
---
|
||
|
||
Later that week — a colleague uses it
|
||
|
||
The colleague cloned it. They open VS Code Copilot and type:
|
||
|
||
Colleague: /customer-churn-skill Which Enterprise customers are highest churn risk this month? Include a breakdown by usage drop-off category.
|
||
|
||
Copilot (loading customer-churn-skill):
|
||
|
||
Running churn analysis for Enterprise tier, March 2026...
|
||
|
||
Connecting to Stripe API... (uses STRIPE_API_KEY from env)
|
||
Connecting to Mixpanel... (uses MIXPANEL_TOKEN from env)
|
||
|
||
Enterprise Churn Risk Report — March 2026
|
||
|
||
| Customer | Plan | Risk Score | Drop-off Category | MRR |
|
||
|---------------|-----------------|------------|---------------------|---------|
|
||
| Acme Corp | Enterprise Plus | 0.89 | Feature abandonment | $12,400 |
|
||
| DataFlow Inc | Enterprise | 0.76 | Login frequency | $8,200 |
|
||
| NorthStar Ltd | Enterprise | 0.72 | Support escalation | $6,800 |
|
||
| ... | | | | |
|
||
|
||
7 Enterprise accounts flagged as high-risk ($94,200 combined MRR at risk).
|
||
|
||
PDF report generated at ./reports/churn-enterprise-2026-03.pdf.
|
||
Want me to email this to the leadership distribution list?
|
||
|
||
---
|
||
|
||
Key difference from raw Copilot
|
||
|
||
Without the skill, the colleague would have had to explain: which APIs, which endpoints, what scoring model, what PDF format, what "churn risk" means in their org. With the skill installed, they just say what they want and it already knows all of that.
|
||
|
||
|
||
=============================================================
|
||
AGRICULTURE COMMODITY RESEARCH TEAM — FULL SCENARIO
|
||
=============================================================
|
||
|
||
Context: A 6-person ag commodity research team at a trading firm. They cover soybeans, corn, wheat, and coffee. Every analyst repeats the same data-pulling, report-building, and market-monitoring workflows daily. The team lead decides to turn these into shared skills.
|
||
|
||
|
||
=============================================================
|
||
SKILL 1: WASDE Report Analyzer
|
||
=============================================================
|
||
|
||
The senior grain analyst opens VS Code Copilot:
|
||
|
||
User: /agent-skill-creator Every month when USDA releases the WASDE report, I download the PDF from usda.gov, extract the supply and demand tables for corn, soybeans, and wheat, compare the new estimates against last month and against the market consensus (which I pull from a Bloomberg terminal CSV export), flag any revisions greater than 2%, and write a 2-page brief for the trading desk with a "surprise score" for each commodity. Here's last month's brief as an example: references/wasde-brief-feb-2026.pdf
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
I'll build a skill from your WASDE analysis workflow. Let me read your example brief first.
|
||
|
||
Reading references/wasde-brief-feb-2026.pdf...
|
||
|
||
I can see the structure: header with release date and report number, a table per commodity showing Old USDA / New USDA / Consensus / Surprise, then a narrative section interpreting the numbers for the trading desk. Let me identify implicit requirements.
|
||
|
||
Implicit requirements I've identified:
|
||
- WASDE PDF table extraction needs to handle USDA's inconsistent formatting across years
|
||
- "Consensus" comes from a Bloomberg CSV export — need to define the expected column format
|
||
- Surprise score formula: |(New USDA - Consensus)| / Consensus * 100, flagged if > 2%
|
||
- The brief must separate US domestic vs world balance sheets
|
||
- Ending stocks and stocks-to-use ratio are the key numbers the desk cares about
|
||
- Historical comparison should include the 5-year average, not just last month
|
||
- Wheat needs to be split: all wheat, HRW, SRW, HRS separately
|
||
- The desk wants this within 30 minutes of USDA release — speed matters
|
||
|
||
Building the skill now...
|
||
|
||
wasde-analyzer-skill/
|
||
├── SKILL.md # Activation: /wasde-analyzer-skill
|
||
├── scripts/
|
||
│ ├── wasde_parser.py # USDA PDF table extraction
|
||
│ ├── consensus_loader.py # Bloomberg CSV import + validation
|
||
│ ├── surprise_calculator.py # Surprise score engine
|
||
│ ├── brief_generator.py # 2-page PDF brief builder
|
||
│ └── historical_compare.py # 5-year avg + month-over-month
|
||
├── references/
|
||
│ ├── wasde-table-format.md # USDA table layout documentation
|
||
│ ├── commodity-codes.md # USDA commodity ID mappings
|
||
│ ├── surprise-methodology.md # Surprise score formula + thresholds
|
||
│ └── brief-template.md # Trading desk brief structure
|
||
├── assets/
|
||
│ ├── brief_template.html # PDF template with firm header
|
||
│ └── sample_consensus.csv # Expected Bloomberg export format
|
||
├── install.sh # Cross-platform installer (14 tools)
|
||
└── README.md
|
||
|
||
Validation: PASSED | Security: PASSED
|
||
Installed at: ~/.claude/skills/wasde-analyzer-skill
|
||
|
||
To use it:
|
||
/wasde-analyzer-skill Analyze the March 2026 WASDE, consensus file at data/bloomberg-consensus-mar26.csv
|
||
|
||
Want to share this with your team?
|
||
|
||
User: Yes
|
||
|
||
Copilot:
|
||
|
||
gh repo create acme-trading/wasde-analyzer-skill --private --source=. --push
|
||
|
||
Share with your team:
|
||
git clone https://github.com/acme-trading/wasde-analyzer-skill.git ~/.claude/skills/wasde-analyzer-skill
|
||
|
||
|
||
--- On WASDE release day, a junior analyst uses it ---
|
||
|
||
Junior Analyst: /wasde-analyzer-skill WASDE just dropped. Consensus file is at data/bloomberg-mar26.csv. Run the full analysis for corn, soybeans, and wheat.
|
||
|
||
Copilot (loading wasde-analyzer-skill):
|
||
|
||
Downloading March 2026 WASDE from USDA...
|
||
Extracting supply/demand tables...
|
||
Loading consensus from data/bloomberg-mar26.csv...
|
||
Calculating surprise scores...
|
||
|
||
WASDE SURPRISE BRIEF — March 11, 2026
|
||
|
||
CORN (US)
|
||
| Metric | Feb USDA | Mar USDA | Consensus | Surprise |
|
||
|---------------------|----------|----------|-----------|----------|
|
||
| Production (mil bu) | 15,143 | 15,143 | 15,143 | 0.0% |
|
||
| Ending Stocks | 1,540 | 1,490 | 1,525 | -2.3% * |
|
||
| Stocks/Use | 10.4% | 10.1% | 10.3% | |
|
||
|
||
* BULLISH SURPRISE: USDA cut corn ending stocks 50 mil bu below consensus.
|
||
Driven by higher ethanol demand estimate (+25 mil bu) and feed/residual
|
||
revision. This is the tightest S/U ratio since 2023/24.
|
||
|
||
SOYBEANS (US)
|
||
| Metric | Feb USDA | Mar USDA | Consensus | Surprise |
|
||
|---------------------|----------|----------|-----------|----------|
|
||
| Production (mil bu) | 4,366 | 4,366 | 4,366 | 0.0% |
|
||
| Ending Stocks | 380 | 370 | 385 | -3.9% * |
|
||
| Stocks/Use | 8.6% | 8.4% | 8.7% | |
|
||
|
||
* BULLISH SURPRISE: Crush raised 15 mil bu, exports raised 10 mil bu.
|
||
Brazil's crop estimate unchanged at 169 MMT — market expected a cut.
|
||
|
||
WHEAT (ALL — US)
|
||
| Metric | Feb USDA | Mar USDA | Consensus | Surprise |
|
||
|---------------------|----------|----------|-----------|----------|
|
||
| Ending Stocks | 794 | 798 | 790 | +1.0% |
|
||
|
||
No surprise. Wheat largely unchanged. HRW stocks marginally higher on
|
||
lower food use estimate.
|
||
|
||
OVERALL SURPRISE SCORE: 6.2 / 10 (Moderately bullish grains)
|
||
|
||
PDF brief generated: reports/wasde-brief-2026-03-11.pdf
|
||
|
||
Key takeaway for the desk: Corn and beans both tighter than expected.
|
||
The corn stocks cut is the headline — first sub-1,500 ending stocks
|
||
estimate this marketing year. Watch the May corn contract for a gap
|
||
higher on the open.
|
||
|
||
Want me to email this to the trading desk distribution list?
|
||
|
||
|
||
=============================================================
|
||
SKILL 2: Crop Condition & Weather Monitor
|
||
=============================================================
|
||
|
||
The weather/crop analyst on the team creates another skill:
|
||
|
||
User: /agent-skill-creator Every Monday during growing season (April-October) I check the USDA Crop Progress report for corn and soybean condition ratings, compare good/excellent percentages against the 5-year average and last year, pull 7-day and 14-day weather forecasts from NOAA for the Corn Belt states (Iowa, Illinois, Indiana, Minnesota, Nebraska, Ohio), check soil moisture from the US Drought Monitor, and write a "Crop & Weather Weekly" for our research clients. I also maintain a chart tracking the condition index through the season. Here are my notes on how I calculate the crop condition index: references/condition-index-formula.txt
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
Reading references/condition-index-formula.txt...
|
||
|
||
I see — you use the Brugler weighted index: (Very Poor * 1 + Poor * 2 + Fair * 3 + Good * 4 + Excellent * 5) / 5. This gives a single score out of 100. Let me build this.
|
||
|
||
Implicit requirements I've identified:
|
||
- Crop Progress data comes from USDA NASS Quick Stats API
|
||
- NOAA forecast needs to cover precipitation AND temperature (GDD accumulation)
|
||
- Drought Monitor categories: D0-D4 mapped to severity scores
|
||
- Growing Degree Days (GDD) tracking: base 50F for corn, base 50F for soybeans
|
||
- Client report needs both narrative + embedded charts (condition index trend, precip map)
|
||
- State-level breakdown matters — an Iowa drought doesn't offset Illinois rain
|
||
- The weekly cadence means the skill should know what "week" of the growing season it is
|
||
- Planting progress in April-May, then shifts to condition ratings June-October
|
||
|
||
Building...
|
||
|
||
crop-weather-weekly-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── crop_progress.py # USDA NASS API — condition ratings + planting progress
|
||
│ ├── weather_forecast.py # NOAA 7/14-day forecast by state
|
||
│ ├── drought_monitor.py # US Drought Monitor data pull
|
||
│ ├── condition_index.py # Brugler weighted index calculator
|
||
│ ├── gdd_tracker.py # Growing degree day accumulation
|
||
│ ├── charts.py # Condition trend + precip charts
|
||
│ └── weekly_report.py # PDF/HTML report builder
|
||
├── references/
|
||
│ ├── corn-belt-states.md # State FIPS codes, county groupings
|
||
│ ├── condition-methodology.md # Index formula, historical baselines
|
||
│ ├── gdd-requirements.md # GDD targets by growth stage
|
||
│ └── client-report-format.md # Report layout spec
|
||
├── assets/
|
||
│ └── report_template.html
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED | Security: PASSED
|
||
Installed at: ~/.claude/skills/crop-weather-weekly-skill
|
||
|
||
Share with your team?
|
||
|
||
User: Yes, same GitHub org
|
||
|
||
Copilot:
|
||
|
||
gh repo create acme-trading/crop-weather-weekly-skill --private --source=. --push
|
||
|
||
Done! Your team:
|
||
git clone https://github.com/acme-trading/crop-weather-weekly-skill.git ~/.claude/skills/crop-weather-weekly-skill
|
||
|
||
|
||
--- Monday morning during growing season ---
|
||
|
||
Analyst: /crop-weather-weekly-skill Generate the Crop & Weather Weekly for the week of July 14, 2026. Focus on the drought situation in western Iowa and Nebraska.
|
||
|
||
Copilot (loading crop-weather-weekly-skill):
|
||
|
||
Pulling USDA Crop Progress (released 4:00pm ET yesterday)...
|
||
Pulling NOAA 7-day and 14-day forecasts for Corn Belt...
|
||
Pulling US Drought Monitor (updated Thursday)...
|
||
Calculating condition indices...
|
||
|
||
CROP & WEATHER WEEKLY — July 14, 2026
|
||
|
||
CORN CONDITION
|
||
| State | G/E This Week | G/E Last Week | G/E 5yr Avg | Condition Index |
|
||
|-----------|---------------|---------------|-------------|-----------------|
|
||
| Iowa | 54% | 61% | 68% | 322 (below avg) |
|
||
| Illinois | 71% | 70% | 66% | 361 (above avg) |
|
||
| Indiana | 68% | 67% | 63% | 355 (above avg) |
|
||
| Minnesota | 63% | 64% | 65% | 345 (at avg) |
|
||
| Nebraska | 48% | 55% | 62% | 308 (well below)|
|
||
| Ohio | 72% | 71% | 64% | 362 (above avg) |
|
||
| NATIONAL | 62% | 64% | 65% | 344 |
|
||
|
||
Week-over-week: National corn conditions slipped 2 points. The decline is
|
||
concentrated in the western Corn Belt — Iowa dropped 7 points and Nebraska
|
||
dropped 7 points. Eastern Belt is steady to improving.
|
||
|
||
DROUGHT SITUATION
|
||
Western Iowa: 43% of the state now in D2 (severe drought), up from 31%
|
||
last week. The I-80 corridor west of Des Moines through Council Bluffs is
|
||
the epicenter. Subsoil moisture rated 62% short/very short.
|
||
|
||
Nebraska: 51% in D1 or worse. The Platte River valley from Grand Island
|
||
to North Platte hasn't received meaningful rain in 23 days. Center-pivot
|
||
irrigation is running but aquifer draw-down is being reported.
|
||
|
||
WEATHER OUTLOOK
|
||
7-day: A ridge holds over the western Plains through Thursday. Temps
|
||
100-105F in western Iowa/Nebraska. No significant precip until a cold
|
||
front arrives Saturday with scattered storms (0.25-0.75 inches, not
|
||
drought-breaking).
|
||
|
||
14-day: GFS and Euro diverge after day 8. Euro shows the ridge breaking
|
||
down with a pattern change toward more active weather. GFS keeps the
|
||
ridge. If the Euro verifies, meaningful relief arrives July 25-28.
|
||
|
||
GDD ACCUMULATION (corn, base 50F, since April 15)
|
||
| State | Actual GDD | Normal GDD | Deviation |
|
||
|-----------|------------|------------|-----------|
|
||
| Iowa | 1,842 | 1,710 | +132 (ahead — heat stress risk) |
|
||
| Illinois | 1,920 | 1,805 | +115 |
|
||
| Nebraska | 1,780 | 1,690 | +90 |
|
||
|
||
KEY TAKEAWAY: Western Corn Belt stress is accelerating during pollination
|
||
week for early-planted corn in Iowa and Nebraska. If the Euro's pattern
|
||
change doesn't verify, we could see another 3-5 point condition drop
|
||
next week. The east is fine. This is a "tale of two Corn Belts" story.
|
||
|
||
National corn condition index at 344 is the lowest for this week since
|
||
2022 (338) but well above 2012 drought (278).
|
||
|
||
[Condition Index Trend Chart embedded — shows 2026 line dipping below
|
||
5yr avg band, with 2012 and 2022 comparison lines]
|
||
|
||
PDF report generated: reports/crop-weather-weekly-2026-07-14.pdf
|
||
|
||
Want me to email this to the client distribution list?
|
||
|
||
|
||
=============================================================
|
||
SKILL 3: Basis Tracker & Export Monitor
|
||
=============================================================
|
||
|
||
The logistics/basis analyst creates a third skill:
|
||
|
||
User: /agent-skill-creator I track soybean and corn basis at 12 river elevators along the Mississippi and Illinois rivers. Every day I pull bids from DTN/Progressive Farmer, calculate basis vs the nearby CBOT futures contract, compare to the 3-year seasonal average, and flag any locations where basis moved more than 5 cents in a day. I also pull weekly USDA Export Inspections and Export Sales data to see if physical demand explains the basis moves. On Fridays I write a "Basis & Exports Weekly" for the team. Here's my spreadsheet with the 12 elevator locations and their historical basis patterns: data/elevator-basis-history.xlsx
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
Reading data/elevator-basis-history.xlsx...
|
||
|
||
I see 12 elevators: Davenport IA, Muscatine IA, Burlington IA, Quincy IL, Beardstown IL, Havana IL, Peoria IL, Henry IL, Peru IL, St. Louis MO, Memphis TN, New Orleans LA (CIF Gulf). Each has daily basis history back to 2023. Let me build this.
|
||
|
||
Implicit requirements:
|
||
- "Nearby futures" rolls on first notice day — need a roll calendar
|
||
- Gulf basis (CIF NOLA) is the anchor — interior basis derives from it
|
||
- Barge freight rates affect interior basis — need to track St. Louis-Gulf freight
|
||
- Export Inspections = actual loadings (weekly, lagged). Export Sales = commitments (weekly, Thursday release)
|
||
- China/unknown destinations buying pattern is the key signal in export data
|
||
- Basis inversions between elevator locations signal logistical bottlenecks
|
||
- Harvest basis (Sep-Nov) behaves completely differently than non-harvest — seasonal model must account for this
|
||
|
||
Building...
|
||
|
||
basis-export-tracker-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── basis_scraper.py # DTN bid scraping for 12 elevators
|
||
│ ├── futures_reference.py # CBOT nearby contract + roll calendar
|
||
│ ├── basis_calculator.py # Basis computation + 3yr seasonal avg
|
||
│ ├── alert_engine.py # 5-cent daily move alerts
|
||
│ ├── export_inspections.py # USDA weekly export inspections
|
||
│ ├── export_sales.py # USDA weekly export sales
|
||
│ ├── barge_freight.py # St. Louis-Gulf freight rates
|
||
│ └── weekly_report.py # Friday summary builder
|
||
├── references/
|
||
│ ├── elevator-locations.md # 12 locations, river mile markers, capacity
|
||
│ ├── roll-calendar.md # CBOT futures roll schedule
|
||
│ ├── seasonal-patterns.md # Basis seasonality by location
|
||
│ └── export-data-sources.md # USDA FAS endpoints
|
||
├── assets/
|
||
│ └── elevator_locations.json # Lat/long + DTN bid codes
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED | Security: PASSED
|
||
Installed at: ~/.claude/skills/basis-export-tracker-skill
|
||
|
||
Shared to: github.com/acme-trading/basis-export-tracker-skill
|
||
|
||
|
||
--- Daily use by the team ---
|
||
|
||
Trader: /basis-export-tracker-skill What happened to corn basis at the river yesterday? I saw Gulf bids jumped.
|
||
|
||
Copilot (loading basis-export-tracker-skill):
|
||
|
||
Pulling yesterday's bids (March 3, 2026)...
|
||
|
||
CORN BASIS DAILY SNAPSHOT — March 3, 2026 (vs May 2026 CBOT)
|
||
|
||
| Location | Bid | Basis | Prev | Change | 3yr Avg | vs Avg |
|
||
|----------------|---------|--------|--------|--------|---------|---------|
|
||
| CIF NOLA | $4.82 | +38 | +30 | +8 * | +22 | +16 |
|
||
| Memphis | $4.58 | +14 | +10 | +4 | +5 | +9 |
|
||
| St. Louis | $4.49 | +5 | +2 | +3 | -8 | +13 |
|
||
| Peoria IL | $4.34 | -10 | -13 | +3 | -18 | +8 |
|
||
| Davenport IA | $4.27 | -17 | -19 | +2 | -25 | +8 |
|
||
| ... | | | | | | |
|
||
|
||
* ALERT: CIF Gulf corn jumped 8 cents. Largest single-day move since Jan 14.
|
||
|
||
WHAT'S DRIVING IT:
|
||
- USDA Export Sales (released Thursday): Net new corn sales of 1.82 MMT,
|
||
highest weekly total this marketing year. Unknown destinations (likely China)
|
||
booked 680,000 MT.
|
||
- Export Inspections (Monday): 1.24 MMT inspected for export, above the
|
||
pace needed to hit the USDA full-year estimate.
|
||
- Barge freight: St. Louis-Gulf up $0.45/ton this week. Low water on the
|
||
lower Mississippi near Greenville MS is creating delays — 48hr average
|
||
transit time now vs 36hr normal.
|
||
|
||
INTERPRETATION: Physical demand is pulling basis higher from the Gulf
|
||
upriver. The strength is real (export-driven) not just logistical. If
|
||
China continues buying at this pace, Gulf basis could push to +45/+50
|
||
which would pull interior basis another 5-8 cents higher.
|
||
|
||
|
||
--- Friday weekly report ---
|
||
|
||
Analyst: /basis-export-tracker-skill Generate the Basis & Exports Weekly.
|
||
|
||
Copilot:
|
||
|
||
Compiling week of Feb 28 - Mar 4, 2026...
|
||
|
||
BASIS & EXPORTS WEEKLY — March 4, 2026
|
||
|
||
HEADLINE: Gulf corn basis rallied 12 cents this week on Chinese buying.
|
||
Interior locations followed, with the entire river system firming 3-8 cents.
|
||
Soybean basis was quiet — Gulf steady at +58, interior unchanged.
|
||
|
||
CORN BASIS — WEEK OVER WEEK
|
||
[Table showing all 12 locations, weekly change, distance from seasonal avg]
|
||
|
||
The entire Mississippi River corn basis curve steepened this week.
|
||
Gulf-to-Davenport spread widened to 55 cents (vs 47 cents 3yr avg for
|
||
this week). This signals strong export pull but also tight barge
|
||
logistics. Barge freight at $14.20/ton is 18% above seasonal average.
|
||
|
||
EXPORT SCOREBOARD
|
||
| Commodity | Sales This Week | Cumulative | USDA Target | Pace |
|
||
|-----------|-----------------|------------|-------------|--------|
|
||
| Corn | 1.82 MMT | 42.1 MMT | 58.4 MMT | 104% |
|
||
| Soybeans | 0.44 MMT | 39.8 MMT | 49.7 MMT | 98% |
|
||
|
||
Corn export pace is now 4% ahead of the USDA projection. If this
|
||
continues, the April WASDE will likely raise the export estimate by
|
||
50-75 mil bu, tightening ending stocks further.
|
||
|
||
TOP BUYERS THIS WEEK (CORN)
|
||
| Destination | Volume | Notes |
|
||
|--------------------|-----------|---------------------------|
|
||
| Unknown (China) | 680,000 MT| 3rd consecutive large week |
|
||
| Mexico | 412,000 MT| Steady, as expected |
|
||
| Japan | 289,000 MT| Normal pace |
|
||
| Colombia | 145,000 MT| Above average |
|
||
|
||
PDF report generated: reports/basis-exports-weekly-2026-03-04.pdf
|
||
|
||
|
||
=============================================================
|
||
SKILL 4: Coffee Fundamental Monitor
|
||
=============================================================
|
||
|
||
The soft commodities analyst covers coffee:
|
||
|
||
User: /agent-skill-creator I monitor the global coffee market — arabica and robusta. Every week I check Brazil's CEPEA daily prices, pull ICE certified stock reports for arabica (from ICE exchange data), check Vietnam and Brazil export data from their customs agencies, track the CFTC Commitment of Traders for managed money positioning in KC coffee futures, and monitor weather in Minas Gerais (Brazil), Espirito Santo (Brazil), and the Central Highlands (Vietnam). I also watch the arabica/robusta spread because it signals substitution pressure. When frost risk hits Brazil's coffee belt in June-August, I need to be able to quickly assess the threat. Here's my methodology doc: references/coffee-research-methodology.pdf
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
Reading references/coffee-research-methodology.pdf (12 pages)...
|
||
|
||
Comprehensive framework. I see your frost risk model uses elevation bands in Minas Gerais (areas above 900m are safe, below 700m are high risk), historical frost dates, and ECMWF ensemble forecasts for minimum temperatures. Let me build this.
|
||
|
||
Implicit requirements:
|
||
- CEPEA prices are in BRL/bag — need USD conversion using BCB exchange rate API
|
||
- ICE certified stocks distinguish between pending grading, passed, and failed
|
||
- Brazil export data from CECAFE (monthly), Vietnam from customs (lagged 2-3 weeks)
|
||
- COT data: managed money net long/short as % of open interest is the key metric, not raw contracts
|
||
- Arabica/robusta spread: KC minus RC (converted to common units), watch for narrowing below historical range
|
||
- Frost: only matters June 15 - August 15, south of 22°S latitude, below 800m elevation
|
||
- The coffee marketing year is different (Jul-Jun for Brazil arabica, Oct-Sep for Vietnam robusta)
|
||
- Flowering season (Sep-Nov in Brazil) is the other critical weather window
|
||
|
||
Building...
|
||
|
||
coffee-fundamental-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── cepea_prices.py # Brazil domestic price scraper
|
||
│ ├── ice_certified_stocks.py # ICE arabica warehouse stocks
|
||
│ ├── brazil_exports.py # CECAFE monthly export data
|
||
│ ├── vietnam_exports.py # Vietnam customs export data
|
||
│ ├── cot_positioning.py # CFTC COT managed money parser
|
||
│ ├── arb_rob_spread.py # Arabica/robusta spread tracker
|
||
│ ├── frost_monitor.py # ECMWF frost risk model
|
||
│ ├── brazil_weather.py # Minas Gerais + Espirito Santo weather
|
||
│ ├── vietnam_weather.py # Central Highlands weather
|
||
│ └── weekly_report.py # Coffee Weekly builder
|
||
├── references/
|
||
│ ├── frost-risk-model.md # Elevation bands, historical frost events
|
||
│ ├── coffee-calendar.md # Marketing years, flowering/harvest windows
|
||
│ ├── brazil-regions.md # Minas Gerais sub-regions, elevation data
|
||
│ ├── data-sources.md # All API endpoints and data lags
|
||
│ └── spread-methodology.md # Arb/rob spread interpretation
|
||
├── assets/
|
||
│ └── minas-gerais-elevations.geojson
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED | Security: PASSED
|
||
Installed at: ~/.claude/skills/coffee-fundamental-skill
|
||
|
||
Shared to: github.com/acme-trading/coffee-fundamental-skill
|
||
|
||
|
||
--- Frost scare in July ---
|
||
|
||
Coffee Analyst: /coffee-fundamental-skill Frost risk alert — GFS is showing a polar air mass pushing into Parana and southern Minas Gerais this weekend. Assess the threat to coffee.
|
||
|
||
Copilot (loading coffee-fundamental-skill):
|
||
|
||
Pulling ECMWF and GFS ensemble forecasts for coffee belt...
|
||
Loading elevation data for Minas Gerais sub-regions...
|
||
|
||
FROST RISK ASSESSMENT — July 18, 2026
|
||
|
||
MODEL GUIDANCE (minimum temperature forecasts, Saturday morning July 20)
|
||
|
||
| Sub-region | Elevation | GFS Min | ECMWF Min | Frost Risk |
|
||
|---------------------|-----------|---------|-----------|------------|
|
||
| Sul de Minas (<700m)| 650-700m | -1°C | +1°C | HIGH |
|
||
| Sul de Minas (>800m)| 800-1100m | +2°C | +3°C | LOW |
|
||
| Cerrado Mineiro | 800-1000m | +3°C | +4°C | MINIMAL |
|
||
| Triângulo Mineiro | 700-900m | +1°C | +3°C | MODERATE |
|
||
| Parana (north) | 400-600m | -3°C | -1°C | SEVERE |
|
||
| Espirito Santo | 500-700m | +5°C | +6°C | NONE |
|
||
|
||
THREAT ASSESSMENT:
|
||
|
||
Parana: SEVERE risk. But Parana is only ~5% of Brazil arabica production
|
||
(down from 25% in the 1990s — production shifted north after the 1994
|
||
frost). Impact would be limited to ~2-3 million bags maximum exposure.
|
||
|
||
Sul de Minas (low elevation): HIGH risk on GFS, moderate on ECMWF. This
|
||
is the critical area — Sul de Minas produces ~30% of Brazil's arabica.
|
||
However, the sub-700m low-elevation areas are a minority of production.
|
||
Most major farms are at 800-1100m where frost risk is low.
|
||
|
||
GFS vs ECMWF divergence: GFS is 2-3°C colder than ECMWF across all
|
||
regions. This matters. In the last 5 comparable events, ECMWF verified
|
||
closer to observed temps 4 out of 5 times.
|
||
|
||
HISTORICAL COMPARISON:
|
||
- July 2021 frost: Much more severe (widespread -3°C to -5°C across
|
||
Minas Gerais at all elevations). KC rallied 30% in 2 weeks.
|
||
- This event: More limited geographic scope. Closer to July 2023
|
||
scare that produced a 5% rally that fully reversed in 10 days.
|
||
|
||
MARKET POSITIONING:
|
||
Managed money is currently net long 42,300 contracts (68th percentile).
|
||
Not extreme — room for speculative buying on a frost headline.
|
||
|
||
ICE certified stocks: 812,000 bags, near 20-year lows. Low buffer =
|
||
larger price reaction to any supply shock.
|
||
|
||
BOTTOM LINE: This is a "watch closely but don't panic" event. The
|
||
probable impact is limited to low-elevation Parana and small pockets
|
||
of southern Minas Gerais. If ECMWF is right (+1°C in Sul de Minas),
|
||
this is a non-event. If GFS is right (-1°C), we're looking at
|
||
localized damage to 3-5% of the Brazil arabica crop.
|
||
|
||
Expect KC coffee to rally 3-5% on the headlines Friday/Monday regardless
|
||
of actual damage, given low certified stocks and the market's sensitivity
|
||
to anything frost-related after 2021.
|
||
|
||
Next update: I recommend re-running this Saturday when the 24-hour
|
||
forecast models converge.
|
||
|
||
|
||
=============================================================
|
||
THE TEAM'S SKILL LIBRARY — 3 MONTHS LATER
|
||
=============================================================
|
||
|
||
After 3 months, the 6-person team has built and shared these skills:
|
||
|
||
git clone .../wasde-analyzer-skill.git # Senior grain analyst
|
||
git clone .../crop-weather-weekly-skill.git # Weather/crop analyst
|
||
git clone .../basis-export-tracker-skill.git # Logistics/basis analyst
|
||
git clone .../coffee-fundamental-skill.git # Soft commodities analyst
|
||
git clone .../seasonal-spread-skill.git # Quantitative analyst
|
||
git clone .../client-briefing-skill.git # Research director
|
||
|
||
Every analyst has all 6 skills installed. The new hire who joined last
|
||
week cloned all 6 in 10 minutes and can now run any workflow the team
|
||
does — with institutional knowledge embedded in the skills.
|
||
|
||
The research director's /client-briefing-skill actually calls the other
|
||
skills internally to compile the firm's weekly flagship report. Skills
|
||
compose.
|
||
|
||
What used to take each analyst 2-3 hours of manual data pulling and
|
||
formatting now takes a single prompt. The team's output doubled. Their
|
||
research clients can't tell the difference — the reports look the same,
|
||
the analysis is the same. It's just faster, and the junior analyst can
|
||
produce the same quality as the senior.
|
||
|
||
That's the point: skills capture institutional knowledge so it doesn't
|
||
walk out the door when someone leaves, and it doesn't take 6 months
|
||
to transfer when someone new joins.
|
||
|
||
|
||
=============================================================
|
||
INSTALLING ALL TEAM SKILLS AT ONCE
|
||
=============================================================
|
||
|
||
New team member joins. The team lead sends them one message on Slack:
|
||
|
||
"Welcome! Run these to get all our research skills:"
|
||
|
||
curl -fsSL https://raw.githubusercontent.com/FrancyJGLisboa/agent-skill-creator/main/scripts/bootstrap.sh | sh
|
||
|
||
./scripts/install-skill.sh https://github.com/acme-trading/wasde-analyzer-skill.git
|
||
./scripts/install-skill.sh https://github.com/acme-trading/crop-weather-weekly-skill.git
|
||
./scripts/install-skill.sh https://github.com/acme-trading/basis-export-tracker-skill.git
|
||
./scripts/install-skill.sh https://github.com/acme-trading/coffee-fundamental-skill.git
|
||
./scripts/install-skill.sh https://github.com/acme-trading/seasonal-spread-skill.git
|
||
./scripts/install-skill.sh https://github.com/acme-trading/client-briefing-skill.git
|
||
|
||
7 commands. 5 minutes. The new hire has the entire team's research
|
||
infrastructure on their machine, across every AI tool they use.
|
||
|
||
|
||
=============================================================
|
||
EXPANDED: PSD DATABASE + GLOBAL TRADE TRACKER (GTT) SKILLS
|
||
=============================================================
|
||
|
||
The team has API credentials for two critical data platforms:
|
||
|
||
PSD_API_KEY — USDA Foreign Agricultural Service Production,
|
||
Supply and Distribution database. Global supply/demand
|
||
balances for every commodity by country and marketing year.
|
||
Endpoint: apps.fas.usda.gov/opendatawebv2/
|
||
|
||
GTT_USER_ID — Global Trade Tracker login. 133 countries, HS 8-digit
|
||
GTT_PASSWORD trade flow data, monthly updates. REST API at
|
||
globaltradetracker.com/api/rest/
|
||
|
||
These credentials are set as environment variables. The skills never
|
||
hardcode them — they read from env at runtime.
|
||
|
||
|
||
=============================================================
|
||
SKILL 5: Global S&D Balance Sheet Builder (PSD)
|
||
=============================================================
|
||
|
||
The senior analyst who covers global grains:
|
||
|
||
User: /agent-skill-creator I use the USDA PSD database to build global supply and demand balance sheets for soybeans, corn, and wheat. For each commodity I pull production, beginning stocks, imports, domestic consumption, exports, and ending stocks — broken down by the top 10 producing and consuming countries plus a "rest of world" aggregate. I compare the current marketing year estimates to the previous 5 years to identify trends. I also calculate stocks-to-use ratios and flag any country where ending stocks changed more than 10% month-over-month — that usually signals a USDA revision worth investigating. The PSD API key is in my env as PSD_API_KEY. Here's my current Python notebook that does this manually: notebooks/psd-balance-sheets.ipynb
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
Reading notebooks/psd-balance-sheets.ipynb...
|
||
|
||
I see your workflow: you call the PSD API for each commodity/country
|
||
combination, pivot the data into balance sheet format, compute derived
|
||
metrics, and render tables in a Jupyter notebook. Let me formalize this.
|
||
|
||
Implicit requirements I've identified:
|
||
- PSD API authentication: API key passed as header (X-Api-Key) to
|
||
apps.fas.usda.gov/opendatawebv2/ endpoints
|
||
- Commodity codes: 0440000 (soybeans), 0440000 (soybean meal/oil are
|
||
separate), 0410000 (corn), 0410000 (wheat has multiple codes by class)
|
||
- Marketing years differ by commodity and country: US corn is Sep-Aug,
|
||
Brazil soy is Feb-Jan, Argentina wheat is Dec-Nov
|
||
- "Top 10" countries shift over time — should be dynamic based on latest
|
||
production rankings, not hardcoded
|
||
- PSD data updates monthly (around the WASDE release) — need to track
|
||
the revision date to know if data is current
|
||
- Some PSD attributes are in 1000 MT, others in MT — unit normalization
|
||
- World totals in PSD double-count intra-EU trade — need EU-27 aggregate
|
||
handling
|
||
- The 10% month-over-month change alert needs to compare the same
|
||
attribute for the same country between the current and previous PSD
|
||
update, not between marketing years
|
||
|
||
Building...
|
||
|
||
psd-balance-sheet-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── psd_client.py # PSD API wrapper (auth, pagination, rate limits)
|
||
│ ├── balance_sheet.py # S&D balance sheet builder (country × commodity)
|
||
│ ├── country_rankings.py # Dynamic top-N producer/consumer rankings
|
||
│ ├── stocks_to_use.py # Stocks-to-use ratio calculator + historical
|
||
│ ├── revision_detector.py # Month-over-month revision alerts (>10% change)
|
||
│ ├── marketing_years.py # Country-specific marketing year calendar
|
||
│ └── report_builder.py # PDF/HTML balance sheet report
|
||
├── references/
|
||
│ ├── psd-commodity-codes.md # USDA commodity code mappings
|
||
│ ├── psd-attribute-codes.md # Production, consumption, trade attribute IDs
|
||
│ ├── marketing-year-cal.md # By country and commodity
|
||
│ ├── eu-aggregation.md # EU-27 handling rules
|
||
│ └── methodology.md # S&D balance sheet conventions
|
||
├── assets/
|
||
│ └── country_mappings.json # PSD country codes → ISO 3166 + display names
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED
|
||
Security: PASSED (PSD_API_KEY read from env, not hardcoded)
|
||
Installed at: ~/.claude/skills/psd-balance-sheet-skill
|
||
|
||
|
||
--- Monthly use right after WASDE release ---
|
||
|
||
Analyst: /psd-balance-sheet-skill USDA just updated PSD. Pull the full global soybean balance sheet for 2025/26 and compare to last month. Flag any revisions.
|
||
|
||
Copilot (loading psd-balance-sheet-skill):
|
||
|
||
Authenticating with PSD API... (using PSD_API_KEY from env)
|
||
Pulling soybean data for marketing year 2025/26...
|
||
Pulling previous month snapshot for revision comparison...
|
||
Building balance sheet...
|
||
|
||
GLOBAL SOYBEAN BALANCE SHEET — 2025/26 (March 2026 USDA update)
|
||
Units: Million Metric Tons
|
||
|
||
PRODUCTION
|
||
| Country | Mar Est | Feb Est | Revision | 5yr Avg | vs Avg |
|
||
|---------------|---------|---------|----------|---------|---------|
|
||
| Brazil | 169.0 | 169.0 | — | 148.2 | +14.0% |
|
||
| United States | 118.8 | 118.8 | — | 116.4 | +2.1% |
|
||
| Argentina | 50.0 | 52.0 | -2.0 * | 46.8 | +6.8% |
|
||
| China | 20.7 | 20.7 | — | 19.1 | +8.4% |
|
||
| India | 13.2 | 12.4 | +0.8 * | 11.8 | +11.9% |
|
||
| Paraguay | 10.8 | 10.8 | — | 9.9 | +9.1% |
|
||
| Canada | 7.1 | 7.1 | — | 6.6 | +7.6% |
|
||
| Russia | 6.8 | 6.8 | — | 5.9 | +15.3% |
|
||
| Ukraine | 5.4 | 5.4 | — | 4.2 | +28.6% |
|
||
| Bolivia | 3.3 | 3.4 | -0.1 | 3.1 | +6.5% |
|
||
| Rest of World | 22.4 | 22.5 | -0.1 | 21.0 | +6.7% |
|
||
| WORLD TOTAL | 427.5 | 428.9 | -1.4 | 393.0 | +8.8% |
|
||
|
||
REVISION ALERTS:
|
||
* Argentina production: -2.0 MMT (-3.8%). Drought in Cordoba and
|
||
Santa Fe provinces during January pod-fill stage. This is the first
|
||
cut — market expected -1.0 MMT. Further downside risk if February
|
||
rains don't materialize in southern Buenos Aires province.
|
||
|
||
* India production: +0.8 MMT (+6.5%). Late monsoon rains benefited
|
||
kharif soybean crop in Madhya Pradesh. This is unusual — USDA rarely
|
||
revises India this late in the season.
|
||
|
||
ENDING STOCKS
|
||
| Country | Mar Est | Feb Est | Stocks/Use | 5yr Avg S/U |
|
||
|---------------|---------|---------|------------|-------------|
|
||
| United States | 10.1 | 10.3 | 8.4% | 7.2% |
|
||
| Brazil | 37.2 | 37.5 | 23.1% | 21.8% |
|
||
| Argentina | 24.8 | 26.2 | 42.3% | 38.1% |
|
||
| China | 33.4 | 33.4 | 29.5% | 28.0% |
|
||
| WORLD TOTAL | 124.3 | 126.5 | 31.2% | 29.6% |
|
||
|
||
WORLD STOCKS/USE at 31.2% is slightly above the 5-year average but
|
||
tightening on the Argentina cut. Another 2 MMT cut to Argentina in April
|
||
would bring world S/U to 30.7%, which would be the tightest since 2023/24.
|
||
|
||
KEY NARRATIVE: World soy balance is comfortable but deteriorating at the
|
||
margin. The Argentina story is the swing variable. Brazil's record crop
|
||
is the cushion. Watch the April WASDE for a potential follow-through
|
||
Argentina cut if March rains disappoint.
|
||
|
||
PDF report: reports/psd-soybeans-global-2025-26-march.pdf
|
||
|
||
|
||
--- Deeper drill-down ---
|
||
|
||
Analyst: /psd-balance-sheet-skill Show me China's soybean import history from PSD — last 10 marketing years. I want to see the trajectory.
|
||
|
||
Copilot:
|
||
|
||
Pulling PSD data for China soybean imports, MY 2016/17 through 2025/26...
|
||
|
||
CHINA SOYBEAN IMPORTS — 10-Year Trajectory (Million MT)
|
||
|
||
| Marketing Year | Imports | YoY Change | Share of World Trade |
|
||
|----------------|---------|------------|----------------------|
|
||
| 2016/17 | 93.5 | | 62.1% |
|
||
| 2017/18 | 94.1 | +0.6% | 60.8% |
|
||
| 2018/19 | 82.5 | -12.3% | 55.2% ← trade war |
|
||
| 2019/20 | 98.5 | +19.4% | 60.1% |
|
||
| 2020/21 | 99.8 | +1.3% | 59.6% |
|
||
| 2021/22 | 91.6 | -8.2% | 57.4% ← hog herd |
|
||
| 2022/23 | 100.3 | +9.5% | 60.2% |
|
||
| 2023/24 | 105.5 | +5.2% | 61.0% |
|
||
| 2024/25 | 109.0 | +3.3% | 61.5% |
|
||
| 2025/26 (est) | 106.0 | -2.8% | 59.8% |
|
||
|
||
OBSERVATIONS:
|
||
- The 2018/19 dip was the US-China trade war. China diverted to Brazil.
|
||
- 2021/22 dip was the Chinese hog herd contraction (ASF recovery stall).
|
||
- The current 2025/26 estimate of 106 MMT is a -2.8% decline — first cut
|
||
in two years. USDA attributes this to slowing crush margins in China
|
||
and elevated domestic soybean stocks from the prior year's over-buying.
|
||
- China's share of world trade peaked at 62% and has been gradually
|
||
declining as SE Asian crushers (Vietnam, Bangladesh) grow.
|
||
|
||
Want me to overlay this against Brazil vs US origin splits from GATS?
|
||
|
||
|
||
=============================================================
|
||
SKILL 6: Trade Flow Intelligence (GTT)
|
||
=============================================================
|
||
|
||
The trade flow analyst creates a skill using Global Trade Tracker:
|
||
|
||
User: /agent-skill-creator I use Global Trade Tracker to monitor real-time commodity trade flows. My main workflow: I pull monthly import/export data by HS code for soybeans (1201), soybean meal (2304), corn (1005), and wheat (1001) — tracking who's buying from whom, how volumes compare to the same month last year, and whether trade is shifting between origins. For example, if China starts buying more Brazilian soybeans and fewer US soybeans, I need to catch that shift early. I also track minor but growing trade corridors (like Russian wheat to Africa, or Ukrainian corn to Southeast Asia) that could signal structural market changes. GTT credentials are in my env as GTT_USER_ID and GTT_PASSWORD. The GTT REST API is at globaltradetracker.com/api/rest/ — you get a token from /gettoken then use /getreport and /tradedetails. Here's my methodology: references/trade-flow-methodology.pdf
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
Reading references/trade-flow-methodology.pdf...
|
||
|
||
Your methodology: origin-destination matrices by commodity, year-over-year
|
||
volume changes, market share shifts by origin country, and an "emerging
|
||
corridor" detector that flags any bilateral trade route where volume
|
||
doubled or tripled in 12 months. Let me build this.
|
||
|
||
Implicit requirements:
|
||
- GTT auth: POST to /api/rest/gettoken with GTT_USER_ID + GTT_PASSWORD,
|
||
token valid 14 days, cache and refresh as needed
|
||
- /api/rest/getreport requires: reporter, hscode, impexp, and a time
|
||
parameter (from/to in YYYY-MM or latestavailablemonths)
|
||
- HS codes at 4-digit level: 1201 (soybeans), 2304 (soybean meal),
|
||
1005 (corn), 1001 (wheat). Can drill to 6-digit for specifics
|
||
- GTT data arrives with ~2-3 month lag for some countries — need to
|
||
handle uneven reporting periods across reporters
|
||
- "Mirror data" fallback: when a country hasn't reported yet, use the
|
||
partner country's mirror data (GTT supports fallbacktomirrordata=true)
|
||
- Currency: all volumes in MT (not value) for commodity flow analysis
|
||
- Need to distinguish re-exports from domestic exports (impexp parameter)
|
||
- EU-27 can be treated as a single entity or individual members — the
|
||
skill should support both views
|
||
- The "emerging corridor" detector needs a minimum volume threshold to
|
||
avoid flagging noise (e.g., 10,000 MT/month minimum)
|
||
|
||
Building...
|
||
|
||
trade-flow-intel-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── gtt_client.py # GTT REST API wrapper (auth, token caching,
|
||
│ │ # getreport, tradedetails, error handling)
|
||
│ ├── origin_dest_matrix.py # Origin × destination trade matrices
|
||
│ ├── market_share.py # Origin market share by importer
|
||
│ ├── yoy_comparison.py # Year-over-year volume changes
|
||
│ ├── corridor_detector.py # Emerging trade corridor alerts
|
||
│ ├── mirror_data.py # Mirror data fallback handler
|
||
│ ├── seasonal_pattern.py # Monthly trade seasonality by route
|
||
│ └── report_builder.py # Trade flow report (PDF + charts)
|
||
├── references/
|
||
│ ├── hs-codes.md # 1201, 2304, 1005, 1001 + sub-codes
|
||
│ ├── gtt-api-reference.md # Endpoint docs, params, response format
|
||
│ ├── country-codes.md # GTT country codes + ISO mappings
|
||
│ ├── data-lag-calendar.md # Expected reporting lag by country
|
||
│ └── methodology.md # Market share, corridor detection logic
|
||
├── assets/
|
||
│ ├── top_importers.json # Key importing countries by commodity
|
||
│ └── top_exporters.json # Key exporting countries by commodity
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED
|
||
Security: PASSED (GTT_USER_ID and GTT_PASSWORD read from env, not hardcoded)
|
||
Installed at: ~/.claude/skills/trade-flow-intel-skill
|
||
|
||
Shared to: github.com/acme-trading/trade-flow-intel-skill
|
||
|
||
|
||
--- China's soybean sourcing shift ---
|
||
|
||
Analyst: /trade-flow-intel-skill Pull the latest soybean (1201) import data for China. Show me the origin breakdown — US vs Brazil vs Argentina vs others — monthly for the last 12 months. I want to see if the sourcing pattern is shifting.
|
||
|
||
Copilot (loading trade-flow-intel-skill):
|
||
|
||
Authenticating with GTT... (using GTT_USER_ID, GTT_PASSWORD from env)
|
||
Token obtained (valid 14 days, cached).
|
||
Pulling HS 1201 imports, reporter: China, last 12 available months...
|
||
Note: China's latest available data is January 2026 (2-month lag).
|
||
|
||
CHINA SOYBEAN IMPORTS BY ORIGIN — Feb 2025 to Jan 2026
|
||
Units: Thousand Metric Tons
|
||
|
||
| Month | Brazil | USA | Argentina | Uruguay | Canada | Other | TOTAL |
|
||
|----------|---------|---------|-----------|---------|--------|-------|---------|
|
||
| Feb 2025 | 4,120 | 3,890 | 210 | 85 | 120 | 195 | 8,620 |
|
||
| Mar 2025 | 5,680 | 2,410 | 340 | 140 | 80 | 210 | 8,860 |
|
||
| Apr 2025 | 7,230 | 980 | 520 | 190 | 45 | 175 | 9,140 |
|
||
| May 2025 | 8,410 | 420 | 680 | 210 | 30 | 160 | 9,910 |
|
||
| Jun 2025 | 9,100 | 310 | 750 | 180 | 25 | 190 | 10,555 |
|
||
| Jul 2025 | 8,870 | 280 | 610 | 150 | 20 | 170 | 10,100 |
|
||
| Aug 2025 | 7,640 | 350 | 480 | 120 | 15 | 155 | 8,760 |
|
||
| Sep 2025 | 5,210 | 1,870 | 320 | 80 | 45 | 140 | 7,665 |
|
||
| Oct 2025 | 3,180 | 4,560 | 180 | 50 | 190 | 160 | 8,320 |
|
||
| Nov 2025 | 2,440 | 5,890 | 120 | 40 | 280 | 175 | 8,945 |
|
||
| Dec 2025 | 2,890 | 5,420 | 150 | 55 | 250 | 190 | 8,955 |
|
||
| Jan 2026 | 3,540 | 4,680 | 200 | 70 | 210 | 180 | 8,880 |
|
||
|----------|---------|---------|-----------|---------|--------|-------|---------|
|
||
| 12M TOTAL| 68,310 | 31,060 | 4,560 | 1,370 | 1,310 | 2,100 | 108,710 |
|
||
| Share | 62.8% | 28.6% | 4.2% | 1.3% | 1.2% | 1.9% | 100% |
|
||
|
||
MARKET SHARE vs SAME 12-MONTH PERIOD LAST YEAR:
|
||
| Origin | This Year | Last Year | Shift |
|
||
|-----------|-----------|-----------|-----------|
|
||
| Brazil | 62.8% | 60.1% | +2.7 pp |
|
||
| USA | 28.6% | 31.4% | -2.8 pp |
|
||
| Argentina | 4.2% | 4.8% | -0.6 pp |
|
||
| Canada | 1.2% | 0.8% | +0.4 pp |
|
||
|
||
ANALYSIS:
|
||
Brazil gained 2.7 percentage points of China's soybean import market at
|
||
the expense of the US (-2.8 pp). This is the second consecutive year of
|
||
share shift toward Brazil.
|
||
|
||
Key drivers:
|
||
1. Brazil's record 169 MMT crop created export price competitiveness —
|
||
CFR China spread was $8-12/MT cheaper than US Gulf for most of Q2 2025
|
||
2. US Oct-Jan shipping season saw logistical delays on the Mississippi
|
||
(low water Sep-Oct) that pushed buyers to book Brazil forward
|
||
3. Canada is quietly growing — from 0.8% to 1.2% share. Canadian
|
||
soybeans move through Pacific ports (Vancouver) which is a shorter
|
||
transit to northern China
|
||
|
||
The seasonal pattern is intact (Brazil dominates Apr-Aug, US dominates
|
||
Oct-Jan) but the crossover points are shifting earlier — Brazil's share
|
||
started growing in March this year vs April last year, suggesting China
|
||
is booking Brazilian soybeans further forward.
|
||
|
||
RISK FOR US EXPORTERS: If Brazil's 2026/27 crop (planting starts Sep 2026)
|
||
achieves even 5% growth, the US share of Chinese soybean imports could
|
||
drop below 27% for the first time since the trade war year.
|
||
|
||
Want me to drill into the monthly FOB/CFR price differentials to quantify
|
||
the price competitiveness driver?
|
||
|
||
|
||
--- Emerging corridor detection ---
|
||
|
||
Analyst: /trade-flow-intel-skill Run the emerging corridor scan for wheat (1001) — which bilateral trade routes have grown the fastest in the last 12 months vs prior year?
|
||
|
||
Copilot:
|
||
|
||
Pulling HS 1001 global trade flows, latest 12 months vs prior 12...
|
||
Filtering: minimum 10,000 MT/month, growth > 100%...
|
||
|
||
EMERGING WHEAT TRADE CORRIDORS — Fastest Growing Routes
|
||
|
||
| Exporter | Importer | This 12M (KMT) | Prior 12M (KMT) | Growth |
|
||
|--------------|----------------|-----------------|-----------------|---------|
|
||
| Russia | Algeria | 4,820 | 2,140 | +125% |
|
||
| Russia | Bangladesh | 1,560 | 620 | +152% |
|
||
| Russia | Nigeria | 890 | 280 | +218% |
|
||
| Ukraine | Indonesia | 2,340 | 1,080 | +117% |
|
||
| Ukraine | Philippines | 780 | 340 | +129% |
|
||
| Australia | Vietnam | 1,120 | 480 | +133% |
|
||
| Argentina | Brazil | 5,410 | 2,890 | +87% |
|
||
| Kazakhstan | Uzbekistan | 1,890 | 780 | +142% |
|
||
|
||
TOP STRUCTURAL SHIFTS:
|
||
|
||
1. RUSSIA → AFRICA (Algeria, Nigeria): Russian wheat is aggressively
|
||
displacing French wheat in North and West Africa. Algeria historically
|
||
bought French milling wheat but Russia now offers 12-15% protein hard
|
||
wheat at $30-40/MT discount. Nigeria's growth is from near zero — this
|
||
is a new corridor. Russia now supplies 68% of Algeria's wheat imports,
|
||
up from 41% two years ago.
|
||
|
||
2. RUSSIA → BANGLADESH: Bangladesh was a traditional Australian wheat
|
||
buyer. Russian wheat is now competitive into Chittagong port at $15/MT
|
||
below Australian APW. This corridor barely existed 3 years ago.
|
||
|
||
3. UKRAINE → SOUTHEAST ASIA (Indonesia, Philippines): Ukraine rebuilt
|
||
Black Sea export logistics post-corridor agreement. Indonesian flour
|
||
mills are diversifying away from 100% Australian dependence. Ukrainian
|
||
wheat offers good protein at lower cost via Odessa-Singapore-Jakarta
|
||
route.
|
||
|
||
4. ARGENTINA → BRAZIL: Brazil's wheat self-sufficiency is only ~55%.
|
||
Argentine wheat fills the gap. The +87% growth is driven by the weak
|
||
Argentine peso making exports competitive and a below-average Brazilian
|
||
wheat crop in Rio Grande do Sul.
|
||
|
||
LOSERS (corridors that shrank):
|
||
| Exporter | Importer | This 12M (KMT) | Prior 12M (KMT) | Change |
|
||
|--------------|----------------|-----------------|-----------------|---------|
|
||
| France | Algeria | 1,240 | 3,100 | -60% |
|
||
| Australia | Bangladesh | 420 | 890 | -53% |
|
||
| USA | Nigeria | 310 | 680 | -54% |
|
||
|
||
TAKEAWAY: Russian wheat is structurally reshaping global trade flows.
|
||
The Black Sea export machine (deep water ports, low production costs,
|
||
weak ruble) is pushing traditional exporters (France, US, Australia) out
|
||
of price-sensitive emerging markets. This isn't temporary — it's
|
||
infrastructure-driven and accelerating.
|
||
|
||
|
||
=============================================================
|
||
SKILL 7: PSD + GTT Combined — Supply Chain Risk Monitor
|
||
=============================================================
|
||
|
||
The research director combines both data sources into a single skill:
|
||
|
||
User: /agent-skill-creator I need a skill that combines PSD balance sheet data with GTT trade flow data to monitor supply chain risk for our four commodities. The idea: PSD tells us the global supply picture (who's producing, who's short). GTT tells us the trade reality (who's actually shipping to whom). When those two diverge — like when a country's PSD ending stocks are falling but GTT shows they're still exporting at last year's pace — that's an early warning of a future export restriction or price spike. I also want to cross-reference GTT flows against USDA Export Sales (from the FAS Open Data API, same PSD_API_KEY) to see if announced sales are actually being shipped. API credentials: PSD_API_KEY and GTT_USER_ID/GTT_PASSWORD are in my env. See my framework doc: references/supply-chain-risk-framework.pdf
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
Reading references/supply-chain-risk-framework.pdf...
|
||
|
||
This is a sophisticated early-warning system. Your framework defines three
|
||
risk signals: (1) stock depletion + continued exports, (2) export sale
|
||
commitments that aren't converting to shipments, (3) sudden origin
|
||
diversification by major importers. Let me build this.
|
||
|
||
Implicit requirements:
|
||
- Must call both PSD API and GTT API, correlate by commodity and country
|
||
- PSD data is marketing-year based, GTT is calendar-month — need alignment
|
||
- USDA Export Sales (FAS API, same key) provides weekly US commitments vs
|
||
shipments — the "commitment-to-shipment" conversion rate is a key metric
|
||
- Export restriction history: need a reference table of past export bans
|
||
(Russia 2010, Argentina 2022, India rice 2023) to calibrate risk levels
|
||
- The divergence detector compares: PSD ending stocks trajectory (shrinking?)
|
||
vs GTT export volumes (still high?) — when stocks fall below 15% S/U
|
||
while exports maintain pace, flag as "restriction risk"
|
||
- Alert hierarchy: GREEN (normal), YELLOW (watch), ORANGE (elevated),
|
||
RED (imminent restriction risk)
|
||
- Country-specific export policy knowledge: Russia uses floating export
|
||
tax, Argentina uses DEX + ROE system, India uses ad-hoc bans
|
||
|
||
Building...
|
||
|
||
supply-chain-risk-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── psd_client.py # PSD API wrapper
|
||
│ ├── gtt_client.py # GTT API wrapper
|
||
│ ├── fas_export_sales.py # USDA FAS Export Sales API
|
||
│ ├── stock_export_divergence.py # PSD stocks vs GTT flows comparison
|
||
│ ├── commitment_tracker.py # Export sales vs actual shipments
|
||
│ ├── origin_shift_detector.py # Sudden sourcing changes by importers
|
||
│ ├── restriction_risk.py # Export ban/tax probability model
|
||
│ ├── risk_dashboard.py # Alert dashboard builder (HTML)
|
||
│ └── weekly_report.py # Supply chain risk weekly PDF
|
||
├── references/
|
||
│ ├── restriction-history.md # Past export bans with triggers/duration
|
||
│ ├── policy-mechanisms.md # How each country restricts exports
|
||
│ ├── risk-thresholds.md # S/U ratios that historically trigger bans
|
||
│ ├── psd-gtt-alignment.md # Marketing year to calendar month mapping
|
||
│ └── methodology.md # Full risk framework
|
||
├── assets/
|
||
│ └── restriction_database.json # Historical export restrictions
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED
|
||
Security: PASSED (all 3 credentials read from env)
|
||
Installed at: ~/.claude/skills/supply-chain-risk-skill
|
||
|
||
Shared to: github.com/acme-trading/supply-chain-risk-skill
|
||
|
||
|
||
--- Weekly risk scan ---
|
||
|
||
Research Director: /supply-chain-risk-skill Run the weekly supply chain risk scan across all four commodities. Flag anything orange or red.
|
||
|
||
Copilot (loading supply-chain-risk-skill):
|
||
|
||
Authenticating with PSD API... OK
|
||
Authenticating with GTT... token cached, valid 12 more days
|
||
Pulling FAS Export Sales... OK
|
||
|
||
Scanning: soybeans, corn, wheat, coffee across 40+ countries...
|
||
|
||
SUPPLY CHAIN RISK DASHBOARD — Week of March 2, 2026
|
||
|
||
=============================================
|
||
RED ALERTS (0)
|
||
=============================================
|
||
None.
|
||
|
||
=============================================
|
||
ORANGE ALERTS (2)
|
||
=============================================
|
||
|
||
1. ARGENTINA — SOYBEAN MEAL EXPORTS
|
||
Risk level: ORANGE (elevated)
|
||
|
||
PSD signal: Argentina 2025/26 soybean production just cut 2 MMT to
|
||
50 MMT. Soybean crush projected at 37 MMT. Domestic soybean stocks
|
||
falling — ending stocks/use at 15.2%, approaching the 14% threshold
|
||
that historically triggers DEX tax increases.
|
||
|
||
GTT signal: Argentine soybean meal exports (HS 2304) in Nov-Jan
|
||
averaged 2.1 MMT/month — ABOVE last year's pace of 1.9 MMT/month.
|
||
Exporters appear to be front-running a potential tax hike.
|
||
|
||
DIVERGENCE: Stocks tightening + exports accelerating = classic
|
||
pre-restriction pattern. Argentina raised the soybean export tax
|
||
(DEX) from 31% to 33% in 2022 under similar conditions.
|
||
|
||
Watch for: Argentine government budget statements, central bank
|
||
reserve levels (low reserves = higher probability of tax increase
|
||
to generate USD revenue).
|
||
|
||
2. INDIA — WHEAT
|
||
Risk level: ORANGE (elevated)
|
||
|
||
PSD signal: India 2025/26 wheat ending stocks estimated at 7.8 MMT,
|
||
the lowest since 2017/18. Government procurement was below target
|
||
for the second consecutive year. S/U ratio at 7.1%.
|
||
|
||
GTT signal: India wheat exports (HS 1001) have been near zero since
|
||
the May 2022 ban, which remains in place. However, GTT shows India
|
||
IMPORTED 1.2 MMT of wheat in the last 6 months (from Russia and
|
||
Australia) — unusual for a country that is typically self-sufficient.
|
||
|
||
DIVERGENCE: India is quietly switching from net exporter to net
|
||
importer. The import volumes suggest domestic availability is tighter
|
||
than official PSD estimates reflect. If procurement fails again in
|
||
the April-May 2026 rabi harvest, India could become a structural
|
||
wheat importer for the first time in a decade.
|
||
|
||
Implication: Bullish for global wheat if India enters the import
|
||
market at scale (1.4 billion people, even small per-capita import
|
||
= large absolute volume).
|
||
|
||
=============================================
|
||
YELLOW ALERTS (3)
|
||
=============================================
|
||
|
||
3. RUSSIA — WHEAT EXPORT TAX
|
||
Status: YELLOW (watch)
|
||
The floating export tax mechanism automatically adjusts. Current tax
|
||
is $22/MT on wheat. If FOB Black Sea prices rise above $280/MT (now
|
||
at $265), tax increases to $28/MT. Not a ban risk, but a margin
|
||
squeeze for importers locked into forward purchases at current prices.
|
||
|
||
4. BRAZIL — CORN EXPORTS
|
||
Status: YELLOW (watch)
|
||
Safrinha corn (second crop) planting is 2 weeks behind average due
|
||
to late soybean harvest. If safrinha yields disappoint, Brazil's
|
||
corn S&D tightens and Jul-Oct corn exports could fall below GTT's
|
||
current pace projection. Not urgent yet — safrinha crop doesn't
|
||
ship until July.
|
||
|
||
5. US — SOYBEAN EXPORT SALES CONVERSION
|
||
Status: YELLOW (watch)
|
||
FAS Export Sales show 4.2 MMT of outstanding (unshipped) soybean
|
||
commitments to China. GTT actual shipments in Jan were 4.68 MMT.
|
||
The commitment-to-shipment conversion rate is 78%, below the 5-year
|
||
average of 85% for this point in the marketing year. Could indicate
|
||
some Chinese cancellations incoming, or just logistical delays.
|
||
Monitor next 2-3 weeks of inspection data.
|
||
|
||
=============================================
|
||
GREEN (all clear)
|
||
=============================================
|
||
Soybeans (Brazil, US, Paraguay): normal flows
|
||
Corn (US, Ukraine): normal flows
|
||
Wheat (Russia export volumes, Canada, Australia, EU): normal flows
|
||
Coffee (Brazil, Vietnam, Colombia): normal flows
|
||
|
||
PDF dashboard: reports/supply-chain-risk-2026-03-02.pdf
|
||
HTML interactive: reports/supply-chain-risk-2026-03-02.html
|
||
|
||
Next scan: March 9, 2026 (auto-scheduled).
|
||
|
||
|
||
=============================================================
|
||
COMPLETE TEAM SKILL LIBRARY — WITH PSD & GTT
|
||
=============================================================
|
||
|
||
Updated skill library after adding the data-platform skills:
|
||
|
||
SKILL CREATED BY DATA SOURCES
|
||
─────────────────────────────────────────────────────────────────
|
||
wasde-analyzer-skill Senior grain analyst USDA WASDE PDF, Bloomberg
|
||
crop-weather-weekly-skill Weather/crop analyst USDA NASS, NOAA, Drought Monitor
|
||
basis-export-tracker-skill Logistics analyst DTN bids, USDA FAS, barge freight
|
||
coffee-fundamental-skill Softs analyst CEPEA, ICE, CFTC COT, ECMWF
|
||
psd-balance-sheet-skill Senior grain analyst USDA PSD API (PSD_API_KEY)
|
||
trade-flow-intel-skill Trade flow analyst GTT REST API (GTT_USER_ID/PASSWORD)
|
||
supply-chain-risk-skill Research director PSD + GTT + FAS combined
|
||
seasonal-spread-skill Quant analyst CBOT historical, seasonal models
|
||
client-briefing-skill Research director Calls other skills internally
|
||
|
||
Environment variables required for new team members:
|
||
|
||
export PSD_API_KEY="your-usda-fas-api-key"
|
||
export GTT_USER_ID="your-gtt-username"
|
||
export GTT_PASSWORD="your-gtt-password"
|
||
export STRIPE_API_KEY="..." # only for non-ag skills
|
||
export MIXPANEL_TOKEN="..." # only for non-ag skills
|
||
|
||
The team lead adds these to the onboarding doc. Credentials are never
|
||
stored in skill code — they're always read from environment variables
|
||
at runtime. The security scanner catches any accidental hardcoding
|
||
before the skill is published.
|
||
|
||
New hire onboarding is now:
|
||
|
||
1. Get API credentials from team lead (PSD_API_KEY, GTT creds)
|
||
2. Add to ~/.zshrc or ~/.bashrc
|
||
3. Run the 7 install commands
|
||
4. Start using skills immediately
|
||
|
||
Total setup time: 15 minutes. Knowledge transfer time: zero.
|
||
Everything the team knows is in the skills.
|
||
|
||
|
||
=============================================================
|
||
EXPANDED: OPEN-METEO PROFESSIONAL API SKILLS
|
||
=============================================================
|
||
|
||
The team also has an Open-Meteo professional plan:
|
||
|
||
OPEN_METEO_API_KEY — Open-Meteo professional subscription. Unlocked:
|
||
commercial use, higher rate limits, 80+ years of
|
||
historical data, ensemble models (ECMWF 51-member,
|
||
GFS 31-member), climate projections to 2050, soil
|
||
moisture at 5 depths, soil temperature at 4 depths,
|
||
ET0 evapotranspiration, GDD, and leaf wetness.
|
||
Endpoints: api.open-meteo.com/v1/forecast,
|
||
archive.open-meteo.com/v1/archive,
|
||
ensemble-api.open-meteo.com/v1/ensemble,
|
||
climate-api.open-meteo.com/v1/climate
|
||
|
||
Open-Meteo is the weather backbone. It replaces the patchwork of NOAA,
|
||
ECMWF direct, and national weather services the team was stitching
|
||
together manually. One API, every variable, 80 years of history.
|
||
|
||
|
||
=============================================================
|
||
SKILL 8: Yield Predictor — Weather-Based Crop Yield Model
|
||
=============================================================
|
||
|
||
The quant analyst builds a yield regression model powered by weather:
|
||
|
||
User: /agent-skill-creator I want to build a crop yield prediction model that uses weather data to estimate corn and soybean yields in the US Corn Belt BEFORE the USDA publishes their official estimate. The idea: USDA doesn't release their first survey-based yield estimate until August. But weather during the growing season is the #1 driver of yield — if I can quantify the weather impact, I can have a yield estimate weeks before USDA. My approach: pull 40 years of historical daily weather from Open-Meteo (temperature, precipitation, soil moisture, evapotranspiration) for the top 8 corn-producing states, calculate growing-season metrics (cumulative GDD, total precipitation, drought stress days, excess heat days above 95F during pollination), and run a regression against USDA's final yield for each year. Then apply the model to the current season's weather to get a real-time yield estimate that updates daily. Open-Meteo API key is in my env as OPEN_METEO_API_KEY. Here's my research paper on weather-yield relationships: references/weather-yield-regression.pdf
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
Reading references/weather-yield-regression.pdf...
|
||
|
||
Your paper identifies six weather variables that explain 78% of US corn
|
||
yield variance: (1) cumulative GDD May-Sep, (2) July precipitation, (3)
|
||
July max temp during pollination, (4) August soil moisture 0-10cm, (5)
|
||
VPD during silking, and (6) June precipitation for root establishment.
|
||
Soybeans have a similar but shifted model — critical period is Aug-Sep
|
||
instead of Jul-Aug. Let me build this.
|
||
|
||
Implicit requirements:
|
||
- Open-Meteo Historical API (archive.open-meteo.com/v1/archive):
|
||
daily data from 1984-present, variables: temperature_2m_max,
|
||
temperature_2m_min, precipitation_sum, et0_fao_evapotranspiration,
|
||
soil_moisture_0_to_1cm through 9_to_27cm, vapour_pressure_deficit
|
||
- Open-Meteo Forecast API (api.open-meteo.com/v1/forecast): same
|
||
variables, 16-day forecast, for projecting the current season forward
|
||
- API key passed as &apikey= parameter (professional plan)
|
||
- Need lat/long centroids for each state's ag district — not state
|
||
capitals, but production-weighted centroids (e.g., central Iowa
|
||
cropland at ~42.0°N, 93.5°W, not Des Moines)
|
||
- GDD calculation: base 50°F (10°C), cap at 86°F (30°C) — the standard
|
||
corn GDD formula, not simple average
|
||
- "Drought stress days": soil_moisture_0_to_1cm < 0.15 m³/m³ during
|
||
Jun-Aug. Consecutive drought days matter more than scattered ones
|
||
- "Excess heat days": temperature_2m_max > 35°C during Jul 5-25
|
||
(pollination window for corn). Each excess heat day costs ~1-2 bu/ac
|
||
- USDA final yield data (NASS QuickStats) for training the regression
|
||
- Yield trend detrending: raw yields increase ~2 bu/ac/year due to
|
||
technology. Must detrend before regression to isolate weather effect
|
||
- The model should output: point estimate, confidence interval, and
|
||
comparison to USDA's latest estimate (when available)
|
||
|
||
Building...
|
||
|
||
yield-predictor-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── openmeteo_client.py # Open-Meteo API wrapper (auth, batch queries,
|
||
│ │ # historical + forecast + archive endpoints)
|
||
│ ├── weather_metrics.py # GDD, precip, drought days, excess heat, VPD,
|
||
│ │ # soil moisture — all derived metrics
|
||
│ ├── yield_regression.py # Multi-variate regression (40yr training set)
|
||
│ ├── trend_detrend.py # Technology trend removal + re-trending
|
||
│ ├── state_centroids.py # Production-weighted lat/long by state
|
||
│ ├── realtime_estimator.py # Current season: actuals + 16-day forecast
|
||
│ │ # extension + climatology for remainder
|
||
│ ├── confidence_interval.py # Bootstrap CI from regression residuals
|
||
│ ├── usda_comparison.py # Compare model vs USDA when available
|
||
│ └── report_builder.py # Yield estimate report (PDF + charts)
|
||
├── references/
|
||
│ ├── gdd-formula.md # Corn/soy GDD calculation (base/cap)
|
||
│ ├── critical-periods.md # Pollination, pod-fill, grain-fill windows
|
||
│ ├── yield-weather-lit.md # Academic literature on weather-yield models
|
||
│ ├── state-centroids.md # 8 states, ag district centroids
|
||
│ └── methodology.md # Full regression methodology
|
||
├── assets/
|
||
│ ├── centroids.json # {state: {lat, lon, weight}}
|
||
│ ├── usda_historical_yields.csv # 1984-2025 state yields from NASS
|
||
│ └── trained_model.json # Serialized regression coefficients
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED
|
||
Security: PASSED (OPEN_METEO_API_KEY read from env)
|
||
Installed at: ~/.claude/skills/yield-predictor-skill
|
||
|
||
Shared to: github.com/acme-trading/yield-predictor-skill
|
||
|
||
|
||
--- Mid-July, the model starts getting interesting ---
|
||
|
||
Quant Analyst: /yield-predictor-skill Run the yield model for US corn. Where are we at for 2026?
|
||
|
||
Copilot (loading yield-predictor-skill):
|
||
|
||
Pulling Open-Meteo historical data for 2026 growing season (Apr 1 - today)...
|
||
Pulling 16-day forecast (Jul 15 - Jul 31)...
|
||
Filling Aug-Sep with 30-year climatology (weighted by current soil state)...
|
||
Running regression...
|
||
|
||
US CORN YIELD MODEL — July 15, 2026
|
||
|
||
WEATHER METRICS TO DATE (weighted across 8 states):
|
||
|
||
| Metric | 2026 Actual | 30yr Avg | Deviation |
|
||
|-------------------------------|-------------|----------|---------------|
|
||
| Cumulative GDD (Apr 15-Jul 14)| 1,580 | 1,490 | +6.0% (warm) |
|
||
| June precipitation (inches) | 4.8 | 4.3 | +11.6% (wet) |
|
||
| July precip to date (inches) | 1.1 | 2.2 | -50.0% (dry!) |
|
||
| Drought stress days (Jun-Jul) | 8 | 4 | +4 days |
|
||
| Excess heat days >95F | 3 | 1.5 | +1.5 days |
|
||
| Soil moisture 0-10cm (m³/m³) | 0.18 | 0.24 | -25.0% (low) |
|
||
| VPD avg Jul 1-14 (kPa) | 1.82 | 1.35 | +34.8% (high) |
|
||
|
||
STATE-BY-STATE BREAKDOWN:
|
||
|
||
| State | Model Yield | USDA Trend | Deviation | Key Driver |
|
||
|-----------|-------------|------------|-----------|----------------------|
|
||
| Iowa | 178 bu/ac | 198 bu/ac | -10.1% | Jul drought + heat |
|
||
| Illinois | 196 bu/ac | 202 bu/ac | -3.0% | Adequate Jun rain |
|
||
| Indiana | 189 bu/ac | 194 bu/ac | -2.6% | Moderate stress |
|
||
| Minnesota | 184 bu/ac | 192 bu/ac | -4.2% | VPD stress, ok rain |
|
||
| Nebraska | 172 bu/ac | 196 bu/ac | -12.2% | Severe Jul drought |
|
||
| Ohio | 192 bu/ac | 190 bu/ac | +1.1% | Good conditions |
|
||
| S. Dakota | 152 bu/ac | 168 bu/ac | -9.5% | Drought + thin soils |
|
||
| Wisconsin | 176 bu/ac | 182 bu/ac | -3.3% | Moderate |
|
||
|
||
NATIONAL WEIGHTED ESTIMATE:
|
||
|
||
Model yield: 181.4 bu/ac
|
||
USDA trend yield: 194.0 bu/ac (technology trend)
|
||
Model vs trend: -12.6 bu/ac (-6.5%)
|
||
|
||
90% confidence interval: 175 — 188 bu/ac
|
||
|
||
SCENARIO ANALYSIS (remainder of season):
|
||
|
||
| Scenario | Yield Est | Probability |
|
||
|----------------------------------|------------|-------------|
|
||
| Drought breaks by Jul 25 (rain) | 188 bu/ac | 35% |
|
||
| Current pattern continues | 181 bu/ac | 45% |
|
||
| Drought intensifies through Aug | 172 bu/ac | 20% |
|
||
|
||
The 16-day forecast shows ECMWF bringing a cold front through the
|
||
western Corn Belt around Jul 24-26 with 0.5-1.0 inches. If verified,
|
||
the "drought breaks" scenario becomes more likely, but the damage
|
||
during pollination week (Jul 10-20) in Iowa and Nebraska is already
|
||
locked in. Those bushels aren't coming back.
|
||
|
||
CONTEXT: USDA's July WASDE used a trend yield of 181 bu/ac (their first
|
||
estimate). Our model agrees with USDA's number this month, but for
|
||
different reasons — USDA hasn't incorporated the July heat/drought yet
|
||
(their July report uses trend, not weather). When USDA releases their
|
||
August survey-based estimate, expect them to cut to 177-183 range.
|
||
|
||
MARKET IMPLICATION: If our model is right at 181 and USDA's August
|
||
estimate comes in at 179 (a 2 bu/ac cut from trend), that removes
|
||
~280 million bushels from US production. At current demand, that would
|
||
cut ending stocks from 2.1 billion to 1.82 billion bushels and push
|
||
the stocks/use ratio from 14.5% to 12.5%. Dec corn futures should
|
||
reprice $0.25-$0.40 higher.
|
||
|
||
PDF report: reports/yield-model-corn-2026-07-15.pdf
|
||
|
||
Want me to run soybeans too? Soybean critical period (pod fill) hasn't
|
||
started yet — the model has less signal this early.
|
||
|
||
|
||
=============================================================
|
||
SKILL 9: Parana River Drought & Logistics Risk
|
||
=============================================================
|
||
|
||
The logistics analyst builds something no one else on the street has:
|
||
|
||
User: /agent-skill-creator Here's a unique edge I want to build: the Parana River system in Argentina/Brazil handles 80% of Argentine grain exports from the Rosario-Santa Fe port complex. When the Parana runs low, draft restrictions limit barge loading, which increases freight costs and delays shipments. The river level at Rosario is the single most important logistics variable for Argentine soy/corn exports. I want to track this using weather. My idea: pull historical and forecast precipitation for the Parana River watershed — the Upper Parana in Brazil (Minas Gerais, Sao Paulo, Parana, Mato Grosso do Sul) feeds the river. If rainfall in the watershed is below normal for 60+ days, river levels at Rosario drop 2-3 months later (the lag from upstream rain to downstream flow). I can use Open-Meteo's 80 years of precipitation history to build a rainfall-to-river-level lag model, then use the 16-day forecast plus seasonal climate projections to predict river levels 1-3 months ahead. Nobody on Wall Street models this — they react to draft restrictions AFTER they're announced. We'd see them coming weeks ahead. Open-Meteo key in env as OPEN_METEO_API_KEY. Also I have a spreadsheet with historical Rosario river gauge readings from Argentina's naval hydrography service: data/rosario-river-levels-1990-2026.xlsx
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
Reading data/rosario-river-levels-1990-2026.xlsx...
|
||
|
||
35 years of daily river gauge readings at Rosario (km 416 of the Parana).
|
||
I can see the 2021-2022 historic drought clearly — river dropped to 0.08m
|
||
(normal is ~3.5m), which caused $2.4 billion in extra freight costs for
|
||
Argentine exporters. Let me build this.
|
||
|
||
Implicit requirements:
|
||
- Open-Meteo Historical API: daily precipitation_sum for 12 sub-basins
|
||
across the Upper Parana watershed in Brazil (lat/long grid covering
|
||
~800,000 km² of catchment area)
|
||
- Open-Meteo Forecast API: 16-day precipitation forecast for same grid
|
||
- Open-Meteo Climate API: seasonal precipitation projections (CMIP6
|
||
models) for 1-3 month outlook
|
||
- Ensemble API (ensemble-api.open-meteo.com): ECMWF 51-member and GFS
|
||
31-member ensembles for probabilistic rainfall forecasts — critical
|
||
for the "will it rain enough?" question
|
||
- The rainfall-to-river-level lag varies by sub-basin: Upper Parana
|
||
(Mato Grosso do Sul) has a 30-45 day lag to Rosario, Tietê tributary
|
||
(São Paulo) has 45-60 day lag, Paranaíba (Minas Gerais/Goiás) has
|
||
60-90 day lag
|
||
- Itaipu Dam releases affect downstream flow — need to account for
|
||
regulated vs natural flow
|
||
- Draft restriction thresholds: below 2.0m at Rosario = Panamax vessels
|
||
can't fully load. Below 1.0m = barges limited to 60% capacity.
|
||
Below 0.5m = effective port shutdown for ocean vessels
|
||
- Export calendar: Argentine soy harvest is Mar-May, corn harvest is
|
||
Mar-Jun. Peak export season is Apr-Aug. River problems during this
|
||
window are catastrophic for basis and FOB premiums
|
||
- The skill should output: current river level, 30/60/90-day predicted
|
||
level, probability of draft restrictions, and estimated freight cost
|
||
impact
|
||
|
||
Building...
|
||
|
||
parana-river-risk-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── openmeteo_client.py # Open-Meteo API wrapper (all 4 endpoints)
|
||
│ ├── watershed_rainfall.py # 12 sub-basin precipitation aggregation
|
||
│ ├── lag_model.py # Rainfall-to-river-level lag regression
|
||
│ │ # (30/45/60/90 day lags by sub-basin)
|
||
│ ├── river_level_predictor.py # Combines: actuals + forecast + climate +
|
||
│ │ # ensemble probabilities → predicted level
|
||
│ ├── ensemble_probabilities.py # ECMWF 51-member rainfall probability
|
||
│ │ # distribution for watershed
|
||
│ ├── draft_restriction.py # Threshold model: level → loading capacity
|
||
│ ├── freight_impact.py # Estimated $/MT cost increase by level
|
||
│ ├── export_window_risk.py # Overlay predictions on export calendar
|
||
│ └── report_builder.py # Parana River Risk Report (PDF + charts)
|
||
├── references/
|
||
│ ├── parana-watershed.md # 12 sub-basins, areas, lag times
|
||
│ ├── rosario-gauge.md # Gauge location, datum, thresholds
|
||
│ ├── draft-restrictions.md # Historical restrictions + impacts
|
||
│ ├── itaipu-releases.md # Dam regulation effects
|
||
│ └── methodology.md # Lag model, ensemble approach
|
||
├── assets/
|
||
│ ├── sub_basins.geojson # 12 watershed polygons with centroids
|
||
│ ├── rosario_historical.csv # River gauge 1990-2026
|
||
│ └── trained_lag_model.json # Serialized lag coefficients
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED
|
||
Security: PASSED (OPEN_METEO_API_KEY read from env)
|
||
Installed at: ~/.claude/skills/parana-river-risk-skill
|
||
|
||
Shared to: github.com/acme-trading/parana-river-risk-skill
|
||
|
||
|
||
--- February, heading into Argentine export season ---
|
||
|
||
Logistics Analyst: /parana-river-risk-skill What's the river outlook for the April-August export window? I need to know if we should be hedging freight.
|
||
|
||
Copilot (loading parana-river-risk-skill):
|
||
|
||
Pulling Open-Meteo historical precip for Parana watershed (last 180 days)...
|
||
Pulling 16-day forecast (ECMWF + GFS)...
|
||
Pulling ECMWF 51-member ensemble for next 15 days...
|
||
Pulling Climate API seasonal projection (Mar-Aug 2026)...
|
||
Running lag model...
|
||
|
||
PARANA RIVER RISK REPORT — February 28, 2026
|
||
|
||
CURRENT STATUS:
|
||
River level at Rosario: 2.85m (normal for late Feb: 3.8m)
|
||
Status: BELOW NORMAL but above restriction threshold (2.0m)
|
||
|
||
WATERSHED RAINFALL — LAST 90 DAYS (Nov-Feb):
|
||
|
||
| Sub-basin | Actual (mm) | Normal (mm) | Deficit |
|
||
|---------------------|-------------|-------------|----------|
|
||
| Upper Parana (MS) | 680 | 820 | -17.1% |
|
||
| Tietê (SP) | 590 | 780 | -24.4% |
|
||
| Paranaíba (MG/GO) | 710 | 850 | -16.5% |
|
||
| Iguaçu (PR) | 820 | 790 | +3.8% |
|
||
| Paraguay River | 440 | 620 | -29.0% |
|
||
| TOTAL WATERSHED | 3,240 | 3,860 | -16.1% |
|
||
|
||
The Tietê (São Paulo) and Paraguay River sub-basins are significantly
|
||
below normal. The Iguaçu (Paraná state) is the only sub-basin at or
|
||
above normal.
|
||
|
||
16-DAY FORECAST:
|
||
|
||
| Period | Forecast Precip | Normal | Outlook |
|
||
|-----------------|-----------------|---------|-------------|
|
||
| Mar 1-7 | 35mm | 45mm | Below normal|
|
||
| Mar 8-15 | 50mm | 42mm | Above normal|
|
||
|
||
A frontal system around Mar 10-12 brings the best rain chance in weeks,
|
||
but it's concentrated over the Iguaçu sub-basin (southern watershed),
|
||
which has the shortest lag to Rosario. Upper Parana stays drier.
|
||
|
||
ENSEMBLE PROBABILITY (ECMWF 51-member, next 15 days):
|
||
- Probability of total watershed rainfall > normal: 22%
|
||
- Probability of total watershed rainfall < 75% of normal: 41%
|
||
- Probability of total watershed rainfall < 50% of normal: 12%
|
||
|
||
PREDICTED RIVER LEVELS AT ROSARIO:
|
||
|
||
| Period | Predicted Level | Normal | Restriction Risk |
|
||
|-------------|-----------------|---------|------------------|
|
||
| March | 2.6m ± 0.4m | 3.5m | LOW (>2.0m) |
|
||
| April | 2.1m ± 0.5m | 3.0m | MODERATE (near threshold) |
|
||
| May | 1.6m ± 0.6m | 2.5m | HIGH (<2.0m likely) |
|
||
| June | 1.3m ± 0.7m | 2.2m | HIGH |
|
||
| July | 1.5m ± 0.8m | 2.0m | MODERATE-HIGH |
|
||
| August | 1.8m ± 0.7m | 2.1m | MODERATE |
|
||
|
||
PROBABILITY OF DRAFT RESTRICTIONS (level < 2.0m) BY MONTH:
|
||
| April | May | June | July | August |
|
||
|-------|------|------|------|--------|
|
||
| 38% | 72% | 81% | 65% | 52% |
|
||
|
||
FREIGHT IMPACT ESTIMATE:
|
||
|
||
Current Up-River freight (Rosario-to-vessel): $18/MT
|
||
If level drops to 1.5m (May estimate): $28-32/MT (+$10-14/MT)
|
||
If level drops to 1.0m (worst case): $38-45/MT (+$20-27/MT)
|
||
|
||
For context: Argentine FOB soybean premium is currently +$8/MT over
|
||
CBOT. A $14/MT freight increase would push FOB premiums to +$22/MT,
|
||
which is close to the $25/MT peak during the 2021-22 Parana drought.
|
||
|
||
CLIMATE MODEL SEASONAL OUTLOOK (Mar-Aug 2026):
|
||
5 of 7 CMIP6 models show below-normal precipitation for the Upper
|
||
Parana watershed through May, with a return to normal by July. This
|
||
is consistent with the current weak La Niña signal, which historically
|
||
reduces rainfall in southern Brazil and the Parana basin.
|
||
|
||
RECOMMENDATION:
|
||
High probability (72%) of draft restrictions in May, coinciding with
|
||
peak Argentine soybean export shipments. This is a tradeable event:
|
||
- Argentine FOB soy basis will widen
|
||
- Brazilian soy basis (Paranaguá, Santos) will strengthen as buyers
|
||
divert from Rosario
|
||
- Barge freight futures (if available) should be bought
|
||
- CBOT May-July soybean spread could steepen on logistics premium
|
||
|
||
If you want to hedge, do it now — by the time restrictions are
|
||
announced (typically 2-3 weeks before they bite), the freight market
|
||
will have already moved.
|
||
|
||
PDF: reports/parana-river-risk-2026-02-28.pdf
|
||
|
||
|
||
=============================================================
|
||
SKILL 10: Global Crop Calendar & Anomaly Scanner
|
||
=============================================================
|
||
|
||
The weather analyst builds a skill that scans every major growing region
|
||
on Earth simultaneously — the "Bloomberg terminal for crop weather":
|
||
|
||
User: /agent-skill-creator I want a skill that monitors weather anomalies across every major crop-producing region globally — all at once. The commodity markets move when weather deviates from normal in a key region at a critical growth stage. The problem: there are 30+ regions that matter and each has a different crop calendar. I can't manually check weather for Brazil, Argentina, US, EU, Black Sea, India, China, SE Asia, and Australia every day. I want the skill to: (1) know the crop calendar for each commodity in each region (planting, vegetative, reproductive, harvest), (2) pull the current weather from Open-Meteo for each region daily, (3) compare against the 30-year climatology, (4) flag any region where a critical weather metric (precip, temp, soil moisture) deviates beyond 1.5 standard deviations from normal during a critical growth phase, and (5) rank the anomalies by market impact (a drought during US corn pollination matters more than excess rain during Ukrainian wheat dormancy). Use Open-Meteo's historical archive for the 30-year baselines and the forecast API for the forward-looking 16-day window. OPEN_METEO_API_KEY is in my env. Here's my spreadsheet with all the regions and crop calendars: data/global-crop-calendar.xlsx
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
Reading data/global-crop-calendar.xlsx...
|
||
|
||
32 region-commodity combinations across 14 countries. Each with planting,
|
||
vegetative, reproductive, and harvest date ranges. This is a proper global
|
||
surveillance system. Let me build this.
|
||
|
||
Implicit requirements:
|
||
- Open-Meteo Historical API: 30-year daily climatology (1994-2023)
|
||
for 32 regions. Variables: temperature_2m_max, temperature_2m_min,
|
||
precipitation_sum, soil_moisture_0_to_7cm, et0_fao_evapotranspiration,
|
||
vapour_pressure_deficit
|
||
- Open-Meteo Forecast API: current + 16-day for all 32 regions
|
||
- Each region needs multiple grid points (not just one centroid) to
|
||
capture spatial variability — a 3x3 grid (~100km spacing) per region
|
||
- The 30-year climatology must be pre-computed and cached (not pulled
|
||
daily — 32 regions × 30 years = too many API calls in real-time)
|
||
- Standard deviation calculation: for each variable, each day-of-year,
|
||
each region → mean and stddev from 30-year history
|
||
- "Market impact weight": reproductive stage anomalies weighted 3x,
|
||
vegetative 2x, planting/harvest 1x. Production volume of the region
|
||
also weights the score (Iowa corn matters more than Ohio corn)
|
||
- Output: a ranked "heat map" — red/orange/yellow/green for each
|
||
region-commodity pair, sorted by composite impact score
|
||
- The scanner should run in < 30 seconds despite querying 32 regions
|
||
(batch and parallelize Open-Meteo calls, 3x3 grid = 288 locations)
|
||
- Ensemble API for the 16-day window adds probabilistic dimension —
|
||
"65% chance this anomaly persists through next week"
|
||
|
||
Building...
|
||
|
||
crop-anomaly-scanner-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── openmeteo_client.py # Open-Meteo API wrapper (batch, parallel)
|
||
│ ├── climatology_builder.py # Pre-compute 30yr normals + stddev
|
||
│ │ # (run once, cache to assets/)
|
||
│ ├── anomaly_detector.py # Current weather vs climatology,
|
||
│ │ # z-score by variable by region
|
||
│ ├── growth_stage_tracker.py # What stage is each crop in today?
|
||
│ ├── impact_scorer.py # Anomaly × growth stage × production
|
||
│ │ # volume = composite impact score
|
||
│ ├── ensemble_persistence.py # Will the anomaly continue? (ECMWF ensemble)
|
||
│ ├── region_grid.py # 3x3 grid generator per region
|
||
│ ├── dashboard_builder.py # Global heat map (HTML interactive)
|
||
│ └── daily_briefing.py # "Top 5 anomalies today" PDF
|
||
├── references/
|
||
│ ├── crop-calendar.md # 32 region-commodity growth phases
|
||
│ ├── region-definitions.md # Lat/long bounds, production weights
|
||
│ ├── anomaly-thresholds.md # z-score levels, impact weighting
|
||
│ ├── historical-analogues.md # Past anomaly events + market outcomes
|
||
│ └── methodology.md # Full scoring methodology
|
||
├── assets/
|
||
│ ├── regions.json # 32 regions with grids + weights
|
||
│ ├── crop_calendar.json # Growth phase dates by region-commodity
|
||
│ ├── climatology_cache/ # Pre-computed 30yr normals (per region)
|
||
│ │ ├── us-corn-belt.json
|
||
│ │ ├── brazil-center-west.json
|
||
│ │ ├── argentina-pampas.json
|
||
│ │ └── ... (29 more)
|
||
│ └── production_weights.json # Regional share of global production
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED
|
||
Security: PASSED (OPEN_METEO_API_KEY read from env)
|
||
Installed at: ~/.claude/skills/crop-anomaly-scanner-skill
|
||
|
||
Shared to: github.com/acme-trading/crop-anomaly-scanner-skill
|
||
|
||
|
||
--- Daily morning scan ---
|
||
|
||
Research Director: /crop-anomaly-scanner-skill Morning scan. What's flashing?
|
||
|
||
Copilot (loading crop-anomaly-scanner-skill):
|
||
|
||
Pulling current weather for 32 regions (288 grid points)...
|
||
Comparing against 30-year climatology...
|
||
Scoring by growth stage and production weight...
|
||
|
||
GLOBAL CROP ANOMALY SCANNER — March 4, 2026, 07:15 ET
|
||
|
||
TOP 5 ANOMALIES BY MARKET IMPACT:
|
||
|
||
#1 ARGENTINA PAMPAS — Soybeans (pod fill) SCORE: 9.2
|
||
┌──────────────────────────────────────────────────────────────────┐
|
||
│ Precipitation last 30 days: 42mm (normal: 98mm) z = -2.31 │
|
||
│ Soil moisture 0-7cm: 0.12 m³/m³ (normal: 0.22) z = -2.05 │
|
||
│ Max temperature avg: 34.2°C (normal: 30.8°C) z = +1.72 │
|
||
│ VPD avg: 2.14 kPa (normal: 1.48 kPa) z = +1.89 │
|
||
│ Growth stage: REPRODUCTIVE (R5 pod fill) — CRITICAL │
|
||
│ Ensemble: 78% chance below-normal precip continues 15 days │
|
||
│ │
|
||
│ ANALOGUE: Feb 2018 (similar z-scores) → Argentina lost 20 MMT │
|
||
│ of soybeans, CBOT rallied $2.50/bu over 6 weeks. │
|
||
│ Current deviation isn't as severe yet but accelerating. │
|
||
└──────────────────────────────────────────────────────────────────┘
|
||
|
||
#2 US SOUTHERN PLAINS — Winter wheat (jointing) SCORE: 6.8
|
||
┌──────────────────────────────────────────────────────────────────┐
|
||
│ Precipitation last 60 days: 28mm (normal: 72mm) z = -2.08 │
|
||
│ Soil moisture 0-7cm: 0.14 m³/m³ (normal: 0.21) z = -1.78 │
|
||
│ Growth stage: VEGETATIVE (jointing, approaching boot) │
|
||
│ Region: Kansas, Oklahoma, Texas panhandle │
|
||
│ Ensemble: 55% below-normal precip continues, 30% near-normal │
|
||
│ │
|
||
│ HRW wheat entering its most water-sensitive phase. If drought │
|
||
│ persists through March, expect USDA to lower winter wheat │
|
||
│ condition ratings and KC wheat to firm. │
|
||
└──────────────────────────────────────────────────────────────────┘
|
||
|
||
#3 VIETNAM CENTRAL HIGHLANDS — Robusta coffee (cherry dev) SCORE: 5.4
|
||
┌──────────────────────────────────────────────────────────────────┐
|
||
│ Precipitation last 30 days: 8mm (normal: 22mm) z = -1.62 │
|
||
│ Temperature avg: 26.8°C (normal: 24.1°C) z = +1.87 │
|
||
│ Growth stage: REPRODUCTIVE (cherry development) │
|
||
│ Region: Dak Lak, Lam Dong, Gia Lai provinces │
|
||
│ Ensemble: 60% chance dry pattern continues through mid-March │
|
||
│ │
|
||
│ Vietnam = 40% of global robusta. Dry + warm during cherry dev │
|
||
│ reduces bean size and weight. Could shave 1-2 MMT off the │
|
||
│ 2026/27 harvest estimate. RC robusta may firm on this. │
|
||
└──────────────────────────────────────────────────────────────────┘
|
||
|
||
#4 INDIA — Rabi wheat (grain fill) SCORE: 4.9
|
||
┌──────────────────────────────────────────────────────────────────┐
|
||
│ Max temperature: 33.5°C (normal: 28.9°C) z = +2.12 │
|
||
│ Growth stage: REPRODUCTIVE (grain fill, 3-4 weeks to harvest) │
|
||
│ Region: Punjab, Haryana, Uttar Pradesh, Madhya Pradesh │
|
||
│ │
|
||
│ Terminal heat stress. March heat during grain fill is the #1 │
|
||
│ yield risk for Indian wheat. The 2022 heatwave cost India 5 MMT │
|
||
│ and triggered the export ban. Current temps not yet at 2022 │
|
||
│ levels but approaching. Watch closely this week. │
|
||
└──────────────────────────────────────────────────────────────────┘
|
||
|
||
#5 BRAZIL CENTER-WEST — Safrinha corn (vegetative) SCORE: 4.1
|
||
┌──────────────────────────────────────────────────────────────────┐
|
||
│ Precipitation last 14 days: 18mm (normal: 55mm) z = -1.68 │
|
||
│ Growth stage: VEGETATIVE (V6-V8, recently planted) │
|
||
│ Region: Mato Grosso, Goiás, Mato Grosso do Sul │
|
||
│ │
|
||
│ Safrinha corn was planted late (soy harvest delay) and now │
|
||
│ hitting a dry spell during early vegetative growth. Not critical │
|
||
│ yet — safrinha corn is drought-tolerant in early stages. But if │
|
||
│ dryness persists into April (tasseling), this moves to #1. │
|
||
└──────────────────────────────────────────────────────────────────┘
|
||
|
||
REGIONS ALL CLEAR (no anomalies >1.5 stddev in critical phases):
|
||
EU (France wheat, Germany rapeseed), Black Sea (Ukraine corn/wheat,
|
||
Russia wheat), Australia (canola, wheat — dormant/off-season), China
|
||
(winter wheat — adequate snow cover), US Corn Belt (pre-planting,
|
||
soil moisture recharging), Brazil South (soybean harvest on pace),
|
||
SE Asia (palm oil — normal monsoon), Canada (off-season).
|
||
|
||
Full dashboard: reports/anomaly-dashboard-2026-03-04.html
|
||
PDF briefing: reports/crop-anomalies-2026-03-04.pdf
|
||
|
||
Want me to drill deeper into any of these, or pull up the historical
|
||
analogue analysis for the Argentina situation?
|
||
|
||
|
||
--- Drilling into a specific alert ---
|
||
|
||
Analyst: /crop-anomaly-scanner-skill Pull up the full historical analogue for Argentina #1. How bad could this get?
|
||
|
||
Copilot:
|
||
|
||
Searching 30 years for matching patterns: Pampas soybeans, February
|
||
precip z < -2.0, soil moisture z < -1.5, during reproductive phase...
|
||
|
||
ARGENTINA SOYBEAN DROUGHT — HISTORICAL ANALOGUES
|
||
|
||
5 matching events found:
|
||
|
||
| Year | Feb Precip z | Soil z | Outcome | CBOT Impact |
|
||
|---------|--------------|--------|---------------------|----------------|
|
||
| 2017/18 | -2.45 | -2.20 | 20 MMT production loss | +$2.50/bu (6wk) |
|
||
| 2008/09 | -2.62 | -2.41 | 16 MMT production loss | +$1.80/bu (4wk) |
|
||
| 2011/12 | -1.95 | -1.70 | 12 MMT production loss | +$3.20/bu (8wk) |
|
||
| 2003/04 | -1.88 | -1.55 | 7 MMT production loss | +$0.90/bu (3wk) |
|
||
| 2022/23 | -3.10 | -2.80 | 25 MMT production loss | +$1.40/bu (4wk) |
|
||
|
||
CURRENT 2025/26 vs ANALOGUES:
|
||
Feb precip z: -2.31 (between 2017/18 and 2008/09 severity)
|
||
Soil moisture z: -2.05
|
||
|
||
PRODUCTION IMPACT ESTIMATE:
|
||
Based on analogues, the current deviation pattern suggests a production
|
||
loss of 8-18 MMT from USDA's current 50 MMT estimate.
|
||
|
||
| Scenario | Production | Loss from USDA | Probability |
|
||
|------------------|------------|----------------|-------------|
|
||
| Rain arrives Mar 10-15 | 45 MMT | -5 MMT | 22% |
|
||
| Continued dry Mar | 40 MMT | -10 MMT | 48% |
|
||
| Drought deepens | 35 MMT | -15 MMT | 30% |
|
||
|
||
Note: USDA already cut 2 MMT in March (to 50 from 52). The market has
|
||
priced in ~3-4 MMT of further downside. If the "continued dry" scenario
|
||
plays out (10 MMT total cut), there's 6-7 MMT of production loss NOT
|
||
yet in the price.
|
||
|
||
SOYBEAN MEAL IMPACT: Argentina = 45% of global soybean meal exports.
|
||
A 10 MMT soy production loss = ~7.5 MMT less crush = ~5.5 MMT less
|
||
meal exports. Meal importers (EU, SE Asia) would need to source from
|
||
US or Brazil. CBOT soybean meal could rally $30-50/short ton.
|
||
|
||
16-DAY ENSEMBLE OUTLOOK (ECMWF 51-member):
|
||
Probability of meaningful rain (>25mm) in Pampas next 15 days: 28%
|
||
Probability of continued dry (<10mm) next 15 days: 52%
|
||
Probability of drought-breaking event (>50mm): 8%
|
||
|
||
RECOMMENDATION: The analogues and ensemble data both point toward the
|
||
"continued dry" scenario as most likely. USDA will likely cut another
|
||
3-5 MMT in the April WASDE. The market is under-pricing this risk.
|
||
|
||
|
||
=============================================================
|
||
SKILL 11: Planting Window Advisor
|
||
=============================================================
|
||
|
||
A completely different use case — this one faces the production side,
|
||
not the trading desk. An analyst who also advises farmer clients:
|
||
|
||
User: /agent-skill-creator Our brokerage has farmer clients across the Midwest who ask us every spring: "When should I plant?" I want a skill that answers this using weather data. The decision depends on: (1) soil temperature at 2-inch depth — corn needs >50F sustained for 3 days, soybeans need >55F, (2) soil moisture — too wet and you get compaction, too dry and you need irrigation, the sweet spot is 0.20-0.30 m³/m³, (3) the 7-day forecast — no point planting if a freeze or heavy rain is coming, (4) accumulated GDD so the crop reaches maturity before the first fall frost. Open-Meteo has soil temperature at 0cm and 6cm depth, soil moisture at multiple levels, and the 16-day forecast. For any lat/long a farmer gives me, I want the skill to say "GO — plant corn now" or "WAIT — soil temp at 48F, need 2 more warm days" or "RISK — planting window closing, frost date approaching". OPEN_METEO_API_KEY is in my env.
|
||
|
||
Copilot (loading agent-skill-creator skill):
|
||
|
||
This is a decision-support tool for planting timing. Let me formalize
|
||
the agronomic rules and build it.
|
||
|
||
Implicit requirements:
|
||
- Open-Meteo Forecast API: soil_temperature_6cm (closest to 2-inch
|
||
depth), soil_moisture_0_to_1cm, temperature_2m_min (freeze risk),
|
||
precipitation_sum, for any user-provided lat/long
|
||
- Open-Meteo Historical API: need average first fall frost date
|
||
(temperature_2m_min < 0°C) from 30-year history at the location
|
||
to calculate "days to maturity available"
|
||
- Corn maturity: needs 2,500-2,800 GDD (base 50F) depending on
|
||
hybrid maturity class. Soybean: 2,200-2,600 GDD
|
||
- The skill must accept a location (lat/long, county, zip code, or
|
||
city name) and hybrid maturity (short/medium/full season)
|
||
- "GO/WAIT/RISK" traffic light must consider ALL factors simultaneously
|
||
— soil temp alone isn't enough if rain is forecast
|
||
- Workability factor: if precipitation > 15mm in last 48 hours, soil
|
||
is too wet for heavy equipment regardless of other factors
|
||
- Farmers want a 5-day window recommendation, not just "today" —
|
||
"Best planting day this week: Thursday"
|
||
|
||
Building...
|
||
|
||
planting-window-skill/
|
||
├── SKILL.md
|
||
├── scripts/
|
||
│ ├── openmeteo_client.py # Open-Meteo API wrapper
|
||
│ ├── soil_readiness.py # Soil temp + moisture check
|
||
│ ├── freeze_risk.py # 16-day freeze probability
|
||
│ ├── workability.py # Field trafficability from recent precip
|
||
│ ├── gdd_projection.py # GDD remaining vs maturity requirement
|
||
│ │ # vs average first frost date
|
||
│ ├── window_optimizer.py # Score each day in the next 14 days,
|
||
│ │ # recommend best planting window
|
||
│ ├── frost_date_calculator.py # 30-year avg first fall frost by location
|
||
│ └── advisor_output.py # GO/WAIT/RISK with plain-English reasoning
|
||
├── references/
|
||
│ ├── planting-rules.md # Agronomic decision rules
|
||
│ ├── gdd-maturity-table.md # GDD requirements by hybrid class
|
||
│ ├── soil-thresholds.md # Temperature and moisture thresholds
|
||
│ └── methodology.md
|
||
├── assets/
|
||
│ └── maturity_zones.json # Hybrid maturity GDD by latitude band
|
||
├── install.sh
|
||
└── README.md
|
||
|
||
Validation: PASSED
|
||
Security: PASSED
|
||
Installed at: ~/.claude/skills/planting-window-skill
|
||
|
||
Shared to: github.com/acme-trading/planting-window-skill
|
||
|
||
|
||
--- A farmer client calls in April ---
|
||
|
||
Broker: /planting-window-skill One of my clients near Ames, Iowa (42.03°N, 93.47°W) wants to plant corn this week. Full-season hybrid (2,700 GDD). Is he good to go?
|
||
|
||
Copilot (loading planting-window-skill):
|
||
|
||
Pulling Open-Meteo data for 42.03°N, 93.47°W...
|
||
Forecast: 16 days | Soil data: current + forecast
|
||
Historical: calculating average first fall frost date...
|
||
|
||
PLANTING WINDOW ADVISOR — Ames, Iowa (42.03°N, 93.47°W)
|
||
Crop: Corn | Hybrid: Full season (2,700 GDD required)
|
||
Date: April 14, 2026
|
||
|
||
CURRENT CONDITIONS:
|
||
┌────────────────────────────────────────────────────────────────┐
|
||
│ Soil temp (6cm depth): 52.1°F (need: >50°F for 3 days) │
|
||
│ Consecutive days >50°F: 4 days ✓ PASS │
|
||
│ Soil moisture (0-7cm): 0.27 m³/m³ (ideal: 0.20-0.30) ✓ │
|
||
│ Last significant rain: 3 days ago (12mm) ✓ WORKABLE │
|
||
│ Avg first fall frost: October 12 (30yr avg) │
|
||
│ Days from today to frost: 181 days │
|
||
│ GDD available (Apr14-Oct12): ~2,850 (based on 30yr avg) │
|
||
│ GDD required (full season): 2,700 │
|
||
│ GDD margin: 150 GDD (5.6% buffer) ✓ OK │
|
||
└────────────────────────────────────────────────────────────────┘
|
||
|
||
7-DAY FORECAST:
|
||
| Day | High | Low | Precip | Soil Temp | Verdict |
|
||
|-----------|-------|-------|--------|-----------|--------------|
|
||
| Mon 4/14 | 68°F | 45°F | 0mm | 52°F | PLANTABLE |
|
||
| Tue 4/15 | 72°F | 48°F | 0mm | 53°F | PLANTABLE * |
|
||
| Wed 4/16 | 70°F | 50°F | 0mm | 54°F | PLANTABLE * |
|
||
| Thu 4/17 | 64°F | 46°F | 8mm | 53°F | MARGINAL |
|
||
| Fri 4/18 | 58°F | 40°F | 22mm | 50°F | TOO WET |
|
||
| Sat 4/19 | 55°F | 38°F | 5mm | 48°F | TOO COOL/WET |
|
||
| Sun 4/20 | 62°F | 42°F | 0mm | 49°F | RECOVERING |
|
||
|
||
════════════════════════════════════════════════════════════════
|
||
RECOMMENDATION: GO — PLANT TUESDAY OR WEDNESDAY
|
||
════════════════════════════════════════════════════════════════
|
||
|
||
Best window: Tuesday April 15 and Wednesday April 16. Soil is warm,
|
||
moisture is ideal, and 48 hours of dry weather ahead gives excellent
|
||
field conditions. Thursday is marginal (light rain incoming). Friday
|
||
onward is too wet — a 22mm rain event will make fields unworkable
|
||
for 2-3 days.
|
||
|
||
If your client misses the Tue-Wed window, next opportunity is likely
|
||
Monday April 21 after the weekend system clears and fields dry out
|
||
(soil needs ~48hr of dry weather after 22mm of rain to be trafficable).
|
||
|
||
GDD margin is tight at 5.6% for a full-season hybrid. If planting
|
||
slips past April 25, I'd recommend switching to a medium-season hybrid
|
||
(2,500 GDD) to guarantee maturity before frost. Every day of planting
|
||
delay after April 20 costs roughly 1-1.5 bu/ac in yield potential.
|
||
|
||
|
||
=============================================================
|
||
COMPLETE TEAM SKILL LIBRARY — WITH OPEN-METEO
|
||
=============================================================
|
||
|
||
Updated library with the weather-powered skills:
|
||
|
||
SKILL DATA SOURCES USE CASE
|
||
──────────────────────────────────────────────────────────────────────────────
|
||
wasde-analyzer-skill USDA WASDE, Bloomberg Monthly S&D analysis
|
||
crop-weather-weekly-skill USDA NASS, NOAA, Drought Mon. Weekly crop report
|
||
basis-export-tracker-skill DTN, USDA FAS, barge freight Daily basis + exports
|
||
coffee-fundamental-skill CEPEA, ICE, CFTC, ECMWF Coffee market monitor
|
||
psd-balance-sheet-skill USDA PSD API Global balance sheets
|
||
trade-flow-intel-skill GTT REST API Trade flow shifts
|
||
supply-chain-risk-skill PSD + GTT + FAS Export restriction risk
|
||
yield-predictor-skill Open-Meteo + NASS historical Pre-USDA yield estimates
|
||
parana-river-risk-skill Open-Meteo (4 endpoints) River logistics risk
|
||
crop-anomaly-scanner-skill Open-Meteo (all 32 regions) Global weather alerts
|
||
planting-window-skill Open-Meteo forecast + archive Farmer planting advice
|
||
seasonal-spread-skill CBOT historical Seasonal spread models
|
||
client-briefing-skill Calls other skills internally Weekly flagship report
|
||
|
||
Environment variables required:
|
||
|
||
export OPEN_METEO_API_KEY="your-professional-api-key"
|
||
export PSD_API_KEY="your-usda-fas-api-key"
|
||
export GTT_USER_ID="your-gtt-username"
|
||
export GTT_PASSWORD="your-gtt-password"
|
||
|
||
The Open-Meteo skills are the ones that give the team a genuine
|
||
informational edge. Every bank and fund has PSD data and GTT access.
|
||
But almost nobody is systematically converting granular weather data
|
||
into crop yield estimates, river level predictions, and global anomaly
|
||
scores in real-time. The data is public (Open-Meteo). The edge isn't
|
||
the data — it's the skill that knows what to do with it.
|