AGENT SKILL

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

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
  • [ ] getSnapshot checks context.isPreview for gallery previews
  • [ ] containerBackground(for:) used for iOS 17+ compatibility
  • [ ] widgetURL used 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
  • [ ] reloadTimelines called 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

  1. Does the widget provide fallback entries for when system delays refresh?
  2. Are Lock Screen families (accessoryCircular/Rectangular/Inline) handled appropriately?
  3. Would migrating from IntentConfiguration break existing user widgets?
  4. Is timeline populated with future entries or does it rely on frequent refreshes?
  5. Is data cached via App Groups for widget access?

04 同仓库更多 Skills

ray-manaloto
ray-manaloto/macos-development-environment

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.

★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

★ 1
ray-manaloto
ray-manaloto/macos-development-environment

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.

★ 1