widget-generator

Generate complete WidgetKit widget implementations for iOS and macOS apps.

27|5|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/bocan/bocan-music --skill widget-generator-bocan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: widget-generator
Source: https://github.com/bocan/bocan-music/tree/main/.claude/skills/generators/widget-generator
Command: npx skills add https://github.com/bocan/bocan-music --skill widget-generator-bocan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the tedious, error-prone manual work of writing boilerplate WidgetKit code for iOS and macOS apps, saving developers hours of implementation time for home screen and lock screen widgets.

Core Features & Use Cases

  • Complete Widget Implementation: Generates all required files including timeline providers, size-specific views, App Intents for configuration and interactivity, and WidgetBundle registration.
  • Interactive & Configurable Support: Natively supports iOS 17+ interactive buttons/toggles and user-configurable widgets via long-press editing, plus lock screen accessory widgets.
  • Use Case: A developer building a music app can use this Skill to instantly generate a now-playing widget that displays track info on the home screen and lock screen, with interactive play/pause controls.

Quick Start

Use the widget-generator skill to create an interactive now-playing widget for my Swift music app that shows current track information and play/pause controls on the home screen and lock screen.

Frequently Asked Questions about widget-generator

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

FAQPage Schema
How do I create interactive iOS widgets with WidgetKit and App Intents?

To create interactive iOS widgets with WidgetKit and App Intents, you need to implement timeline providers for content updates and configure App Intent protocols for user controls like buttons and toggles. This Skill automates generating these complete widget extension files.

Does WidgetKit support lock screen widgets and interactive controls on macOS?

Yes, WidgetKit supports lock screen accessory widgets and interactive controls across iOS 17+ and macOS 14+. This Skill generates native widget extensions that handle cross-size family layouts and interactive user controls for both platforms.

What's the best way to generate a WidgetBundle and timeline provider for Swift apps?

Generating a WidgetBundle and timeline provider for Swift apps requires creating boilerplate code for system family compatibility and timeline-based content updates. This Skill automates this process by producing complete end-to-end WidgetKit implementations.

How do I share data between my main Swift app and my WidgetKit widget?

To share data between your Swift app and WidgetKit widget, you configure App Groups to enable shared container access. This Skill generates the required App Groups data sharing implementation as part of the complete widget extension setup.

Can I use WidgetKit to build configurable widgets that users can edit via long-press?

Yes, WidgetKit supports user-configurable widgets through long-press editing by integrating App Intents for dynamic configuration. This Skill natively supports generating these configurable widgets along with the required timeline provider infrastructure.