Marketplace Skills current-weather-okc-73110

VibeFuse · Skill

current-weather-okc-73110

Pull live current conditions, hourly and 7-day forecast for Oklahoma City / ZIP 73110 from the National Weather Service API (https://api.weather.gov/points/35.4676,-97.5164). No API key required. Use when the user asks for OKC weather, current temp, forecast, rain chance, wind, or heat index.

Sign in and save to your library — VibeFuse syncs free skills into the desktop skills folder on next launch.

v1.0.0 custom 0 saves 1 views Free

About this skill

Pull live current conditions, hourly and 7-day forecast for Oklahoma City / ZIP 73110 from the National Weather Service API (https://api.weather.gov/points/35.4676,-97.5164). No API key required. Use when the user asks for OKC weather, current temp, forecast, rain chance, wind, or heat index.
SKILL.md 132 lines · Skill instructions Show code Hide code
# current-weather-okc-73110

Pull **live** weather for Oklahoma City (ZIP 73110 area) straight from the
National Weather Service. **No API key, no signup, no cost.**

## Anchor point

```
https://api.weather.gov/points/35.4676,-97.5164
```

Resolved values (verified live):

| Field | Value |
|---|---|
| `gridId` | `OUN` (NWS Norman, OK) |
| `gridX`,`gridY` | `97`,`94` |
| Forecast gridpoint | `https://api.weather.gov/gridpoints/OUN/97,94` |
| City / state | Oklahoma City, OK |
| Timezone | `America/Chicago` |
| Nearest station | **KOKC** — Oklahoma City, Will Rogers World Airport |

> ZIP **73110** is Midwest City; the coordinates supplied sit inside the
> **OUN/97,94** grid, so this skill keys off the coordinates, not the ZIP.
> Pass `-Lat` / `-Lon` to move anywhere else in the US and the chain self-resolves.

## The NWS call chain

Every NWS product is reachable from the points document — never hardcode the grid twice.

| Step | URL | Gives you |
|---|---|---|
| 1 | `/points/{lat},{lon}` | gridId, gridX/gridY, forecast + hourly URLs, observationStations, city/state, timeZone |
| 2 | `/gridpoints/{o}/{x},{y}/forecast` | 7-day **day/night periods** (temp, POP, wind, short + detailed text) |
| 3 | `/gridpoints/{o}/{x},{y}/forecast/hourly` | **hourly** periods (next ~156 h) |
| 4 | `/gridpoints/{o}/{x},{y}` | **raw gridpoint** (dewpoint, RH, sky cover, QPF, snowfall, gusts) |
| 5 | `/stations/{id}/observations/latest` | **observed** current conditions (temp, wind, humidity, pressure, visibility) |
| 6 | `/alerts/active?point={lat},{lon}` | active watches / warnings / advisories |

## Required header

`api.weather.gov` **requires a `User-Agent`** identifying the caller. Missing or
generic-agent requests can be rejected with `403`. Always send:

```
User-Agent: vibefuse-current-weather-okc (zak.rowton@gmail.com)
Accept: application/geo+json
```

No `Authorization` header, no key.

## Usage

```powershell
# current conditions right now (default)
powershell -NoProfile -ExecutionPolicy Bypass -File C:\vibefuse\skills\current-weather-okc-73110\scripts\weather-okc.ps1

# current summary + today's detailed outlook
...\weather-okc.ps1 -Mode today

# next 24 hours, hourly
...\weather-okc.ps1 -Mode hourly -Hours 24

# everything: now + periods + hourly
...\weather-okc.ps1 -Mode all

# machine-readable
...\weather-okc.ps1 -Mode all -Json
...\weather-okc.ps1 -Mode raw | ConvertFrom-Json

# any other US location
...\weather-okc.ps1 -Lat 35.4676 -Lon -97.5164
```

Modes: `now` (default) · `today` · `hourly` · `all` · `raw` (gridpoint JSON only)

Bash equivalent (needs `curl` + `jq`):

```bash
bash /c/vibefuse/skills/current-weather-okc-73110/scripts/weather-okc.sh 35.4676 -97.5164
```

## Raw curl equivalent

```bash
UA='vibefuse-current-weather-okc (zak.rowton@gmail.com)'
curl -sH "User-Agent: $UA" -H 'Accept: application/geo+json' \
  'https://api.weather.gov/points/35.4676,-97.5164' \
  | jq '.properties | {gridId,gridX,gridY,forecast,forecastHourly,observationStations,timeZone}'

curl -sH "User-Agent: $UA" 'https://api.weather.gov/gridpoints/OUN/97,94/forecast' \
  | jq '.properties.periods[] | {name, temperature, temperatureUnit, windSpeed, pop: .probabilityOfPrecipitation.value, shortForecast}'

curl -sH "User-Agent: $UA" 'https://api.weather.gov/stations/KOKC/observations/latest' \
  | jq '.properties | {textDescription, temperature, windSpeed, windDirection, relativeHumidity, barometricPressure}'
```

## Units — NWS returns SI, convert in the reply

| Quantity | API unit | Convert |
|---|---|---|
| temperature, dewpoint, heatIndex, windChill | °C (`wmoUnit:degC`) | `F = C*9/5+32` |
| windSpeed, windGust | km/h (`wmoUnit:km_h-1`) | `mph = km/h*0.621371` |
| barometricPressure | Pa (`wmoUnit:Pa`) | `inHg = Pa/3386.389` |
| visibility | m (`wmoUnit:m`) | `mi = m/1609.344` |
| precipitationLastHour | mm | `in = mm/25.4` |

`forecast` / `forecastHourly` periods already ship **°F** with `temperatureUnit: "F"`
and a human `windSpeed` like `"10 to 18 mph"` — prefer those for prose answers, and
use the station observation for *measured* "right now" numbers.

## Reporting checklist

When answering a weather ask, include where the data came from and how fresh it is:

- Current temp °F, feels-like (heatIndex when hot, windChill when cold), condition text
- Wind speed + direction, gusts
- Humidity %, dewpoint, pressure, visibility
- Today's high/low, precip chance, and any `detailedForecast` nuance (heat index, gusts)
- Next few hours if rain is possible
- `properties.updateTime` / observation `timestamp` so the user knows the age
- **Active alerts** — always check `/alerts/active?point=` and lead with them

## Quirks and cautions

- **US only.** Points outside US coverage return `404` / `Data Unavailable For Requested Point`.
- **Observations lag.** `observations/latest` is the most recent METAR (~5–60 min old) — read `timestamp`, and if values are `null` fall back to the hourly forecast.
- **`probabilityOfPrecipitation.value` is often `null` or `1`** in the fallback `BaselineForecastGenerator`; the gridpoint document carries the real POP series.
- **Don't hammer it.** Cache 5 min for observations, 60 min for forecast. NWS throttles abusive clients.
- **Timezone.** Timestamps are ISO-8601 with `-05:00` / `-06:00` offsets; display in `America/Chicago`, do not re-convert to UTC.
- **`number` in periods** is the index across day/night pairs — period 1 is overnight, period 2 is the next daytime. Don't assume `periods[0]` is "today's high."
- Severe-weather wording comes from `instruction` and `description` in the alerts payload; quote it verbatim rather than paraphrasing safety info.