| name | weather_nws |
| description | Get current weather conditions and detailed forecasts for any US location using the National Weather Service API |
| version | 1.0.0 |
| user-invocable | true |
| slash-command | weather |
| metadata | {"openclaw":{"requires":{"bins":["node"]},"emoji":"🌤️","category":"information","tags":["weather","forecast","nws","temperature","conditions"],"network":true},"parameters":{"type":"object","properties":{"location":{"type":"string","description":"City name, city + state, or full address"},"limit":{"type":"string","description":"Number of forecast periods (default: 5, 'full' or 'week' for all ~14 periods)"}},"required":["location"]},"examples":[{"prompt":"What's the weather in Malvern, PA?","call":"weather_nws","args":{"location":"Malvern, PA"}},{"prompt":"Give me the full week forecast for Philadelphia","call":"weather_nws","args":{"location":"Philadelphia, PA","limit":"week"}},{"prompt":"What's the temperature right now?","call":"weather_nws","args":{"location":"Malvern, PA","limit":"1"}}]} |
Weather (National Weather Service) Skill
Get current weather conditions and detailed forecasts for any US location using the official National Weather Service (NWS) API.
When to use this skill
- User asks about weather, temperature, or forecast
- User wants to know current conditions
- User asks "What's the weather in X?"
- User wants multi-day forecast
- User asks about specific weather details (wind, humidity, etc.)
- User mentions planning around weather
- User asks about weather "today", "tonight", "tomorrow", or for the week
How to call it
Execution: This skill is executed using node via the exec command.
Command: node ~/.openclaw/skills/weather_nws/index.js "<location>" [limit]
Parameters:
location (required): City name, city + state, or full address
limit (optional): Number of forecast periods to show
- Default: 5 periods
- Number: Show that many periods
full or week: Show all available periods (~14)
Examples
Example 1: Current weather
User: "What's the weather in Malvern, PA?"
Command: node ~/.openclaw/skills/weather_nws/index.js "Malvern, PA"
Output:
Looking up Malvern, PA...
Found: Malvern, Chester County, Pennsylvania, United States (40.0365, -75.5138)
CURRENT CONDITIONS (2026-02-13T15:00:00-05:00):
42°F - Partly Cloudy
Wind: 8 mph NW
Humidity: 45%
FORECAST:
--------------------------------------------------
THIS AFTERNOON: 43°F - Partly Sunny
Partly sunny with a high near 43...
TONIGHT: 28°F - Mostly Clear
Mostly clear with a low around 28...
Example 2: Extended forecast
User: "Give me the full week forecast for Philadelphia"
Command: node ~/.openclaw/skills/weather_nws/index.js "Philadelphia" full
Response: Shows all available forecast periods
Example 3: Specific number of periods
User: "What's the weather tomorrow in Malvern?"
Command: node ~/.openclaw/skills/weather_nws/index.js "Malvern, PA" 3
Response: Shows next 3 periods (Tonight, Tomorrow Day, Tomorrow Night)
Example 4: Simple check
User: "Will it rain today?"
Command: node ~/.openclaw/skills/weather_nws/index.js "Malvern, PA" 2
Response: Parse output for precipitation info in today's periods
Output Format
The script provides:
- Location confirmation - Geocoded address and coordinates
- Current conditions (from hourly forecast):
- Temperature
- Short description (Partly Cloudy, Sunny, etc.)
- Wind speed and direction
- Humidity (when available)
- Forecast periods - Each includes:
- Period name (Today, Tonight, Friday, etc.)
- Temperature
- Short forecast
- Detailed forecast description
Location Format
Works with:
- City only:
"Philadelphia"
- City, State:
"Malvern, PA" (recommended for accuracy)
- Full address:
"123 Main St, Malvern, PA"
- Zip code:
"19355"
- Landmarks:
"Liberty Bell, Philadelphia"
Tip: Include state abbreviation for best results
Important Notes
- US Only: National Weather Service only covers United States territories
- Zero Dependencies: Uses only Node.js built-in
https module
- Geocoding: Uses OpenStreetMap Nominatim for location lookup
- Official Data: Direct from NWS API (weather.gov)
- No API Key Required: Public APIs, no authentication needed
- Real-Time Data: NWS updates hourly and as conditions change
Forecast Periods
NWS provides forecasts in named periods:
- This Afternoon / Today
- Tonight
- Tomorrow / Day name (Friday, Saturday, etc.)
- Tomorrow Night / Night name (Friday Night, etc.)
Default (5 periods) typically covers:
- Rest of today + tonight
- Next full day + night
- Following morning
Error Handling
- City not found: "City not found" - check spelling or add state
- Outside US: "No forecast grid found. This API only works for US locations."
- Network errors: Shows error message with details
- Invalid coordinates: NWS API returns error
Technical Details
- Geocoding API:
https://nominatim.openstreetmap.org/search
- NWS Points API:
https://api.weather.gov/points/{lat},{lon}
- Hourly Forecast: Used for current conditions
- Daily Forecast: Used for period-based forecasts
- User-Agent:
OpenClaw/1.0 (contact@openclaw.ai) (required by NWS)
- Response Format: Human-readable text (easy to parse)
Use Cases
- Quick check: Current temp and today's forecast
- Planning: Week-long forecast for event planning
- Travel: Weather at destination
- Comparisons: Weather in multiple cities
- Detailed info: Wind, humidity, detailed conditions