Claude-skill-registry forecast-skill
Provides real-time weather forecasts using OpenWeather API. Use when users ask about current or future weather conditions, temperature, precipitation, or weather-dependent planning for any location (e.g., 'What's the weather in Paris tomorrow?', 'Will it rain in Seattle this weekend?', 'Should I bring a jacket to Denver?').
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/forecast-skill" ~/.claude/skills/majiayu000-claude-skill-registry-forecast-skill-e764de && rm -rf "$T"
skills/data/forecast-skill/SKILL.mdForecast Skill
Get real-time weather data and forecasts for any location worldwide using OpenWeather.
Prerequisites
This skill requires an OpenWeather API key to be configured in
config.json before uploading.
Setup (done once before uploading the skill):
- Get a free API key at https://openweathermap.org/api
- Edit
and replaceconfig.json
with your keyPASTE_YOUR_API_KEY_HERE - Ensure
is in your Claude environment's allowed network domainsapi.openweathermap.org - Upload the skill to Claude
Network Requirements:
- This skill makes HTTPS requests to
api.openweathermap.org - Some Claude environments may require this domain to be added to allowed network lists
- Contact your administrator if you encounter connection errors
See
SETUP.txt for detailed instructions.
Usage
Understanding API Limitations
Important: The OpenWeather free tier provides:
- Current weather for any date (today)
- 5-day forecast maximum (today + 4 future days)
- If a user asks for weather beyond 5 days, explain the limitation and suggest alternatives
Single Location Forecast
When the user asks about weather for one location:
Modern format (preferred):
python skills/get_weather.py current "<location>" # Current weather python skills/get_weather.py forecast "<location>" <days> # Multi-day forecast (1-5 days)
Legacy format (still supported):
python skills/get_weather.py "<location>" "<YYYY-MM-DD>"
Important: The script is located at
skills/get_weather.py (not scripts/)
Multi-Location Comparison
When the user asks to compare weather between locations:
Trigger phrases:
- "Compare weather in Paris vs London"
- "Paris or Berlin next week?"
- "Which city has better weather this week?"
Command format:
python skills/get_weather.py compare "<location1>" "<location2>" <days>
Important: Days parameter is limited to 1-5 due to API forecast limits.
Activity Recommendations
When the user asks about weather suitability for specific activities:
Trigger phrases:
- "Is it good for skiing in Aspen this week?"
- "When should I plan a picnic in the park?"
- "What are the best days for hiking in Colorado?"
- "Should I water my garden tomorrow?"
Supported activities: skiing, picnic, hiking, gardening, beach, cycling, plus general outdoor activities and sports
Flexible activity detection: The system can analyze weather for many activities, even if not explicitly listed. It will automatically map unfamiliar activities to the most appropriate general category.
Command format:
python skills/get_weather.py activity "<activity_type>" "<location>" <days>
Important: Days parameter is limited to 1-5 due to API forecast limits.
Multi-Location Comparison Commands
For location comparisons:
python skills/get_weather.py compare "<location1>" "<location2>" <days>
Present side-by-side comparison with recommendations for travel planning.
Error Handling
- missing_api_key: "The weather service isn't configured. Please edit config.json with your OpenWeather API key before uploading this skill."
- invalid_api_key: "Invalid OpenWeather API key. Please check your key in config.json."
- location_not_found: Ask for a more specific location (e.g., "Paris, France" instead of "Paris")
- quota_exceeded: "The weather service has reached its daily limit. Please try again later."
- date_not_available: Forecast is limited to 5 days maximum. When this occurs:
- Explain the 5-day limit to the user
- Offer to provide available forecast data for the timeframe that is available
- Suggest checking back closer to the desired date for extended forecasts
Response Format
Single Location Response
The script returns JSON with these fields:
: Resolved location namelocation
: Date of forecastdate
,temp_c
: Temperature in Celsius and Fahrenheittemp_f
: Relative humidity percentagehumidity
: Wind speed in km/hwind_kph
: Weather description (e.g., "partly cloudy", "light rain")condition
: Precipitation in millimetersprecip_mm
,sunrise_utc
: Sun times in UTC ISO formatsunset_utc
Comparison Response
For multi-location comparisons, the script returns:
: "multi_day"comparison_type
: Number of days comparednum_days
/location1
: Each containing:location2
: Resolved location namename
: Array of daily forecasts with temps, conditions, precipitationforecasts
: Array of comparison insights and suggestionsrecommendations
Activity Recommendation Response
For activity analysis, the script returns:
: "activity_recommendation"analysis_type
: Activity name (e.g., "Skiing", "Picnic")activity
: 0-100 suitability ratingoverall_score
: Text rating (Excellent/Good/Fair/Poor/Not Recommended)overall_rating
: Date and score of most suitable daybest_day
: Array of daily scores and recommendationsdaily_analysis
: Summary advice for the activity periodoverall_recommendation
Present this information conversationally, highlighting the most relevant details for the user's query.
Error Handling
The script may return errors in JSON format:
: API key not provided - ask user for their keymissing_api_key
: API key is invalid - ask user to verify their keyinvalid_api_key
: Location not recognized - ask for clarification (e.g., "Paris, France" instead of "Paris")location_not_found
: API daily limit reached - inform user to try laterquota_exceeded
: Date format incorrect - use YYYY-MM-DD formatinvalid_date
: Activity not recognized - show supported activities listunknown_activity- Network errors: Inform user the weather service is temporarily unavailable
Examples
User: "What's the weather in Boulder this weekend?" Claude should recognize this MAY need the skill, but users get better results with: User: "Using the forecast-skill, what's the weather in Boulder this weekend?" Action:
- Extract: location="Boulder", dates=[Saturday, Sunday]
- Call:
python skills/get_weather.py forecast Boulder 2 - Summarize: "This weekend in Boulder: Saturday will be sunny and 72°F, perfect for outdoor activities. Sunday looks cooler at 65°F with a chance of afternoon showers."
User: "Using forecast-skill, should I bring an umbrella to Tokyo tomorrow?" Action:
- Extract: location="Tokyo", date=tomorrow
- Call:
python skills/get_weather.py forecast Tokyo 1 - Check precipitation and respond: "Tomorrow in Tokyo has a 70% chance of rain with 5mm expected. Definitely bring an umbrella!"
User: "With the forecast-skill, is this week good for skiing in Vail?" Action:
- Extract: activity="skiing", location="Vail", days=5 (limit to 5-day forecast)
- Call:
python skills/get_weather.py activity skiing Vail 5 - Analyze response: "The next 5 days look excellent for skiing in Vail! Overall score: 85/100. Best conditions on Wednesday with fresh powder and temps around -2°C."
User: "Using forecast-skill, compare weather in Aspen this weekend vs next weekend" Action:
- Recognize next weekend exceeds 5-day limit
- Call:
(for this weekend)python skills/get_weather.py forecast Aspen 2 - Respond: "I can provide this weekend's forecast for Aspen, but weather data beyond 5 days isn't available. This weekend looks great with sunny skies and 12°C. For next weekend, I'd suggest checking back in a few days for the most accurate forecast."
User: "Using the forecast-skill, compare weather in London vs Paris next week" Action:
- Extract: location1="Paris", location2="London", days=7
- Call:
python skills/get_weather.py compare "Paris" "London" 7 - Present comparison: "Comparing Paris and London for the next week: Paris will be warmer overall (averaging 18°C vs 14°C) but has more rainy days expected (4 vs 2). London has fewer rainy days expected, making it better for outdoor activities despite cooler temperatures."
Skill Activation Tips
Best Practice: Users should prefix queries with "Using the forecast-skill," or "With forecast-skill," to ensure reliable activation.
Examples of effective prompts:
- "Using the forecast-skill, [weather question]"
- "With forecast-skill, [weather question]"
- "Can you use forecast-skill to [weather question]"
Why explicit activation helps:
- Ensures Claude uses the weather API instead of general knowledge
- Gets real-time data rather than training data
- Provides more accurate and current forecasts