# weatherkit

Teaches coding agents how to query Apple WeatherKit in Swift apps. Helps retrieve forecasts, parse alerts, and handle measurement formatting.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3500 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/weatherkit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/weatherkit

## What it does

This skill guides coding assistants through Apple's `WeatherService` APIs in Swift. It covers reading current observations and 25-hour forecast intervals. Temperatures arrive wrapped in `Measurement<UnitTemperature>`. Calling `.formatted()` ensures values match the user's locale.

The guide focuses on selective queries with `WeatherQuery` to avoid unnecessary network traffic. Custom date ranges support historical archives back to August 1, 2021. Single requests cap at 10 days. Calls fail without a paid Apple Developer Program account and the WeatherKit entitlement in Xcode.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/weatherkit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/weatherkit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/weatherkit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/weatherkit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills weatherkit
```

2. **Manually: put the files in place**
- File: `.github/skills/weatherkit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/weatherkit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/weatherkit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/weatherkit/SKILL.md

## When to use it
- fetch current weather and 10-day forecasts using `WeatherService`
- configure selective `WeatherQuery` calls to reduce API payload sizes
- parse weather alerts and extract required detail attribution URLs
- retrieve past temperature records within supported date boundaries

## Example prompts
- Request current conditions and hourly forecasts via WeatherService in Swift
- How do I configure selective queries with WeatherQuery for tomorrow's weather?
- Show how to parse WeatherAlert objects and display their severity

## Similar
- [xcode-build-orchestrator](https://affpapa.org/en/nevibecode/skills/xcode-build-orchestrator.md) — skill · 3600 installs
- [xcode-build-fixer](https://affpapa.org/en/nevibecode/skills/xcode-build-fixer.md) — skill · 3600 installs
- [axiom-tools](https://affpapa.org/en/nevibecode/skills/axiom-tools.md) — skill · 1200 installs
- [xcode-project-setup](https://affpapa.org/en/nevibecode/skills/xcode-project-setup.md) — skill · 130700 installs
- [ios-simulator-skill](https://affpapa.org/en/nevibecode/skills/ios-simulator-skill.md) — skill · 2400 installs
- [developing-ios-apps](https://affpapa.org/en/nevibecode/skills/developing-ios-apps.md) — skill · 1500 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 69 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
