
Activitykit
Implement iOS Live Activities with ActivityKit—Lock Screen, Dynamic Island, push tokens, and lifecycle—without deprecated contentState APIs.
Overview
ActivityKit is an agent skill for the Build phase that outlines Swift Live Activity implementation—attributes, lifecycle, Lock Screen, Dynamic Island, and push tokens—for iOS apps.
Install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill activitykitWhat is this skill?
- ActivityContent-based request, update, and end lifecycle (not deprecated contentState-only flows)
- NSSupportsLiveActivities Info.plist and small ContentState design
- pushTokenUpdates forwarding with token rotation awareness
- Lock Screen primary UI plus Dynamic Island compact, expanded, and minimal regions
- staleDate, context.isStale, and end paths on success, error, and cancel
- Eval rubric lists five implementation expectations for Live Activity reviews
Adoption & trust: 1.2k installs on skills.sh; 713 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want a food delivery or status Live Activity but the plan mixes deprecated APIs, missing plist keys, and broken push token handling.
Who is it for?
Indie iOS developers shipping native apps that need Lock Screen and Dynamic Island updates with optional push-to-update.
Skip if: Cross-platform apps without an iOS target or products that only need local notifications.
When should I use this skill?
Adding or reviewing iOS Live Activities—attributes, lifecycle, Lock Screen, Dynamic Island, and push token handling.
What do I get? / Deliverables
You get a source-grounded ActivityKit outline with Swift snippets and review notes for lifecycle, surfaces, stale handling, and server push token forwarding.
- Activity attributes and ContentState model
- Lock Screen and Dynamic Island SwiftUI views
- Push token forwarding notes for backend
Recommended Skills
Journey fit
Live Activities are product-facing mobile features implemented during Build alongside SwiftUI surfaces. Frontend subphase covers Lock Screen and Dynamic Island presentation; push token wiring crosses into integrations with your backend.
How it compares
Live Activity implementation guide—not a generic SwiftUI tutorial or App Store marketing skill.
Common Questions / FAQ
Who is activitykit for?
Solo builders adding ActivityKit Live Activities to Swift iOS apps who need lifecycle, UI regions, and push token patterns reviewed against current APIs.
When should I use activitykit?
During Build frontend/mobile work when sketching attributes, Lock Screen views, Dynamic Island layouts, and server push integration for a Live Activity feature.
Is activitykit safe to install?
Use the Security Audits panel on this Prism page; push token flows touch server credentials—never embed secrets in the skill output.
SKILL.md
READMESKILL.md - Activitykit
{ "skill_name": "activitykit", "evals": [ { "id": 1, "prompt": "I'm adding a food delivery Live Activity to an iOS app. Sketch the ActivityKit implementation for the attributes, request/update/end lifecycle, Lock Screen view, Dynamic Island regions, and server push token handling. Call out the Info.plist keys and availability checks I need.", "expected_output": "A source-grounded ActivityKit implementation outline with Swift snippets and review notes for local lifecycle, Lock Screen/Dynamic Island presentation, push token forwarding, stale handling, and cleanup.", "files": [], "expectations": [ "Uses ActivityContent-based Activity.request/update/end APIs rather than deprecated contentState lifecycle APIs.", "Mentions NSSupportsLiveActivities in the host app Info.plist and keeps ContentState small.", "Forwards update tokens with activity.pushTokenUpdates and notes that tokens can rotate.", "Designs Lock Screen as the primary surface and includes Dynamic Island compact, expanded, and minimal presentations only for devices with Dynamic Island.", "Handles staleDate/context.isStale and ends the activity on success, error, and cancellation paths." ] }, { "id": 2, "prompt": "Review this Live Activity plan for mistakes: use Activity.request(attributes:content:pushType:start:) on iOS 26 to schedule a flight board; use style: .transient but guard it as iOS 26 only; send a push-to-start payload without alert because the user already opted into notifications; set NSSupportsLiveActivitiesFrequentUpdates and push updates every 30 seconds; say ended activities always disappear after 8 hours.", "expected_output": "A correction-focused review that identifies stale or inaccurate ActivityKit claims and replaces them with current Apple-source behavior.", "files": [], "expectations": [ "Corrects scheduled Live Activity requests to the iOS 26 overload that includes style, alertConfiguration, and start/startDate.", "Corrects Activity.request style parameter availability to iOS 18+ rather than iOS 26-only.", "States that push-to-start payloads require an alert.", "Avoids a fixed 30-second or once-per-minute frequent-update guarantee and recommends frequentPushesEnabled/frequentPushEnablementUpdates when cadence matters.", "Distinguishes active duration up to 8 hours, Lock Screen persistence up to 12 hours after system end, and default app-ended dismissal up to 4 hours." ] }, { "id": 3, "prompt": "I have a Live Activity that receives APNs updates, but now I need help rotating my APNs auth key, registering normal remote notifications, and deciding whether the widget should use a TimelineProvider. Which parts belong in ActivityKit guidance and where should the rest go?", "expected_output": "A boundary-aware answer that keeps ActivityKit-specific Live Activity token/payload concerns in scope and redirects generic APNs registration/auth and WidgetKit timeline architecture to sibling domains.", "files": [], "expectations": [ "Keeps ActivityKit-specific guidance focused on Live Activity update tokens, push-to-start tokens, liveactivity push type, topic suffix, and content-state payloads.", "Does not turn the answer into a full generic APNs authentication or remote notification setup guide.", "Does not recommend TimelineProvider for Live Activity lifecycle updates and distinguishes Live Activities from ordinary widgets.", "Points generic APNs registration/key rotation toward push-notifications guidance and broad widget timeline architecture toward WidgetKit guidance.", "Mentions that Live Activity push payload content-state must match the actual ContentState Codable shape and must not assume Date or ClosedRange<Date> use Unix timestamp lowerBound/upperBound dictionaries unless explicitly coordinated." ] }