Real-time Lock Screen and Dynamic Island widgets for iOS using ActivityKit.
Works with
Define ActivityAttributes with static data and dynamic ContentState ; start activities with Activity.request() , update with activity.update() , and end with activity.end()
Design three Dynamic Island presentations: compact (icon + one value), minimal (single glyph), and expanded (multi-region layout with leading, trailing, center, bottom)
Push-to-update via APNs with pushType: .token , forwarding tokens thro
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionlive-activitiesExecute the skills CLI command in your project's root directory to begin installation:
Fetches live-activities from dpearson2699/swift-ios-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate live-activities. Access via /live-activities in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
2
total installs
2
this week
372
GitHub stars
0
upvotes
Run in your terminal
2
installs
2
this week
372
stars
Build real-time, glanceable experiences on the Lock Screen, Dynamic Island, StandBy, CarPlay, and Mac menu bar using ActivityKit. Patterns target iOS 26+ with Swift 6.2, backward-compatible to iOS 16.1 unless noted.
See references/live-activity-patterns.md for complete code patterns including push payload formats, concurrent activities, state observation, and testing.
NSSupportsLiveActivities = YES to the host app's Info.plist.ActivityAttributes struct with a nested ContentState.ActivityConfiguration in the widget bundle with Lock Screen
content and Dynamic Island closures.Activity.request(attributes:content:pushType:).activity.update(_:) and end with activity.end(_:dismissalPolicy:).Run through the Review Checklist at the end of this document.
Define both static data (immutable for the activity lifetime) and dynamic
ContentState (changes with each update). Keep ContentState small because
the entire struct is serialized on every update and push payload.
import ActivityKit
struct DeliveryAttributes: ActivityAttributes {
// Static -- set once at activity creation, never changes
var orderNumber: Int
var restaurantName: String
// Dynamic -- updated throughout the activity lifetime
struct ContentState: Codable, Hashable {
var driverName: String
var estimatedDeliveryTime: ClosedRange<Date>
var currentStep: DeliveryStep
}
}
enum DeliveryStep: String, Codable, Hashable, CaseIterable {
case confirmed, preparing, pickedUp, delivering, delivered
var icon: String {
switch self {
case .confirmed: "checkmark.circle"
case .preparing: "frying.pan"
case .pickedUp: "bag.fill"
case .delivering: "box.truck.fill"
case .delivered: "house.fill"
}
}
}
Set staleDate on ActivityContent to tell the system when content becomes outdated. The system sets context.isStale to true after this date; show fallback UI (e.g., "Updating...") in your views.
let content = ActivityContent(
state: state,
staleDate: Date().addingTimeInterval(300), // stale after 5 minutes
relevanceScore: 75
)
Use Activity.request to create and display a Live Activity. Pass .token as
the pushType to enable remote updates via APNs.
let attributes = DeliveryAttributes(orderNumber: 42, restaurantName: "Pizza Place")
let state = DeliveryAttributes.ContentState(
driverName: "Alex",
estimatedDeliveryTime: Date()...Date().addingTimeInterval(1800),
currentStep: .preparing
)
let content = ActivityContent(state: state, staleDate: nil, relevanceScore: 75)
do {
let activity = try Activity.request(
attributes: attributes,
content: content,
pushType: .token
)
print("Started activity: \(activity.id)")
} catch {
print("Failed to start activity: \(error)")
}
Update the dynamic content state from the app. Use AlertConfiguration to
trigger a visible banner and sound alongside the update.
let updatedState = DeliveryAttributes.ContentState(
driverName: "Alex",
estimatedDeliveryTime: Date()...Date().addingTimeInterval(600),
currentStep: .delivering
)
let updatedContent = ActivityContent(
state: updatedState,
staleDate: Date().addingTimeInterval(300),
relevanceScore: 90
)
// Silent update
await activity.update(updatedContent)
// Update with an alert
await activity.update(updatedContent, alertConfiguration: AlertConfiguration(
title: "Order Update",
body: "Your driver is nearby!",
sound: .default
))
End the activity when the tracked event completes. Choose a dismissal policy to control how long the ended activity lingers on the Lock Screen.
let finalState = DeliveryAttributes.ContentState(
driverName: "Alex",
estimatedDeliveryTime: Date()...Date(),
currentStep: .delivered
)
let finalContent = ActivityContent(state: finalState, staleDate: nil, relevanceScore: 0)
// System decides when to remove (up to 4 hours)
await activity.end(finalContent, dismissalPolicy: .default)
// Remove immediately
await activity.end(finalContent, dismissalPolicy: .immediate)
// Remove after a specific time (max 4 hours from now)
await activity.end(finalContent, dismissalPolicy: .after(Date().addingTimeInterval(3600)))
Always end activities on all code paths -- success, error, and cancellation. A leaked activity stays on the Lock Screen until the system kills it (up to 8 hours), which frustrates users.
The Lock Screen is the primary surface for Live Activities. Every device with iOS 16.1+ displays Live Activities here. Design this layout first.
struct DeliveryActivityWidget: Widget {
var body: some WidgetConfiguration {
ActivityConfiguration(for: DeliveryAttributes.self) { context in
// Lock Screen / StandBy / CarPlay / Mac menu bar content
VStack(alignment: Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
pproenca/dot-skills
mattpocock/skills
live-activities fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Registry listing for live-activities matched our evaluation — installs cleanly and behaves as described in the markdown.
Useful defaults in live-activities — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Registry listing for live-activities matched our evaluation — installs cleanly and behaves as described in the markdown.
live-activities fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
live-activities is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Keeps context tight: live-activities is the kind of skill you can hand to a new teammate without a long onboarding doc.
live-activities reduced setup friction for our internal harness; good balance of opinion and flexibility.
We added live-activities from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
live-activities fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
showing 1-10 of 47