
Widgetkit
Add or refine WidgetKit widgets, Live Activities, Dynamic Island, and Control Center controls on modern iOS.
Overview
WidgetKit is an agent skill for the Build phase that implements and reviews WidgetKit, ActivityKit Live Activities, and Control Center widgets on iOS.
Install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill widgetkitWhat is this skill?
- Workflow for Widget protocol, WidgetBundle, and configuration types
- TimelineProvider and AppIntentTimelineProvider patterns with refresh budgets
- Interactive widgets with Button, Toggle, and AppIntent actions (iOS 17+)
- Live Activities and Dynamic Island layouts: compact, minimal, expanded
- Control Center widgets with ControlWidgetButton/ControlWidgetToggle and extension entitlements (iOS 18+, iOS 26+ guidanc
Adoption & trust: 1.8k installs on skills.sh; 713 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need widgets or Live Activities but timeline providers, entitlements, Dynamic Island layouts, and refresh limits are easy to get wrong in Xcode.
Who is it for?
Indie iOS devs adding glanceable UI, real-time Live Activities, or Control Center toggles to an existing SwiftUI/UIKit app.
Skip if: Android widgets, web-only products, or teams with no Apple developer account or widget extension target.
When should I use this skill?
User builds or reviews WidgetKit widgets, Live Activities, Dynamic Island, Control Center controls, timelines, deep links, push reloads, or widget extension setup.
What do I get? / Deliverables
You get working widget extensions, timeline strategies, interactive intents, and Live Activity layouts aligned with current WidgetKit and ActivityKit patterns.
- Widget extension target configuration
- TimelineProvider or AppIntentTimelineProvider implementation
- Live Activity and Control Center UI definitions
Recommended Skills
Journey fit
How it compares
Use instead of copying outdated Stack Overflow widget samples—this skill tracks WidgetKit, ActivityKit, and control APIs as a structured implementation guide.
Common Questions / FAQ
Who is widgetkit for?
Solo and small-team iOS developers using Claude Code, Cursor, or similar agents to ship widgets, Live Activities, and Control Center controls.
When should I use widgetkit?
Use it during Build frontend when creating widget extensions, configuring families and timelines, adding Dynamic Island Live Activities, or debugging refresh budgets and App Groups.
Is widgetkit safe to install?
Review the Security Audits panel on this Prism page and the dpearson2699/swift-ios-skills repository; the skill guides code generation in your local Xcode project only.
SKILL.md
READMESKILL.md - Widgetkit
# WidgetKit and ActivityKit Build home screen widgets, Lock Screen widgets, Live Activities, Dynamic Island presentations, Control Center controls, and StandBy surfaces for iOS 26+. See [references/widgetkit-advanced.md](references/widgetkit-advanced.md) for timeline strategies, push-based updates, Xcode setup, and advanced patterns. ## Contents - [Workflow](#workflow) - [Widget Protocol and WidgetBundle](#widget-protocol-and-widgetbundle) - [Configuration Types](#configuration-types) - [TimelineProvider](#timelineprovider) - [AppIntentTimelineProvider](#appintenttimelineprovider) - [Widget Families](#widget-families) - [Interactive Widgets (iOS 17+)](#interactive-widgets-ios-17) - [Live Activities and Dynamic Island](#live-activities-and-dynamic-island) - [Control Center Widgets (iOS 18+)](#control-center-widgets-ios-18) - [Lock Screen Widgets](#lock-screen-widgets) - [StandBy Mode](#standby-mode) - [Design Patterns](#design-patterns) - [iOS 26 Additions](#ios-26-additions) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Workflow ### 1. Create a new widget 1. Add a Widget Extension target in Xcode (File > New > Target > Widget Extension). 2. Enable App Groups for shared data between the app and widget extension. 3. Define a `TimelineEntry` struct with a `date` property and display data. 4. Implement a `TimelineProvider` (static) or `AppIntentTimelineProvider` (configurable). 5. Build the widget view using SwiftUI, adapting layout per `WidgetFamily`. 6. Declare the `Widget` conforming struct with a configuration and supported families. 7. Register all widgets in a `WidgetBundle` annotated with `@main`. ### 2. Add a Live Activity 1. Define an `ActivityAttributes` struct with a nested `ContentState`. 2. Add `NSSupportsLiveActivities = YES` to the app's Info.plist. 3. Create an `ActivityConfiguration` in the widget bundle with Lock Screen content and Dynamic Island closures. 4. Start the activity with `Activity.request(attributes:content:pushType:)`. 5. Update with `activity.update(_:)` and end with `activity.end(_:dismissalPolicy:)`. ### 3. Add a Control Center control 1. Define an `AppIntent` for the action. 2. Create a `ControlWidgetButton` or `ControlWidgetToggle` in the widget bundle. 3. Use `StaticControlConfiguration` or `AppIntentControlConfiguration`. ### 4. Review existing widget code Run through the Review Checklist at the end of this document. ## Widget Protocol and WidgetBundle ### Widget Every widget conforms to the `Widget` protocol and returns a `WidgetConfiguration` from its `body`. ```swift struct OrderStatusWidget: Widget { let kind: String = "OrderStatusWidget" var body: some WidgetConfiguration { StaticConfiguration(kind: kind, provider: OrderProvider()) { entry in OrderWidgetView(entry: entry) } .configurationDisplayName("Order Status") .description("Track your current order.") .supportedFamilies([.systemSmall, .systemMedium]) } } ``` ### WidgetBundle Use `WidgetBundle` to expose multiple widgets from a single extension. ```swift @main struct MyAppWidgets: WidgetBundle { var body: some Widget { OrderStatusWidget() FavoritesWidget() DeliveryActivityWidget() // Live Activity QuickAction