WidgetKit 代码审查
widgetkit-code-review
审查 WidgetKit 代码的时间线管理、视图组合、可配置意图(Intent)及性能。当审查包含 import WidgetKit、TimelineProvider、Widget 协议或 @main struct Widget 的代码时使用。
- License 许可
- MIT
- 最近更新
- 2026-08-03
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- widgetkit-code-review
- description
- Reviews WidgetKit code for timeline management, view composition, configurable intents, and performance. Use when reviewing code with import WidgetKit, TimelineProvider, Widget protocol, or @main struct Widget.
02 资源文件 6
- 参考文档references/intents.md4.1 KB
- 参考文档references/performance.md4.5 KB
- 参考文档references/timeline.md4.2 KB
- 参考文档references/views.md2.9 KB
- 参考文档SOURCE.md187 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
WidgetKit Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| TimelineProvider, entries, reload policies | references/timeline.md |
| Widget families, containerBackground, deep linking | references/views.md |
| AppIntentConfiguration, EntityQuery, @Parameter | references/intents.md |
| Refresh budget, memory limits, caching | references/performance.md |
Review Checklist
- [ ]
placeholder(in:)returns immediately without async work - [ ] Timeline entries spaced at least 5 minutes apart
- [ ]
getSnapshotcheckscontext.isPreviewfor gallery previews - [ ]
containerBackground(for:)used for iOS 17+ compatibility - [ ]
widgetURLused for systemSmall (not Link) - [ ] No Button views (use Link or widgetURL)
- [ ] No AsyncImage or UIViewRepresentable in widget views
- [ ] Images downsampled to widget display size (~30MB limit)
- [ ] App Groups configured for data sharing between app and widget
- [ ] EntityQuery implements
defaultResult()for non-optional parameters - [ ] New intent parameters handle nil for existing widgets after updates
- [ ]
reloadTimelinescalled strategically (not on every data change)
When to Load References
- TimelineProvider implementation or refresh issues -> timeline.md
- Widget sizes, Lock Screen, containerBackground -> views.md
- Configurable widgets, AppIntent migration -> intents.md
- Memory issues, caching, budget management -> performance.md
Review Questions
- Does the widget provide fallback entries for when system delays refresh?
- Are Lock Screen families (accessoryCircular/Rectangular/Inline) handled appropriately?
- Would migrating from IntentConfiguration break existing user widgets?
- Is timeline populated with future entries or does it rely on frequent refreshes?
- Is data cached via App Groups for widget access?
04 同仓库更多 Skills
next-workflow-step
Use this skill when the user wants to transition to the next workflow step, wrap up a session cleanly, prepare a handoff, or says things like "next step", "continue the workflow", "wrap up", "hand off", "move to the next phase", "what's next in embrace", or "prepare for /clear". Also triggers when the current octo:embrace phase appears complete and no explicit next action is set.
source-discovery
This skill should be used when the user asks to "find sources", "discover URLs", "catalog a source", "classify a URL", "search for libraries", "check what exists", or mentions source discovery, URL cataloging, source classification, or research source management.
review-synthesis
This skill should be used when the user asks to "summarize review findings", "prioritize fixes", "rank review issues", "combine reviewer feedback", "create action items from review", or mentions review synthesis, finding prioritization, severity ranking, or review result summarization.
research-scoring
This skill should be used when the user asks to "score research", "check research quality", "evaluate coverage", "measure improvement", "assess research completeness", or mentions research scoring, quality metrics, coverage gaps, improvement baseline, or research pipeline status.
notebooklm-integration
This skill should be used when the user asks to "ingest into NotebookLM", "query NotebookLM", "add sources to notebook", "cross-source synthesis", "check stale sources", or mentions NotebookLM, notebook integration, source ingestion, or knowledge consolidation.
evidence-synthesis
This skill should be used when the user asks to "synthesize findings", "combine research", "cross-reference sources", "summarize evidence", "write a deep review", or mentions evidence synthesis, finding consolidation, cross-source analysis, or research summarization.