Add 3 new skill simulations: PSD balance sheet builder (global S&D via PSD_API_KEY), GTT trade flow intelligence (origin-destination matrices, emerging corridor detection), and combined PSD+GTT supply chain risk monitor with divergence alerts. Updated team skill library summary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1279 lines
64 KiB
Text
1279 lines
64 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.
|