360 Secure SkillHub
360 安全技能中心

widgetkit

该 Skill 是 WidgetKit 实现类问题的知识路由入口,按任务匹配 widget 声明、TimelineProvider、交互与刷新等知识契约,并明确排除 Live Activities、watchOS 复杂功能、Control Widgets 等内容。

caglarbaranbora
热度 0.00
最近更新 2026-10-18 16:48:12
分类:知识依赖:纯提示词应用场景:代码生成 / API 集成 / 概念解释 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add caglarbaranbora/apple-agent-kit/widgetkit
Metadata
name
widgetkit
description
Route WidgetKit implementation tasks to the correct Knowledge Contracts -- widget declaration and families, timeline provider and entries, widget interactivity and deep links, and timeline reloading and refresh budget. Use when conforming to Widget, WidgetBundle, or WidgetConfiguration, choosing StaticConfiguration or AppIntentConfiguration, declaring supportedFamilies or reading widgetFamily, applying containerBackground, implementing TimelineProvider (placeholder, getSnapshot, getTimeline), building a Timeline of TimelineEntry values, choosing a TimelineReloadPolicy, wiring widgetURL, Link, Button(intent:), or Toggle(_:isOn:intent:), or calling WidgetCenter.reloadTimelines/reloadAllTimelines. v1 is home-screen/Lock-Screen widgets only -- no Live Activities/ActivityKit, no watchOS complications as a distinct surface, no Control Widgets (iOS 18 Controls/ControlWidget), no StandBy-specific layout. Triggers on WidgetKit, Widget, WidgetBundle, WidgetConfiguration, StaticConfiguration, AppIntentConfiguration, supportedFamilies, widgetFamily, containerBackground, TimelineProvider, TimelineEntry, Timeline, TimelineReloadPolicy, placeholder, getSnapshot, getTimeline, widgetURL, Link, Button(intent:), WidgetCenter, reloadTimelines, reloadAllTimelines.
id
skill.widgetkit.foundations
title
WidgetKit — Foundations
version
1.0.0
status
Approved
artifact_type
skill
domain
WidgetKit
routes
["knowledge.widgetkit.widget-declaration-and-families","knowledge.widgetkit.timeline-provider-and-entries","knowledge.widgetkit.widget-interactivity-and-deep-links","knowledge.widgetkit.timeline-reloading-and-refresh-budget"]
related
["knowledge.app-intents.intent-results-and-widget-hookup","knowledge.backgroundtasks.background-refresh-and-widget-timeline-hookup"]
last_updated
"2026-08-08T00:00:00.000Z"

WidgetKit — Foundations Skill

Purpose

Route WidgetKit implementation tasks to the minimum required WidgetKit Knowledge Contracts. v1 scope is home-screen and Lock-Screen widgets built with Widget/WidgetConfiguration and TimelineProvider only — no Live Activities, no watchOS complications as a distinct surface, no Control Widgets, no StandBy-specific layout.

Routing

Load only the contracts relevant to the task. All paths relative to knowledge/widgetkit/.

  • Conforming to Widget, WidgetBundle, or WidgetConfiguration; choosing StaticConfiguration/AppIntentConfiguration; declaring supportedFamilies or reading @Environment(\.widgetFamily); applying .containerBackground(for: .widget); or the kind string's stability -> widget-declaration-and-families.md
  • Implementing TimelineProvider's placeholder(in:), getSnapshot(in:completion:), or getTimeline(in:completion:); building a Timeline of TimelineEntry values; or choosing a TimelineReloadPolicy -> timeline-provider-and-entries.md
  • Wiring widgetURL(_:), Link, Button(intent:), or Toggle(_:isOn:intent:) into a widget's view -> widget-interactivity-and-deep-links.md
  • Calling WidgetCenter.shared.reloadTimelines(ofKind:)/reloadAllTimelines(), or reasoning about the refresh budget -> timeline-reloading-and-refresh-budget.md

Never load more than the contracts relevant to the specific question.

Stop Conditions

Stop and report if the requested topic has no matching Knowledge Contract in knowledge/widgetkit/ — do not guess or fall back to general knowledge.

  • Live Activities and ActivityKit — Deferred
  • watchOS complications as a distinct surface — Deferred
  • Control Widgets (iOS 18 Controls/ControlWidget) — Deferred
  • StandBy-specific layout — Deferred
  • Authoring an AppIntent itself — its parameters, perform() body, and any entities it exposes — owned by app-intents (knowledge.app-intents.intent-results-and-widget-hookup); this Skill only routes to wiring an already-authored intent into a widget's tap target
  • Scheduling the background work that produces new widget data (e.g. a BGAppRefreshTask) — owned by backgroundtasks (knowledge.backgroundtasks.background-refresh-and-widget-timeline-hookup); this Skill only routes to the reloadTimelines/reloadAllTimelines call site once new data has already landed