Update README with climate-anomalies-roye example

Add detailed example of climate-anomalies-roye skill created by agent-creator.
Includes complete 5-phase breakdown, statistics, and usage examples.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Francy Lisboa 2025-10-18 12:09:55 -03:00
parent 5311fda5fc
commit 1bffcbb09c

129
README.md
View file

@ -321,93 +321,126 @@ Phase 3-5: Implement everything
--- ---
### Example 3: Climate (Real Case from Today!) ### Example 3: Climate Anomalies - Dominic Royé Style (Real Case from Today!)
**👤 Input:** **👤 Input:**
``` ```
"Create agent for climate analysis of Sorriso, Mato Grosso. "Create automated workflow for climate anomaly analysis following Dominic Royé methodology.
Need to analyze temperature and precipitation, historical trends." Same procedure, always, for anywhere in the world, finding updated raw data,
processing exactly as in the tutorial, and generating the same chart (same colors,
same quadrants, same logic)."
``` ```
**🤖 Claude executed (5 autonomous phases):** **🤖 Claude executed (5 autonomous phases):**
``` ```
🔍 PHASE 1: Climate API Research 🔍 PHASE 1: Climate API Research
Researched: INMET, Open-Meteo, OpenWeather, Visual Crossing Researched: Meteostat, Open-Meteo, ERA5, NOAA, Weather.gov
Compared: Coverage, cost, historical data Compared: Coverage, cost, historical data, quality
✓ DECIDED: Open-Meteo Historical Weather API ✓ DECIDED: Multi-API Strategy
• Free (no API key!) • Primary: Meteostat (observational data)
• Data since 1940 (84+ years) • Fallback: Open-Meteo (ERA5 reanalysis, global coverage)
• ERA5 reanalysis (high quality) • Automatic failover for maximum reliability
• REST API (easy integration)
🎨 PHASE 2: Analysis Design 🎨 PHASE 2: Analysis Design
Brainstorm: 15 typical questions Based on Dominic Royé methodology:
✓ DEFINED: 6 main analyses ✓ DEFINED: Climate Anomaly Scatter Plot
1. Basic time series • Axis X: Precipitation anomaly (%)
2. Temporal comparison (YoY) • Axis Y: Temperature anomaly (°C)
3. Trend analysis (CAGR, regression) • 4 colored quadrants (wet-warm, dry-warm, wet-cold, dry-cold)
4. Anomaly detection (Z-score) • Seasonal analysis (DJF, MAM, JJA, SON)
5. Seasonal analysis (monthly climatology) • Climate normal baseline (1991-2020 or 1981-2010)
6. Descriptive statistics • Labeled extreme years with auto-repulsion
🏗️ PHASE 3: Architecture 🏗️ PHASE 3: Architecture
✓ STRUCTURED: ✓ STRUCTURED (modular design):
scripts/ scripts/
- fetch_climate.py (320 lines) - climate_anomalies.py (580 lines) - Integrated pipeline
- parse_climate.py (180 lines) - fetch_climate.py (480 lines) - Multi-API client
- analyze_climate.py (420 lines) - parse_climate.py (370 lines) - Seasonal aggregation
- plot_anomalies.py (350 lines) - Dominic Royé visualization
utils/ utils/
- cache_manager.py (350 lines) - api_factory.py (210 lines) - Factory pattern
- validators.py (450 lines) - cache_manager.py (260 lines) - Smart cache (TTL by year)
- statistics.py (350 lines) - validators.py (200 lines) - Blocking validations
✓ Cache: Historical permanent, current year 24h - context_validators.py (311 lines) - Context warnings
✓ Validations: Ranges, physical consistency, continuity ✓ Cache: Historical permanent, previous year 30d, current 24h
✓ Validations: 16 types (8 blocking + 8 contextual)
🎯 PHASE 4: Automatic Detection 🎯 PHASE 4: Automatic Detection
✓ KEYWORDS: Sorriso, temperature, precipitation, rain, climate, ✓ KEYWORDS: Dominic Royé, climate anomalies, quadrants,
trend, historical, anomaly, compare DJF MAM JJA SON, temperature precipitation,
✓ DESCRIPTION: 200 words optimized wet-warm dry-warm wet-cold dry-cold
✓ DESCRIPTION: Optimized for multi-language detection
⚙️ PHASE 5: Complete Implementation ⚙️ PHASE 5: Complete Implementation
✓ .claude-plugin/marketplace.json ✓ .claude-plugin/marketplace.json (validated)
✓ SKILL.md (6,800 words) ✓ SKILL.md (7,000 words)
✓ Python scripts (2,070 lines) ✓ Python scripts (2,761 lines)
✓ References (1,500 words) ✓ References (8,000 words)
✓ Configs (config.json, metadata.json) - roye-methodology.md
✓ README.md + DECISIONS.md - meteostat-guide.md
- open-meteo-guide.md
- troubleshooting.md
✓ Exact colors: #F7A699, #C23B33, #2C6CB0, #D4E3F3
✓ Labeled points = HOLLOW circles (confirmed by reference image)
✓ README.md + CORRECTIONS.md + EXAMPLES.md
✅ AGENT CREATED: ./climate-analysis-sorriso-mt/ ✅ AGENT CREATED: ./climate-anomalies-roye/
``` ```
**📊 Statistics:** **📊 Statistics:**
- **Code:** 2,070 lines of Python - **Code:** 2,761 lines of Python (10 scripts)
- **Documentation:** 13,600 words - **Documentation:** 20,000+ words (12 files)
- **Files:** 16 main files - **Files:** 24 main files
- **Time:** ~90 minutes of autonomous creation - **Time:** ~90 minutes of autonomous creation
- **Corrections:** 3 critical fixes applied (v1.0.1)
**🎨 Visual Output:**
Generates scatter plots identical to Dominic Royé's methodology:
- Temperature anomaly vs Precipitation anomaly
- 4 colored quadrants (exact hex colors)
- Labeled extreme years (hollow circles)
- High quality: 11×8 inches, 130 DPI
**💻 Installation of created agent:** **💻 Installation of created agent:**
```bash ```bash
# In terminal # In terminal
cd climate-analysis-sorriso-mt cd climate-anomalies-roye
pip install -r requirements.txt pip install -r requirements.txt
# In Claude Code # In Claude Code
/plugin marketplace add ./climate-analysis-sorriso-mt /plugin marketplace add ./climate-anomalies-roye
``` ```
**🎯 Using the created agent:** **🎯 Using the created agent:**
``` ```
👤 "What's the average temperature in Sorriso over the last 10 years?" 👤 "Climate anomalies for Buenos Aires, summer season DJF"
🤖 [Skill activates automatically] 🤖 [Skill activates automatically]
[Fetches data from API] [Fetches data: Meteostat or Open-Meteo]
[Analyzes and responds] [Processes: seasonal aggregation, anomaly calculation]
[Validates: PHASE 2.5 - comprehensive context report]
[Generates: PNG chart in Dominic Royé style]
[Returns: Chart + interpretation with context]
👤 "Rain trend in Sorriso since 1990" 👤 "Anomalies for Paris, winter DJF, baseline 1981-2010"
🤖 [34-year trend analysis] 🤖 [Complete analysis with custom normal period]
[Returns rate of change, significance, projection] [Chart shows extreme years labeled]
Output files generated:
• data/raw/location_daily.csv (raw data, for audit)
• data/processed/location_season_normal.csv (climatology + anomalies)
• data/out/location_season_normal.png (Dominic Royé chart) ✨
``` ```
**🛡️ Quality Guarantees:**
- ✅ Multi-API with automatic fallback
- ✅ 16 validation layers (blocking + contextual)
- ✅ Users NEVER receive data without adequate context
- ✅ Automatic detection of climate change trends
- ✅ 100% reproducible (same inputs → same outputs)
- ✅ Auditable (raw data saved for verification)
--- ---
## 🔄 How It Works: The 5 Autonomous Phases ## 🔄 How It Works: The 5 Autonomous Phases