Skills

Energykit

Query grid electricity forecasts and submit load events using EnergyKit to help users...

Install

npx skills add dpearson2699/swift-ios-skills --skill energykit -g -a claude-code -y
Category
Engineering
Updated
3mo ago
License
See repository
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Query grid electricity forecasts and submit load events using EnergyKit to help users optimize home electricity usage. Use when building smart home apps, EV charger controls, HVAC scheduling, or energy management dashboards that guide users to use power during cleaner or cheaper grid periods.

EnergyKit

Use grid cleanliness and cost guidance to shift or reduce managed-device load. For managed-device insights, submit the device's real load events promptly.

Beta-sensitive. Core EnergyKit ships in iOS/iPadOS 26. The iOS/iPadOS 27 ElectricalLoadDevice and Home-facing LoadEvents experience are beta; re-check current Apple documentation before relying on those APIs.

Contents

Setup

Entitlements and Version Split

RuntimeLoad-event device APICapabilities
iOS/iPadOS 26.xdeviceID: compatibility initializerEnergyKit
iOS/iPadOS 27+ betaElectricalLoadDevice with the device: initializerEnergyKit; add EnergyKit LoadEvents for Home app integration

All EnergyKit use requires com.apple.developer.energykit; enable the EnergyKit capability on the app target. On iOS/iPadOS 27+, add the EnergyKit LoadEvents capability (com.apple.developer.energykit.loadevents-experience) only when the app needs device names, energy context, activity logs, historical charts, or trend notifications in the Home app. That Home experience requires both capabilities. Missing permission can surface as EnergyKitError.permissionDenied.

Import

import EnergyKit

Platform availability: Core EnergyKit APIs are iOS/iPadOS 26.0+. Some insight breakdown APIs, including grid cleanliness categories, are 26.1+ and need availability guards. Apple currently documents electricity guidance only for the contiguous United States; handle EnergyKitError.unsupportedRegion.

Core Concepts

Read the whole SKILL.md on GitHub

More in Engineering