/swiftui-stores:swiftui-storesfrom swiftui-stores
Design, review, or migrate SwiftUI shared state using Observation-based Stores.
Ships in swiftui-stores. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Treat each Store as a custom hook: an @Observable class that owns state and
side effects. Views read properties directly and get fine-grained,
property-level updates — only views that read a changed property re-render.
Keep view logic out of Stores; views trigger async mutations.
Requires iOS 17 / macOS 14+. For older targets, fall back to the legacy ObservableObject pattern (see the manual's legacy section).
@Observable @MainActor
classes. Plain var properties are automatically observed — no @Published.@State (not @StateObject)..environment(store) and read them with
@Environment(StoreType.self) to avoid prop drilling.withObservationTracking re-subscription, the Observations
AsyncSequence (iOS 26+), or didSet.task, refreshable, or Task { } blocks;
use @Bindable when a view needs two-way bindings into a store.@MainActor for Swift 6 strict concurrency.@ObservationIgnored for caches or internals that must not trigger
view updates.@StateObject/@ObservedObject/@EnvironmentObject/@Published
with @Observable types — the Observation replacements are @State, plain
properties or @Bindable, @Environment(Type.self), and plain var.@Bindable — it is for bindings only; ownership is
@State, injection is .environment().body.withObservationTracking's onChange to fire more than once —
it is one-shot; re-subscribe recursively.Read references/swiftui-stores-manual.md for the full React-to-SwiftUI
mapping, store composition patterns, mutation examples, migration table from
ObservableObject, and rationale.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub dvcrn/skills --plugin swiftui-stores