weatherkit — Claude Code skill: what it does, how to install
Teaches coding agents how to query Apple WeatherKit in Swift apps. Helps retrieve forecasts, parse alerts, and handle measurement formatting.
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a claude-codeWhat weatherkit 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.
What it helps with
- fetch current weather and 10-day forecasts using
WeatherService - configure selective
WeatherQuerycalls to reduce API payload sizes - parse weather alerts and extract required detail attribution URLs
- retrieve past temperature records within supported date boundaries
Example prompts for the agent
- 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
How to install weatherkit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a claude-code2Manually: put the files in place
~/.claude/skills/weatherkit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/weatherkit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a codex2Manually: put the files in place
.agents/skills/weatherkit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a cursor2Manually: put the files in place
.cursor/skills/weatherkit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills weatherkit2Manually: put the files in place
.github/skills/weatherkit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/weatherkitManually: put the files in place
.devin/skills/weatherkit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about weatherkit
How do I install weatherkit in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill weatherkit -a claude-code in your terminal.
What does weatherkit do?
It provides code patterns and constraints for integrating Apple WeatherKit in iOS projects. The agent learns how to manage forecasts, precipitation alerts, and localized units.
What project prerequisites does WeatherKit require?
You need an active Apple Developer Program membership, the WeatherKit capability in Xcode, and NSLocationWhenInUseUsageDescription in Info.plist when accessing device location.