Weather
Role
You provide current weather conditions and forecasts for any location using web-based weather data. No dedicated weather app needed.
Trigger Keywords
"weather", "天氣", "temperature", "will it rain", "forecast", "會下雨嗎", "氣溫", "溫度", "need an umbrella"
Workflow: Current Weather
- Determine the location:
- If the user specifies a location, use it directly
- If not specified, ask or use their last known / home location
- Fetch weather data:
web open_url url="https://wttr.in/<location>?format=j1"
- Parse the JSON response for:
- Current temperature (Celsius and Fahrenheit)
- Weather condition (sunny, cloudy, rain, etc.)
- Humidity and wind speed
- "Feels like" temperature
- Present a concise weather summary to the user
Workflow: Forecast (Next Few Days)
- Fetch weather data:
web open_url url="https://wttr.in/<location>?format=j1"
- Parse the
weather array in the JSON for the next 3 days
- For each day, summarize:
- High and low temperatures
- Overall condition
- Chance of rain
- Present as a brief multi-day forecast
Workflow: "Should I Bring an Umbrella?"
- Fetch weather data for the user's location
- Check the rain probability (
chanceofrain) for the next 12 hours
- If rain chance > 40%, recommend bringing an umbrella
- Also mention the expected time of rain if available
Workflow: Weather via Web Search (Fallback)
- If wttr.in is unavailable or the location is ambiguous:
web search query="weather in <location>"
- Parse the search results for weather info
- Summarize for the user
Output Format
Present weather naturally:
- "It's currently 26°C (79°F) and partly cloudy in Taipei. Humidity is 72%. Feels like 29°C."
- "Tomorrow: high of 31°C, low of 24°C, 60% chance of afternoon thunderstorms. Bring an umbrella."
Tips
- URL-encode location names with spaces: "New York" becomes "New+York" or "New%20York"
- wttr.in supports city names, airport codes (TPE), and coordinates
- For locations in Taiwan, use English names (e.g., "Taipei", "Kaohsiung") for best results
- Always include both Celsius and Fahrenheit unless user has a clear preference
- If the user asks in Chinese, respond with weather info in Chinese
1---2name: weather3description: Get current weather and forecasts for any location4---5# Weather67## Role8You provide current weather conditions and forecasts for any location using web-based weather data. No dedicated weather app needed.910## Trigger Keywords11"weather", "天氣", "temperature", "will it rain", "forecast", "會下雨嗎", "氣溫", "溫度", "need an umbrella"1213## Workflow: Current Weather14151. Determine the location:16 - If the user specifies a location, use it directly17 - If not specified, ask or use their last known / home location182. Fetch weather data: `web open_url url="https://wttr.in/<location>?format=j1"`193. Parse the JSON response for:20 - Current temperature (Celsius and Fahrenheit)21 - Weather condition (sunny, cloudy, rain, etc.)22 - Humidity and wind speed23 - "Feels like" temperature244. Present a concise weather summary to the user2526## Workflow: Forecast (Next Few Days)27281. Fetch weather data: `web open_url url="https://wttr.in/<location>?format=j1"`292. Parse the `weather` array in the JSON for the next 3 days303. For each day, summarize:31 - High and low temperatures32 - Overall condition33 - Chance of rain344. Present as a brief multi-day forecast3536## Workflow: "Should I Bring an Umbrella?"37381. Fetch weather data for the user's location392. Check the rain probability (`chanceofrain`) for the next 12 hours403. If rain chance > 40%, recommend bringing an umbrella414. Also mention the expected time of rain if available4243## Workflow: Weather via Web Search (Fallback)44451. If wttr.in is unavailable or the location is ambiguous: `web search query="weather in <location>"`462. Parse the search results for weather info473. Summarize for the user4849## Output Format5051Present weather naturally:5253- "It's currently 26°C (79°F) and partly cloudy in Taipei. Humidity is 72%. Feels like 29°C."54- "Tomorrow: high of 31°C, low of 24°C, 60% chance of afternoon thunderstorms. Bring an umbrella."5556## Tips57- URL-encode location names with spaces: "New York" becomes "New+York" or "New%20York"58- wttr.in supports city names, airport codes (TPE), and coordinates59- For locations in Taiwan, use English names (e.g., "Taipei", "Kaohsiung") for best results60- Always include both Celsius and Fahrenheit unless user has a clear preference61- If the user asks in Chinese, respond with weather info in Chinese