widget-generator

Generate complete WidgetKit widget implementations with timeline providers and App Intents.

603|51|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/rshankras/claude-code-apple-skills --skill widget-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: widget-generator
Source: https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/generators/widget-generator
Command: npx skills add https://github.com/rshankras/claude-code-apple-skills --skill widget-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation of WidgetKit widgets, handling everything from basic timeline providers to interactive and configurable designs for home and lock screens.

Core Features & Use Cases

  • Generate WidgetKit Widgets: Creates all necessary Swift files for WidgetKit, including definitions, timeline providers, and views.
  • Supports Modern Features: Generates code for interactive widgets (iOS 17+), configurable widgets via App Intents, and lock screen accessory widgets.
  • Use Case: You need to add a new widget to your app that displays real-time stock prices. This Skill will generate the complete WidgetKit code, including data fetching logic and different size variants.

Quick Start

Generate a WidgetKit widget that displays the user's daily step count.

Frequently Asked Questions about widget-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a WidgetKit widget that updates with real-time data?

To create a WidgetKit widget with real-time data, you need a timeline provider that defines a refresh policy and SwiftUI views to render the fetched data. This Skill generates the complete widget implementation, including the data fetching logic and timeline configuration.

Can I build interactive widgets for iOS 17 and later?

Yes, you can build interactive widgets for iOS 17 and later using App Intents. This Skill generates Swift code for interactive elements, allowing users to trigger actions directly from the home screen without opening the app.

How do I add lock screen accessory widgets to my macOS app?

Adding lock screen accessory widgets requires specific SwiftUI configurations for compact display. This Skill generates the necessary widget definitions and views tailored for lock screen placement on iOS and macOS.

Does WidgetKit support user-configurable widgets via App Intents?

Yes, WidgetKit supports configurable widgets via App Intents. This Skill generates the required Swift code to let users customize widget content and parameters directly from the home screen interface.

What's the best way to generate SwiftUI views for different widget sizes?

The best way to generate SwiftUI views for different widget sizes is to create separate layout definitions for each WidgetFamily. This Skill generates the complete WidgetKit code, including different size variants and data refresh policies.

Why does my WidgetKit timeline provider not refresh data correctly?

WidgetKit timeline providers may not refresh data correctly if the refresh policy is not properly configured in the timeline entry. This Skill addresses data refresh policies and generates complete timeline provider implementations to handle dynamic updates.