# activitykit

Build and review iOS Live Activities and Dynamic Island interfaces with ActivityKit. Useful for app states that need to stay visible and change over time.

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

## What it does

This skill covers the Live Activity lifecycle: defining fixed attributes and a changing `ContentState`, requesting an activity, sending updates, and ending it when the tracked event is over. It also guides the Lock Screen presentation and Dynamic Island layouts. The full state is serialized on every update, so keeping it small matters.

For remote updates, the skill explains how to validate APNs state against the `ContentState` model. Check the host app capability and set `NSSupportsLiveActivities = YES` before starting. The `ActivityContent` lifecycle examples require iOS 16.2 or later.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

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

## When to use it
- define fixed attributes and changing activity state
- implement Live Activity creation, updates, and termination
- review Lock Screen and Dynamic Island presentations
- check that APNs payload state matches `ContentState`

## Example prompts
- Build a delivery Live Activity with an updateable step and arrival time.
- Review the ActivityKit lifecycle and end the activity when the event is cancelled.
- Check that the APNs state matches `ContentState`.

## 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
