# energykit

Provides guidance for Apple EnergyKit to query grid electricity forecasts and report load events for smart home devices, EV chargers, and HVAC systems.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3600 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/energykit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/energykit

## What it 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+.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill energykit -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/energykit/SKILL.md

## When to use it
- query electricity cleanliness and cost forecasts using `ElectricityGuidance.Service`
- schedule EV charging windows based on `.shift` guidance ratings
- report HVAC runtime telemetry with `ElectricHVACLoadEvent`
- handle `EnergyKitError.unsupportedRegion` outside the contiguous United States

## Example prompts
- Show me how to observe the `ElectricityGuidance` forecast stream in Swift.
- Create a SwiftUI view displaying `ElectricityGuidance.Value` intervals and ratings.
- Write a function to submit an `ElectricVehicleLoadEvent` with required EnergyKit entitlements.

## Similar
- [vercel-react-native-skills](https://affpapa.org/en/nevibecode/skills/vercel-react-native-skills.md) — skill · 255200 installs
- [animate-expo](https://affpapa.org/en/nevibecode/skills/animate-expo.md) — skill · 137900 installs
- [mobile-native](https://affpapa.org/en/nevibecode/skills/mobile-native.md) — skill · 86600 installs
- [aso](https://affpapa.org/en/nevibecode/skills/aso.md) — skill · 75400 installs
- [swiftui-pro](https://affpapa.org/en/nevibecode/skills/swiftui-pro.md) — skill · 35200 installs
- [orca-emulator](https://affpapa.org/en/nevibecode/skills/orca-emulator.md) — skill · 5800 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 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
