widgetkit · dpearson2699 — Claude Code skill: iOS widgets, how to install
Skill for building and reviewing WidgetKit widgets and controls: timelines, configurable widgets, interactive buttons. Use it when your app needs a Home Screen or Lock Screen widget.
npx skills add dpearson2699/swift-ios-skills --skill widgetkit -a claude-codeWhat widgetkit does
The skill walks an agent through a widget extension from the first step: adding the target, defining the entry type, writing the provider, laying out the SwiftUI view for each WidgetFamily, declaring the Widget struct and registering everything in a WidgetBundle marked @main. Widgets nobody configures use StaticConfiguration. Widgets with user options use AppIntentConfiguration together with AppIntentTimelineProvider, which is async by design.
Past the Home Screen there is material on interactive widgets driven by Button and Toggle, controls in Control Center built on ControlWidgetButton and ControlWidgetToggle, Lock Screen and StandBy surfaces, widget URLs for deep links, Smart Stack relevance, Liquid Glass rendering. App Groups belong on the extension setup step, because the app and the widget reach each other's data through that container.
Live Activity lifecycles and App Intents entity modelling are pushed to sibling skills activitykit and app-intents; they show up here only where a widget surface is involved. Timeline strategies, push updates and Xcode setup live in references/widgetkit-advanced.md. A review checklist closes the skill out.
What it helps with
- build a timeline that refreshes on a schedule
- switch a static widget to a configurable one with AppIntent
- wire a button inside a widget to an app action
- ship a Control Center toggle on iOS 18+
- review existing widget code against a checklist
Example prompts for the agent
- Build a Home Screen widget that reads order data from the shared App Group container and refreshes hourly.
- Convert
OrderStatusWidgetinto a configurable widget usingAppIntentTimelineProvider. - Review this widget against the checklist and point out the family layout mistakes.
How to install widgetkit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill widgetkit -a claude-code2Manually: put the files in place
~/.claude/skills/widgetkit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/widgetkit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill widgetkit -a codex2Manually: put the files in place
.agents/skills/widgetkit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill widgetkit -a cursor2Manually: put the files in place
.cursor/skills/widgetkit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills widgetkit2Manually: put the files in place
.github/skills/widgetkit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill widgetkit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/widgetkitManually: put the files in place
.devin/skills/widgetkit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill widgetkit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about widgetkit
How do I install widgetkit in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill widgetkit -a claude-code. The skill file lands at ~/.claude/skills/widgetkit/SKILL.md.
What does widgetkit do?
It guides an agent through WidgetKit code: the extension, the timeline provider, a view per widget family, registration in WidgetBundle. It targets iOS 26+.
How is widgetkit different from the activitykit and app-intents skills?
It stays on the widget side. Full Live Activity lifecycle work, entity modelling, Siri, Shortcuts and Spotlight stay with activitykit and app-intents.
Similar skills
Everything for Mobile →widgetkit by other authors comes first.