observation-documentation
Observation official doc index — load when building Observation features, @Observable, withObservationTracking, ObservationRegistrar, or any Observation framework behavior.
- License 许可
- MIT
- 最近更新
- 2026-10-25
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- observation-documentation
- metadata
- { "user-invocable": "false" }
- description
- Observation official doc index — load when building Observation features, @Observable, withObservationTracking, ObservationRegistrar, or any Observation framework behavior.
- allowed-tools
- WebFetch(domain:developer.apple.com)
03 SKILL.md 正文
Observation Documentation Index
Fetch from this index before implementing any Observation feature — do not guess at behavior. One URL per topic — read the most specific one first.
Discovery
https://developer.apple.com/documentation/observation— Main Observation framework page; overview, topic sections, and sample code.
Observable Conformance
https://developer.apple.com/documentation/observation/observable()—@Observablemacro: declares and implements conformance to theObservableprotocol at compile time.https://developer.apple.com/documentation/observation/observable—Observableprotocol: type that emits notifications to observers when underlying data changes.
Change Tracking
https://developer.apple.com/documentation/observation/withobservationtracking(_:onchange:)—withObservationTrackingfunction: tracks access to properties within a closure and callsonChangewhen a tracked property changes.https://developer.apple.com/documentation/observation/observationregistrar—ObservationRegistrarstruct: provides storage for tracking and access to data changes.https://developer.apple.com/documentation/observation/observationregistrar/init()—init(): creates an instance of the observation registrar.https://developer.apple.com/documentation/observation/observationregistrar/willset(_:keypath:)—willSet(_:keyPath:): property observation called before setting the value of the subject.https://developer.apple.com/documentation/observation/observationregistrar/didset(_:keypath:)—didSet(_:keyPath:): property observation called after setting the value of the subject.https://developer.apple.com/documentation/observation/observationregistrar/access(_:keypath:)—access(_:keyPath:): registers access to a specific property for observation.https://developer.apple.com/documentation/observation/observationregistrar/withmutation(of:keypath:_:)—withMutation(of:keyPath:_:): identifies mutations to the transactions registered for observers.
Async Observation
https://developer.apple.com/documentation/observation/observations—Observationsstruct: async sequence generated from a closure that tracks transactional changes of@Observabletypes.https://developer.apple.com/documentation/observation/observations/init(_:)—init(_:): constructs an async sequence by tracking changes of@Observabletypes.https://developer.apple.com/documentation/observation/observations/untilfinished(_:)—untilFinished(_:): constructs an async sequence for a given closure, tracking changes of@Observabletypes.https://developer.apple.com/documentation/observation/observations/iterator—Observations.Iterator: iterator for theObservationsasync sequence.https://developer.apple.com/documentation/observation/observations/iteration—Observations.Iteration: enumeration for iteration state.
Selective Observation
https://developer.apple.com/documentation/observation/observationignored()—@ObservationIgnoredmacro: disables observation tracking of a property.https://developer.apple.com/documentation/observation/observationtracked()—@ObservationTrackedmacro: synthesizes a property for accessors (used internally by@Observable).
SwiftUI Integration
https://developer.apple.com/documentation/swiftui/managing-model-data-in-your-app— Managing model data in your app: creating connections between your app's data model and views.https://developer.apple.com/documentation/swiftui/migrating-from-the-observable-object-protocol-to-the-observable-macro— Migrating from ObservableObject to Observable: updating existing apps to leverage Observation.
04 同仓库更多 Skills
workflow
Development workflow for this repo: plan → test → implement → human review → repeat. Load when starting any feature, bug fix, or refactor.
usernotifications-documentation
UserNotifications official doc index — load when building notification features, requesting authorization, scheduling local notifications, handling notification actions, or any UserNotifications framework behavior.
swiftui-macos-form-alignment
SwiftUI macOS Form layout: alignment override bug, background control, and VStack-based alternative. Load when debugging alignment issues inside Form rows, or when row controls (toggles, text fields, pickers) are visually misaligned with their labels on macOS.
swiftui-documentation
SwiftUI official doc index — load when building SwiftUI views, modifiers, state management, data flow, AppKit bridging, or any SwiftUI behavior.
swifterm-documentation
SwiftTerm official doc index — load when building SwiftTerm features, terminal emulation, terminal views, process lifecycle, delegate callbacks, GPU rendering, pseudo-terminals, or any SwiftTerm-specific behavior. Any project that uses or interacts with SwiftTerm should load this skill.
sqlite-documentation
SQLite official doc index — load when working with SQLite, the C/C++ API, import SQLite3, prepared statements, binding, query execution, result codes, or any SQLite-specific behavior. Any project that uses or interacts with SQLite should load this skill.