widgets

A skill for writing and reviewing SwiftUI WidgetKit code for iPhone, iPad, Apple Watch, and related widget surfaces. It covers widgets that show timely information and can sometimes respond to user actions.

In plain words
What is it for?
Use it to build or review Home Screen, Lock Screen, StandBy, and watch widgets, including configurable, interactive, and control widgets.
Why use it?
It helps account for WidgetKit's execution limits, update schedules, configurations, layouts, and data-loading rules. These details affect whether widgets display and refresh correctly.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/n0an/widgets-agent-skill/widgets
Any agent
npx skills add n0an/Widgets-Agent-Skill --skill widgets
Clone the repo
git clone --depth 1 https://github.com/n0an/Widgets-Agent-Skill

Made for: Claude Code, Codex.

Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,145 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00140 $0.06145
Opus 5 $0.00070 $0.03073
Sonnet 5 $0.00028 $0.01229
Haiku 4.5 $0.00014 $0.00615

Measured 2d ago against content hash c070435ebe6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

widgets scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

widgets/SKILL.md · 279 lines

How it starts

The opening of the file, as written. The whole thing — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Write and review SwiftUI WidgetKit code, choosing the right configuration, timeline policy, and surface so the widget renders correctly in every mode, updates within its budget, and behaves correctly across the extension/app process boundary.

Review process:

  1. Establish the widget execution model (the extension process, app groups, the timeline lifecycle, the reload budget) using references/fundamentals.md.
  2. Validate the timeline provider (placeholder/snapshot/timeline, reload policy, WidgetCenter reloads, entry relevance) using references/timeline-provider.md.
  3. Validate the configuration and any user-configurable parameters (StaticConfiguration, AppIntentConfiguration, WidgetConfigurationIntent) using references/configuration-and-intents.md.
  4. Check whether any legacy API is in use and route it to the modern equivalent (SiriKit .intentdefinition → App Intents, ClockKit → WidgetKit, PreviewProvider#Preview) using references/migration-and-deprecations.md.
  5. Validate data loading - networking, persistence, images, location - in the provider and intents using references/data-and-networking.md.
  6. Validate family support and per-family layout (WidgetFamily, sizing, content margins, ViewThatFits) using references/families-and-layout.md.
  7. Validate Lock Screen / accessory widgets and watch complications (widgetLabel, AccessoryWidgetBackground, the transparent-container trick, ClockKit migration) using references/lock-screen-and-watch.md.
  8. Validate rendering across full-color, accented, tinted, and vibrant modes (widgetRenderingMode, widgetAccentable, widgetAccentedRenderingMode, the luminance-to-alpha trick) using references/rendering-modes-and-tinting.md.
  9. Validate interactivity (Button(intent:), Toggle(intent:), the app-process boundary, reloadTimelines, invalidatableContent) using references/interactive-widgets.md.
  10. Validate deep links and navigation into the app (widgetURL, Link, onOpenURL, OpenIntent) using references/deep-linking-and-navigation.md.
  11. Validate animations and entry transitions (contentTransition, .transition + identity, invalidatableContent, what doesn't animate) using references/animations-and-transitions.md.
  12. Validate Control Center controls (ControlWidget, toggle vs button, SetValueIntent, value providers, ControlCenter reloads) using references/controls.md.
  13. Validate Live Activities and the Dynamic Island (ActivityAttributes, ActivityConfiguration, DynamicIsland, request/update/end, push, supplementalActivityFamilies) using references/live-activities.md.
  14. Validate Smart Stack relevance (TimelineEntryRelevance, relevance() / WidgetRelevance, RelevanceConfiguration, push-based relevance) using references/relevance-and-smart-stacks.md.
  15. Check the design and gallery presentation (glanceability, sizes, the don'ts, configurationDisplayName/description, the placeholder) using references/design-and-gallery.md.
  16. Validate previews and the testing/debugging workflow (#Preview(as:), WidgetKit developer mode, the reload budget) using references/previews-and-testing.md.
  17. Validate platform-specific surfaces (visionOS spatial widgets, CarPlay, macOS menu bar, the availability map) using references/platforms.md.
  18. Catch common mistakes using references/anti-patterns.md.

If doing partial work, load only the relevant reference files.

Task-based routing

Match the user's goal to the read order. Load only what you need.

Read the full file on GitHub · 279 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 279 lines · 140 tokens per session scan A c070435ebe6e

Subscribe to this mod's changes

widgets is a skill published in the GitHub repository n0an/Widgets-Agent-Skill (11 stars, last pushed 2mo ago), licensed MIT. It adds 140 tokens to every session and 6,145 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

swift-format-style

Writes and reviews Swift FormatStyle code, replacing legacy Formatter subclasses and C-style String(format:) with modern .formatted() APIs. Use when formatting numbers, dates, durations, measurements, lists, names, byte counts, or URLs.

n0an/Swift-FormatStyle-Agent-Skill · 50 tokens

app-intents

Writes and reviews Swift App Intents code that exposes app actions and data to Siri, Shortcuts, Spotlight, widgets, Control Center, and Apple Intelligence. Use when adding AppIntent, AppEntity, OpenIntent, AppShortcutsProvider, EntityQuery, Focus Filters, AssistantEntity/AssistantIntent schemas, on-screen awareness…

n0an/App-Intents-Agent-Skill · 99 tokens

swiftui-native-component-design

Use when creating, designing, reviewing, or refactoring a reusable/custom SwiftUI view or component — especially one meant for a design-system module, a shared UI package, or anywhere multiple screens will call into it. Trigger on requests like "build a custom SwiftUI button/toggle/card/rating/badge component"…

alexanderwe/swiftui-native-component-design-skill · 207 tokens

audit-xcode-security-settings

Audit and enable security-oriented Xcode build settings. Progressively enables compiler warnings, static analyzer checkers, and Enhanced Security features. Use when: user wants to secure their Xcode project, audit security settings, enable hardening, review security posture of build configuration, set up…

superagents-lab/xcode27-skills · 111 tokens

uikit-app-modernization

Modernizes UIKit apps for multi-window environments by replacing legacy shared-state APIs with context-appropriate modern alternatives. This includes references to mainScreen, interfaceOrientation, application and scene lifecycle, as well as safe area inset updates.

superagents-lab/xcode27-skills · 50 tokens

test-modernizer

Modernize test suites to use modern Swift Testing features or migrate from XCTest.

superagents-lab/xcode27-skills · 19 tokens