# Energykit

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

- Repository: https://github.com/dpearson2699/swift-ios-skills (1266 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-07-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add dpearson2699/swift-ios-skills --skill energykit -g -a claude-code -y`
Codex: `npx skills add dpearson2699/swift-ios-skills --skill energykit -g -a codex -y`
Cursor: `npx skills add dpearson2699/swift-ios-skills --skill energykit -g -a cursor -y`
Gemini CLI: `npx skills add dpearson2699/swift-ios-skills --skill energykit -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add dpearson2699/swift-ios-skills`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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](#setup)
- [Core Concepts](#core-concepts)
- [Querying Electricity Guidance](#querying-electricity-guidance)
- [Working with Guidance Values](#working-with-guidance-values)
- [Energy Venues](#energy-venues)
- [Submitting Load Events](#submitting-load-events)
- [Electricity Insights](#electricity-insights)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)

## Setup

### Entitlements and Version Split

| Runtime | Load-event device API | Capabilities |
|---|---|---|
| iOS/iPadOS 26.x | `deviceID:` compatibility initializer | EnergyKit |
| iOS/iPadOS 27+ beta | `ElectricalLoadDevice` with the `device:` initializer | EnergyKit; 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

```swift
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

The rest: https://github.com/dpearson2699/swift-ios-skills/blob/HEAD/skills/energykit/SKILL.md
