diff --git a/.claude/agents/weather-agent.md b/.claude/agents/weather-agent.md index da3741c..01c5857 100644 --- a/.claude/agents/weather-agent.md +++ b/.claude/agents/weather-agent.md @@ -3,7 +3,7 @@ name: weather-agent description: Use this agent PROACTIVELY when you need to fetch weather data for Dubai, UAE. This agent fetches real-time temperature from wttr.in API using its preloaded weather-fetcher skill. tools: WebFetch, Read, Write, Edit model: sonnet -color: teal +color: green maxTurns: 5 permissionMode: acceptEdits memory: project diff --git a/.claude/settings.json b/.claude/settings.json index 379ef96..1840bad 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -16,6 +16,7 @@ "mcp__reddit-mcp-server__search_reddit", "mcp__tavily-web-search__tavily_search", "mcp__tavily-web-search__tavily_extract", + "WebFetch(domain:api.open-meteo.com)", "WebFetch(domain:raw.githubusercontent.com)", "WebFetch(domain:docs.anthropic.com)", "WebFetch(domain:support.claude.com)", diff --git a/.claude/skills/weather-fetcher/SKILL.md b/.claude/skills/weather-fetcher/SKILL.md index 83075ff..7b4c4ba 100644 --- a/.claude/skills/weather-fetcher/SKILL.md +++ b/.claude/skills/weather-fetcher/SKILL.md @@ -1,6 +1,6 @@ --- name: weather-fetcher -description: Instructions for fetching current weather temperature data for Dubai, UAE from wttr.in API +description: Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API user-invocable: false --- @@ -14,13 +14,17 @@ Fetch the current temperature for Dubai, UAE in the requested unit (Celsius or F ## Instructions -1. **Fetch Weather Data**: Use the WebFetch tool to get current weather data for Dubai from wttr.in API: - - URL: `https://wttr.in/Dubai?format=j1` - - This returns JSON format weather data +1. **Fetch Weather Data**: Use the WebFetch tool to get current weather data for Dubai from the Open-Meteo API. + + For **Celsius**: + - URL: `https://api.open-meteo.com/v1/forecast?latitude=25.2048&longitude=55.2708¤t=temperature_2m&temperature_unit=celsius` + + For **Fahrenheit**: + - URL: `https://api.open-meteo.com/v1/forecast?latitude=25.2048&longitude=55.2708¤t=temperature_2m&temperature_unit=fahrenheit` 2. **Extract Temperature**: From the JSON response, extract the current temperature: - - For Celsius: use `temp_C` from the `current_condition` section - - For Fahrenheit: use `temp_F` from the `current_condition` section + - Field: `current.temperature_2m` + - Unit label is in: `current_units.temperature_2m` 3. **Return Result**: Return the temperature value and unit clearly. @@ -35,6 +39,7 @@ Unit: [Celsius/Fahrenheit] ## Notes - Only fetch the temperature, do not perform any transformations or write any files -- Use wttr.in as it provides reliable, free weather data +- Open-Meteo is free, requires no API key, and uses coordinate-based lookups for reliability +- Dubai coordinates: latitude 25.2048, longitude 55.2708 - Return the numeric temperature value and unit clearly - Support both Celsius and Fahrenheit based on the caller's request diff --git a/orchestration-workflow/output.md b/orchestration-workflow/output.md index eceb653..09a7cd3 100644 --- a/orchestration-workflow/output.md +++ b/orchestration-workflow/output.md @@ -1,7 +1,7 @@ # Weather Result ## Temperature -32°C +26.8°C ## Location Dubai, UAE diff --git a/orchestration-workflow/weather.svg b/orchestration-workflow/weather.svg index bb3abc4..d41fa46 100644 --- a/orchestration-workflow/weather.svg +++ b/orchestration-workflow/weather.svg @@ -1,6 +1,6 @@ Unit: Celsius - 32°C + 26.8°C Dubai, UAE