Install
openclaw skills install weather-outfit-advisorQuery weather and provide outfit recommendations. When information is insufficient, ask about destination, date, and clothing preferences. Uses free weather APIs.
openclaw skills install weather-outfit-advisorProvides personalized outfit recommendations based on real-time weather data for your destination and your personal clothing preferences.
Before providing recommendations, must confirm the following three key pieces of information:
Information Extraction Strategy:
Relative Date Conversion Rules:
Example:
User: "I'm going to Hangzhou tomorrow"
→ Extract: destination = Hangzhou, date = tomorrow
→ Convert: get current date (e.g., 2026-04-01), calculate tomorrow = 2026-04-02
→ Missing: clothing preferences
→ Action: ask about clothing preferences
Adopt different clarification strategies based on the number of missing items:
Ask only about the missing item:
If only missing clothing preferences:
Sure, I'll help you check the weather for [city] on [date].
To make the recommendation more suitable for you, please tell me about your clothing preferences:
- Are you usually sensitive to cold or heat?
- What style do you prefer? (casual/business/sports, etc.)
- Any special needs? (such as formal occasions, outdoor activities, etc.)
If only missing date:
When are you planning to travel? (Please provide a specific date, or say "tomorrow", "day after tomorrow", etc.)
If only missing destination:
What is your travel destination? (Please provide the city name)
When multiple items are missing, list all questions at once:
To provide you with the most suitable outfit recommendations, I need some information:
1. What is your travel destination?
2. When exactly are you traveling? (You can say "tomorrow", "April 5th", etc.)
3. What are your usual clothing habits? (For example, sensitive to cold/heat, preferred style, etc.)
When users use relative dates:
Recognize Keywords:
Conversion Logic:
Example:
User: "I'm going to Hangzhou tomorrow"
→ System gets current date: 2026-04-01
→ Calculate: tomorrow = 2026-04-02
→ Response confirmation: "Sure, I'll check the weather for Hangzhou tomorrow (April 2nd)..."
Use the provided Python script (recommended):
# Basic usage
python scripts/get_weather.py <city> [date]
# Examples
python scripts/get_weather.py Hangzhou 2026-04-02
python scripts/get_weather.py Beijing tomorrow
python scripts/get_weather.py Shanghai tomorrow
Script Features:
Output Example (JSON format):
{
"success": true,
"city": "Hangzhou",
"query_date": "2026-04-01",
"target_date": "2026-04-02",
"current": {
"temp_c": 19,
"feels_like_c": 19,
"humidity": 56,
"weather_desc": "Patchy rain nearby",
"wind_speed_kmph": 6,
"uv_index": 5
},
"forecast": {
"max_temp_c": 21,
"min_temp_c": 11,
"avg_humidity": 60,
"daily_chance_of_rain": 70,
"weather_desc": "Light drizzle"
}
}
Extract Key Information from Output:
import json
# Assume weather_data is the JSON returned by the script
current = weather_data['current']
forecast = weather_data['forecast']
temperature_range = f"{forecast['min_temp_c']}-{forecast['max_temp_c']}°C"
weather_condition = forecast['weather_desc']
humidity = current['humidity']
rain_chance = forecast['daily_chance_of_rain']
Alternative: Direct API Call (if script is unavailable):
Current Weather API:
https://wttr.in/{city}?format=j1
Example:
curl "https://wttr.in/Hangzhou?format=j1"
Parse JSON Response for Key Information:
import json
# Current weather
current = data['current_condition'][0]
temperature = current['temp_C'] # Celsius
feels_like = current['FeelsLikeC'] # Feels like temperature
humidity = current['humidity'] # Humidity
weather_desc = current['weatherDesc'][0]['value'] # Weather description
wind_speed = current['windspeedKmph'] # Wind speed
# Weather forecast
forecast = data['weather'][0]
max_temp = forecast['maxtempC'] # Max temperature
min_temp = forecast['mintempC'] # Min temperature
Alternative: OpenWeatherMap API (requires free API key):
If wttr.in is unavailable, you can use OpenWeatherMap:
API Endpoint:
https://api.openweathermap.org/data/2.5/weather?q={city}&appid={API_KEY}&units=metric&lang=en
Forecast API:
https://api.openweathermap.org/data/2.5/forecast?q={city}&appid={API_KEY}&units=metric&lang=en
Note:
{API_KEY} needs to be requested from https://openweathermap.org/api (free version is sufficient)units=metric uses Celsiuslang=en returns English descriptionExtract key information from the API response:
{
"main": {
"temp": 25, // Current temperature
"feels_like": 27, // Feels like temperature
"humidity": 60 // Humidity
},
"weather": [
{
"description": "Clear", // Weather condition
"main": "Clear"
}
],
"wind": {
"speed": 3.5 // Wind speed
}
}
Generate recommendations based on weather data and user preferences:
| Temperature Range | Outfit Recommendation |
|---|---|
| < 5°C | Heavy down jacket, thermal underwear, sweater, scarf, gloves, hat |
| 5-10°C | Thick coat, padded jacket, knitwear, thin sweater |
| 10-15°C | Trench coat, jacket, hoodie, long-sleeve T-shirt |
| 15-20°C | Light jacket, denim jacket, long-sleeve shirt, T-shirt + cardigan |
| 20-25°C | Long-sleeve T-shirt, thin shirt, single layer clothing |
| 25-30°C | Short-sleeve T-shirt, shirt, skirt, shorts |
| > 30°C | Breathable short-sleeve, tank top, sun protection clothing, sun hat |
Rainy Days:
Windy Days:
High Humidity:
Strong UV:
After providing outfit recommendations, call the image search script to provide visual references:
# Search city street style
python scripts/search_images.py "{city} street style fashion" 5
# Search seasonal outfits
python scripts/search_images.py "{city} {season} outfit" 5
# Search occasion-specific outfits
python scripts/search_images.py "{city} casual wear" 5
Examples:
# Paris street style
python scripts/search_images.py "Paris street style fashion" 5
# Hangzhou casual outfits
python scripts/search_images.py "Hangzhou casual outfit" 5
Output recommendations in the following format:
## 📍 Destination: [City Name]
## 📅 Date: [Travel Date]
## 🌤️ Weather Overview
- **Temperature**: X°C (feels like Y°C)
- **Weather Condition**: [Clear/Cloudy/Rainy, etc.]
- **Humidity**: X%
- **Wind Speed**: X m/s
## 👔 Outfit Recommendations
### Recommended Outfit
- Top: [Specific recommendation]
- Bottom: [Specific recommendation]
- Shoes: [Specific recommendation]
- Accessories: [Specific recommendation]
### Notes
- [Special reminder 1]
- [Special reminder 2]
### Backup Plan
[Alternative suggestions for weather changes or other situations]
## 🖼️ Outfit Reference Images
[Call search_images.py script to search related images]
### Style References
- [Image 1 description and URL]
- [Image 2 description and URL]
- [Image 3 description and URL]
If API call fails or returns error:
Sorry, temporarily unable to get weather data for [city name]. Possible reasons:
1. City name recognition failed, please check spelling
2. API service temporarily unavailable
3. Network connection issue
Suggestions:
- Check if city name is correct
- Try again later
- Or tell me the current weather conditions (temperature, weather), I can also provide recommendations
If extreme weather is detected (typhoon, blizzard, heavy rain warning, etc.):
⚠️ **Weather Warning**: [City Name] is about to experience [extreme weather type]
According to latest weather forecast:
- [Describe extreme weather situation]
- [Impact level and timing]
**Recommendations**:
1. Reconsider if travel is necessary
2. If travel is required, prepare adequate protection:
- [Specific protective measures]
3. Monitor latest warnings from local meteorological department
4. Recommended items: [Special equipment like life jacket, anti-slip shoes, etc.]
If user provides a date range:
Detected your trip is a multi-day travel (Month Day - Month Day), I will:
1. Query weather forecast for each day separately
2. Provide daily outfit recommendations
3. Suggest clothing packing list (considering laundry needs)
Adjust recommendations based on user's clothing habits:
Cold-sensitive users: Recommend adding extra warm layers to base outfit Heat-sensitive users: Recommend more breathable fabrics, reduce layers Business needs: Maintain professional appearance while ensuring comfort Outdoor sports: Prioritize functional clothing (quick-dry, waterproof, windproof) Pregnant/elderly/children: Pay extra attention to warmth and comfort
User: I'm going to Hangzhou tomorrow, I'm usually sensitive to cold, prefer casual style.
Assistant: Step 1: Query weather
python scripts/get_weather.py Hangzhou tomorrow
Step 2: Parse data Extract from returned JSON:
Step 3: Generate recommendations
According to weather forecast, Hangzhou tomorrow:
Outfit recommendations:
User: I'm going out to play in a few days, how should I dress?
Assistant: To provide you with the most suitable outfit recommendations, I need some information:
User: I'm going to Hangzhou tomorrow, I'm quite heat-sensitive
Assistant: Execution Flow:
Information Extraction:
Date Conversion:
Use wttr.in API to query Hangzhou weather: curl "https://wttr.in/Hangzhou?format=j1"
Parse JSON to get data:
Adjust recommendations based on heat-sensitive preference
Then output complete outfit recommendations...
User: How should I dress?
Assistant: To provide you with the most suitable outfit recommendations, I need some information:
User: I'm going to Shanghai the day after tomorrow
Assistant: Sure, I'll help you check the weather for Shanghai the day after tomorrow.
To make the recommendation more suitable for you, please tell me about your clothing preferences:
(Wait for user response, then query weather and provide complete recommendations)
User: I'm going to Beijing on business from next Monday to Friday, I'm sensitive to cold
Assistant: Execution Flow:
Output format:
## 📍 Destination: Beijing
## 📅 Trip: Next Monday to Friday (April 7th - April 11th)
### Daily Outfit Recommendations
#### Monday (April 7th)
- Weather: Clear, 8-18°C
- Recommendation: ...
#### Tuesday (April 8th)
- Weather: Cloudy, 10-20°C
- Recommendation: ...
...
### Clothing Packing List
Considering 5-day trip and temperature variations, recommend bringing:
- Tops: X pieces (including...)
- Bottoms: X pieces
- Outerwear: X pieces
- Other accessories: ...
If extreme weather is detected (typhoon, heavy rain red warning, etc.):
⚠️ **Weather Warning**: [City Name] is about to experience [extreme weather type]
According to latest weather forecast:
- [Describe extreme weather situation]
- [Impact level and timing]
**Recommendations**:
1. Reconsider if travel is necessary
2. If travel is required, prepare adequate protection:
- [Specific protective measures]
3. Monitor latest warnings from local meteorological department
4. Recommended items: [Special equipment like life jacket, anti-slip shoes, etc.]
If API call fails or returns error:
Sorry, temporarily unable to get weather data for [city name]. Possible reasons:
1. City name recognition failed, please check spelling
2. API service temporarily unavailable
3. Network connection issue
Suggestions:
- Check if city name is correct
- Try again later
- Or tell me the current weather conditions (temperature, weather), I can also provide recommendations
When actually using, can add the following prompt optimization suggestions based on situation:
Location: scripts/get_weather.py
Features:
Usage:
# Basic syntax
python scripts/get_weather.py <city> [date]
# Specific date
python scripts/get_weather.py Hangzhou 2026-04-02
# Relative date (English)
python scripts/get_weather.py Beijing tomorrow
python scripts/get_weather.py Shanghai day after tomorrow
# Relative date (Chinese)
python scripts/get_weather.py Guangzhou tomorrow
python scripts/get_weather.py Shenzhen day after tomorrow
# No date specified (defaults to today)
python scripts/get_weather.py Chengdu
Output Format:
JSON Data Structure:
{
"success": true,
"city": "City English Name",
"query_date": "Query Date",
"target_date": "Target Date",
"current": {
"temp_c": Current Temperature (Celsius),
"feels_like_c": Feels Like Temperature,
"humidity": Humidity Percentage,
"weather_desc": "Weather Description",
"wind_speed_kmph": Wind Speed (km/h),
"uv_index": UV Index
},
"forecast": {
"max_temp_c": Max Temperature,
"min_temp_c": Min Temperature,
"avg_humidity": Average Humidity,
"daily_chance_of_rain": Rain Chance,
"weather_desc": "Weather Condition"
}
}
Error Handling: If query fails, returns:
{
"success": false,
"error": "Error message",
"message": "Failed to get weather data: specific reason"
}
Dependencies:
sys, json, urllib.request, datetimeLocation: scripts/search_images.py
Features:
Supported APIs:
| API | Requires Key | Free Quota | Recommendation |
|---|---|---|---|
| Pexels | ✅ Yes | 20,000/month | ⭐⭐⭐⭐⭐ |
| Pixabay | ✅ Yes | 500/day | ⭐⭐⭐⭐ |
| Bing Search | ❌ No | Limited | ⭐⭐⭐ |
Usage:
# Basic syntax
python scripts/search_images.py <query> [count]
# Search Paris street style
python scripts/search_images.py "Paris street style fashion" 5
# Search Hangzhou casual outfits
python scripts/search_images.py "Hangzhou casual outfit" 5
# Search specific season
python scripts/search_images.py "Beijing winter fashion" 10
Output Format:
JSON Data Structure:
{
"success": true,
"query": "Search Keyword",
"total_results": 1000,
"images": [
{
"url": "Large Image URL",
"thumbnail": "Thumbnail URL",
"photographer": "Photographer Name",
"width": 1920,
"height": 1080,
"alt": "Image Description"
}
]
}
Smart Keyword Generation:
Script automatically generates optimized search terms based on city context:
{city} street style fashion - Street style{city} outfit ideas - Outfit inspiration{city} casual wear - Casual outfitswhat to wear in {city} - Travel outfitsAPI Key Configuration:
Recommend using Pexels API (highest quality):
pexels_api_key = "your_api_key_here"
export PEXELS_API_KEY="your_api_key_here"
Fallback Strategy:
If API key is not configured, script will:
Usage Scenario:
Add image references in outfit recommendations:
## 🖼️ Outfit References
Based on Paris fashion style, recommend the following references:
📸 **Street Style**
- Image 1: [Description] - [View Image](URL)
- Image 2: [Description] - [View Image](URL)
- Image 3: [Description] - [View Image](URL)
💡 **Styling Tips**:
- Learn layering techniques from images
- Pay attention to color coordination (mainly neutral colors)
- Choose appropriate accessories (scarves, bags)
Notes: