energykit — Claude Code skill: what it does, how to install
Provides guidance for Apple EnergyKit to query grid electricity forecasts and report load events for smart home devices, EV chargers, and HVAC systems.
npx skills add dpearson2699/swift-ios-skills --skill energykit -a claude-codeWhat energykit does
The skill guides agents through Apple EnergyKit integration in Swift. It covers querying the ElectricityGuidance.Service forecast stream. Rating values range from 0.0 to 1.0. Lower values indicate cleaner and cheaper power. It shows how to schedule device runtime using .shift or .reduce actions. It also outlines load telemetry via ElectricVehicleLoadEvent and ElectricHVACLoadEvent.
Apps require the com.apple.developer.energykit entitlement. Without it, calls fail with EnergyKitError.permissionDenied. Apps targeting the iOS 27 Home app experience also need com.apple.developer.energykit.loadevents-experience.
Apple limits documented electricity guidance to the contiguous United States. Your code must catch EnergyKitError.unsupportedRegion. Core framework APIs start at iOS 26.0, while cleanliness breakdowns require iOS 26.1+.
What it helps with
- query electricity cleanliness and cost forecasts using
ElectricityGuidance.Service - schedule EV charging windows based on
.shiftguidance ratings - report HVAC runtime telemetry with
ElectricHVACLoadEvent - handle
EnergyKitError.unsupportedRegionoutside the contiguous United States
Example prompts for the agent
- Show me how to observe the
ElectricityGuidanceforecast stream in Swift. - Create a SwiftUI view displaying
ElectricityGuidance.Valueintervals and ratings. - Write a function to submit an
ElectricVehicleLoadEventwith required EnergyKit entitlements.
How to install energykit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill energykit -a claude-code2Manually: put the files in place
~/.claude/skills/energykit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/energykit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill energykit -a codex2Manually: put the files in place
.agents/skills/energykit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill energykit -a cursor2Manually: put the files in place
.cursor/skills/energykit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills energykit2Manually: put the files in place
.github/skills/energykit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill energykit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/energykitManually: put the files in place
.devin/skills/energykit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill energykit -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 energykit
How do I install energykit in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill energykit -a claude-code. The skill file installs to ~/.claude/skills/energykit/SKILL.md.
What does the energykit skill do?
It guides agents on implementing Apple EnergyKit in Swift projects. It details forecast streaming, rating thresholds, load event telemetry, and required app entitlements.
What entitlements are needed to use EnergyKit?
Your app target must include com.apple.developer.energykit. If you integrate load events with the Apple Home app on iOS 27+, you also need com.apple.developer.energykit.loadevents-experience.