"Widgets are not mini apps. They're glanceable views into your app's data, rendered at strategic moments and displayed by the system. Extensions run in sandboxed environments with limited memory and execution time."
Confirm successful installation by checking the skill directory location:
.cursor/skills/axiom-extensions-widgets
Restart Cursor to activate axiom-extensions-widgets. Access via /axiom-extensions-widgets in your agent's command palette.
β
Security Notice
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.
"Widgets are not mini apps. They're glanceable views into your app's data, rendered at strategic moments and displayed by the system. Extensions run in sandboxed environments with limited memory and execution time."
Mental model: Think of widgets as archived snapshots on a timeline, not live views. Your widget doesn't "run" continuously β it renders, gets archived, and the system displays the snapshot.
Extension sandboxing: Extensions have:
Limited memory (~30MB)
No network access in widget views (fetch in TimelineProvider only)
Separate bundle container from main app
Require App Groups for data sharing
When to Use This Skill
β Use this skill when:
Implementing any widget (Home Screen, Lock Screen, StandBy, Control Center)
Creating Live Activities
Debugging why widgets show stale data
Widget not appearing in gallery
Interactive buttons not responding
Live Activity fails to start
Control Center control is unresponsive
Sharing data between app and widget/extension
β Do NOT use this skill for:
Pure App Intents implementation (use app-intents-ref)
SwiftUI layout questions (use swiftui-layout)
Performance profiling (use swiftui-performance)
General debugging (use xcode-debugging)
Related Skills
extensions-widgets-ref β Comprehensive API reference
app-intents-ref β App Intents for interactive widgets
swift-concurrency β Async patterns for data fetching
swiftdata β Using SwiftData with App Groups
Example Prompts
1. "My widget isn't updating"
β This skill covers timeline policies, refresh budgets, manual reload, and App Groups configuration
2. "How do I share data between app and widget?"
β This skill explains App Groups entitlement, shared UserDefaults, and container URLs
3. "Widget shows old data even after I update the app"
β This skill covers container paths, UserDefaults suite names, and WidgetCenter reload
4. "Live Activity fails to start"
β This skill covers 4KB data limit, ActivityAttributes constraints, authorization checks
5. "Control Center control takes forever to respond"
β This skill covers async ValueProvider patterns and optimistic UI
6. "Interactive widget button does nothing"
β This skill covers App Intent perform() implementation and WidgetCenter reload
Red Flags / Anti-Patterns
Pattern 1: Network Calls in Widget View
Time cost: 2-4 hours debugging why widgets are blank or show errors
Symptom
Widget renders but shows no data
Console errors: "NSURLSession not available in widget extension"
Widget appears blank intermittently
β BAD Code
structMyWidgetView:View{@Stateprivatevar data:String?var body:someView{VStack{iflet data = data {Text(data)}}.onAppear {// β WRONG β Network in widget viewTask{let(data,_)=tryawaitURLSession.shared.data(from: apiURL)self.data =String(data: data, encoding:.utf8)}}}}
Why it fails: Widget views are rendered, archived, and reused. Network calls in views are unreliable and may not execute.
β GOOD Code
// Main app β prefetch and savefuncupdateWidgetData()async{let data =tryawaitfetchFromAPI()let shared =UserDefaults(suiteName:"group.com.myapp")! shared.set(data, forKey:"widgetData")WidgetCenter.shared.reloadAllTimelines()}// Widget TimelineProvider β read from shared storagestructProvider:TimelineProvider{funcgetTimeline(in context:Context, completion:@escaping(Timeline<Entry>)->()){let shared =UserDefaults(suiteName:"group.com.myapp")!let data = shared.string(forKey:"widgetData")??"No data"let entry =SimpleEntry(date:Date(), data: data)let timeline =Timeline(entries:[entry], policy:.atEnd)completion(timeline)}}
Pattern: Fetch data in main app, save to shared storage, read in widget.
Can TimelineProvider make network requests?
Yes, but with important caveats:
structProvider:TimelineProvider{funcgetTimeline(in context:Context, completion:@escaping(Timeline<Entry>)->()){Task{// β Network requests ARE allowed herelet data =tryawaitfetchFromAPI()let entry =SimpleEntry(date:Date(), data: data)completion(Timeline(entries:[entry], policy:.atEnd))}}}
Constraints:
30-second timeout - System kills extension if getTimeline() doesn't complete
No background sessions - Can't download large files
Battery cost - Every timeline reload uses battery
Not guaranteed - May fail on poor connections
Best practice: Prefetch in main app (faster, more reliable), use TimelineProvider network as fallback only.
Pattern 2: Missing App Groups
Time cost: 1-2 hours debugging why widget shows empty/default data
Symptom
Widget always shows placeholder or default values
Changes in main app don't reflect in widget
UserDefaults reads return nil in widget
β BAD Code
// Main appUserDefaults.standard.set("Updated", forKey:"myKey")// Widget extensionlet value =UserDefaults.standard.string(forKey:"myKey")// Returns nil!
Why it fails: UserDefaults.standard accesses different containers in app vs. extension.
β GOOD Code
// 1. Enable App Groups entitlement in BOTH targets:// - Main app target: Signing & Capabilities β + App Groups β "group.com.myapp"// - Widget extension target: Same group identifier// 2. Main applet shared =UserDefaults(suiteName:"group.com.myapp")!shared.set("Updated", forKey:"myKey")// 3. Widget extensionlet shared =UserDefaults(suiteName:"group.com.myapp")!let value = shared.string(forKey:"myKey")// Returns "Updated"
Verification:
let containerURL =FileManager.default.containerURL( forSecurityApplicationGroupIdentifier:"group.com.myapp")print("Shared container: \(containerURL?.path ??"MISSING")")// Should print path, not "MISSING"
Pattern 3: Over-Refreshing (Budget Exhaustion)
Time cost: Poor user experience, battery drain, widgets stop updating
βΊAccess to product documentation and roadmap tools (Jira, Notion, etc.)
βΊUnderstanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
βΊStakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
1Install product management skill
2Start with user story generation for known feature
3Progress to competitive analysis: research 2-3 competitors
4Use for roadmap prioritization: apply RICE/ICE scoring
5Draft stakeholder communications and refine based on feedback
6Build template library for recurring PM tasks
7Share effective prompts with product team
Common Pitfalls
β Not validating competitive researchβverify facts before sharing
β Accepting user stories without involving engineering team
β Over-relying on frameworks without qualitative judgment
β Not customizing outputs to company culture and communication style
β Skipping stakeholder validation of generated requirements
Best Practices
β Do
+Validate research and competitive analysis with real data
+Collaborate with engineering when generating technical requirements
+Customize frameworks and templates to your company context
+Use skill for first drafts, refine with stakeholder input
+Document successful prompt patterns for PM tasks
+Combine AI efficiency with human judgment and intuition
β Don't
βDon't publish competitive analysis without fact-checking
βDon't finalize user stories without engineering review
βDon't make prioritization decisions solely on AI scoring
βDon't skip customer validation of generated requirements
βDon't ignore company-specific context and culture
π‘ Pro Tips
β Provide context: company goals, constraints, customer feedback
β Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
β Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
β Use skill for 70% generation + 30% customization to company needs
When to Use This
β 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.
Learning Path
1Basic: user stories, feature specs, status updates