Swiftui Pro
twostraws/SwiftUI-Agent-Skill
Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.
SwiftUI's actual mental model — view identity, lifetime, and dependencies (the Demystify canon), state ownership decision rules, Observation's per-property tracking, body-performance discipline, and…
$ npx skills add rshankras/claude-code-apple-skills --skill data-flow -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rshankras/claude-code-apple-skills data-flow --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/swiftui/data-flow .claude/skills/data-flow && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "data-flow" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/data-flow into .claude/skills/data-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-flow", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/data-flowType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rshankras/claude-code-apple-skills --skill data-flow -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rshankras/claude-code-apple-skills data-flow --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/swiftui/data-flow .agents/skills/data-flow && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "data-flow" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/data-flow into .agents/skills/data-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-flow", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rshankras/claude-code-apple-skills --skill data-flow -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rshankras/claude-code-apple-skills data-flow --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/swiftui/data-flow .cursor/skills/data-flow && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "data-flow" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/data-flow into .cursor/skills/data-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-flow", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rshankras/claude-code-apple-skills.git --path skills/swiftui/data-flow--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rshankras/claude-code-apple-skills --skill data-flow -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rshankras/claude-code-apple-skills data-flow --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/swiftui/data-flow .gemini/skills/data-flow && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "data-flow" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/data-flow into .gemini/skills/data-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-flow", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rshankras/claude-code-apple-skills data-flowInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rshankras/claude-code-apple-skills --skill data-flow -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/swiftui/data-flow .github/skills/data-flow && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "data-flow" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/data-flow into .github/skills/data-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-flow", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rshankras/claude-code-apple-skills --skill data-flow -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rshankras/claude-code-apple-skills data-flow --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/swiftui/data-flow .opencode/skills/data-flow && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "data-flow" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/data-flow into .opencode/skills/data-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "data-flow", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
data-flowSwiftUI's actual mental model — view identity, lifetime, and dependencies (the Demystify canon), state ownership decision rules, Observation's per-property tracking, body-performance discipline, and…
Data Flow is an agent skill from rshankras/claude-code-apple-skills. SwiftUI's actual mental model — view identity, lifetime, and dependencies (the Demystify canon), state ownership decision rules, Observation's per-property tracking, body-performance discipline, and the main-actor concurrency contract. Use when state resets mysteriously, views re-render too often, animations glitch between branches, choosing @State vs @Bindable vs plain property, or debugging "why did body run."
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Mobile, covering iOS development. It works with SwiftUI. The repository describes itself as: Claude Code skills for Apple platform development (iOS, macOS, iPadOS) — product validation, code generation, App Store optimization, and more. The licence is MIT.
Read from SKILL.md and the folder at commit 9ffb831. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGlobGrepFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are swift).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
developer.apple.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Data Flow loads about 2.1k tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 902 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from rshankras/claude-code-apple-skills at commit 9ffb831, republished under its MIT licence (© rshankras). 902 words, ~2,060 tokens.
.claude/skills/data-flow/SKILL.md (or your agent's skills folder).Nearly every confusing SwiftUI bug — state that resets, animations that crossfade instead of
move, lists that flash, bodies that run constantly — traces to identity, lifetime, or
dependencies. This is Apple's own mental model (the Demystify sessions + Data Essentials +
Observation), current through the WWDC26 @State macro.
ForEach misbehaving@State, @Binding, @Bindable, @Environment, plain propertySelf._printChanges(); concurrency warnings in view codeSwiftUI sees three things: identity, lifetime, dependencies. Views with the same identity are "different states of the same conceptual UI element"; distinct identities are distinct views.
Structural identity = type + position in the hierarchy. An if/else creates two
identities (_ConditionalContent) — flipping the branch destroys/recreates the view: state
resets, transitions crossfade instead of animating.
Explicit identity = id: in ForEach or .id(_:) (also the target for
ScrollViewReader.scrollTo). Changing an explicit id is a new identity — new lifetime,
fresh state. (That's the .id(item.id) force-refresh trick — use it knowingly.)
The inert-modifier rule (the most under-used fix): prefer one view whose modifiers vary over branching —
// ❌ two identities; state resets, transition crossfades
if expired { content.opacity(0.3) } else { content }
// ✅ one identity; cheap, pruned when inert
content.opacity(expired ? 0.3 : 1.0)Inert values (opacity 1, padding 0) cost nothing. "By default, try to preserve identity."
Conditionally include a view inside a stack rather than conditionally wrapping the stack.
@State/@StateObject storage
tears down and reinitializes. If state "randomly resets," find the identity change.@State is a macro with lazy initialization of @Observable classes (backported
to iOS 17) — the stored object initializes once per lifetime, not on every view-value init.
Remove default values when also assigning in init (source-breaking edge).var id = UUID() computed per access (everything flashes/reanimates).Identifiable is for. Range ForEach
(0..<n) only with a constant range.if filter inside ForEach (0-or-1 views) or AnyView
forces List to resolve every row just to count them. Filter in the data, and cache the
filtered collection in the model — an inline .filter re-runs linearly on every body.Image, not the whole
model). Extracting subviews is free — "breaking up one view into multiple doesn't hurt
performance" — and shrinks invalidation scope.@Observable) tracks per property, per instance — a view re-renders only
when a property it actually read changes, including through computed properties, arrays,
optionals, and nesting.ObservableObject: drop conformance + @Published → @Observable;
@ObservedObject → delete or @Bindable; @EnvironmentObject → @Environment.
Invalidation narrows from whole-object to read-properties — a free performance win.Ask Apple's three questions: what data does the view need · how does it manipulate it · where does truth live?
| Situation | Use |
|---|---|
| Display-only, parent owns it | plain let property |
| Transient, view-local UI state | @State (group related fields into one struct with mutating methods) |
| Write access to someone else's truth | @Binding (bindings compose: $config.note) |
| Observable model owned by this view | @State (lazy-init since WWDC26 macro) |
Observable model, needs $model.field bindings only | @Bindable |
| Observable model, globally available | @Environment |
| Observable model, none of the above | plain property |
@ObservedObject default — every
re-run reallocates it (heap churn, data loss); use @StateObject or @State + @Observable.@State for the same value desync — lift state to the container
and hand children Bindings.@SceneStorage (restoration state, per window) and @AppStorage (settings) are stores
next to your model, not the model. Limit total sources of truth..task { await … }.Self._printChanges() (or expression Self._printChanges() at an
LLDB breakpoint): @self = view value changed; a named property = that dependency changed.
Debug-only — never ship it. Deeper workflow: performance/swiftui-debugging.AnyView hides structure from SwiftUI (worse diagnostics/performance) — use
@ViewBuilder helpers and switch instead.View is @MainActor: body, @State, members, and Task { } created in body are all
main-actor — most view code needs zero annotations (and Swift 6.2's default-isolation mode
removes the rest).Shape.path(in:), Layout methods,
visualEffect, onGeometryChange — that's why they're Sendable. Don't touch
self.someState there; copy the value in the capture list ([pulse]) and compute from
the proxies SwiftUI hands you.await can resume after the frame deadline, so time-sensitive state (gesture/scroll
reactions, button loading indicators) must mutate synchronously before starting async work.
Bridge UI↔async through a piece of state; keep view Tasks minimal ("inform the model") so
async logic stays unit-testable.Data-flow review: Symptom | Root cause (identity / lifetime / dependency / ownership) | Fix
— check identity first; it explains most of the rest.
performance/swiftui-debugging (Instruments workflow), swiftui/layout, swift/concurrency-patterns, ios/coding-best-practices© rshankras, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/swiftui/data-flow of rshankras/claude-code-apple-skills.
Open the folder on GitHubat commit 9ffb831
Data Flow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Data Flow this skillrshankras/claude-code-apple-skills | 781 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Swiftui Protwostraws/SwiftUI-Agent-Skill | 5k | 2 repos | ~1k | Automated safety check: Pass | MIT | |
| Swiftui UI PatternsAFK-surf/OpenBridge | 430 | 4 repos | ~887 | Automated safety check: Pass | MIT | |
| Swiftui Performance Auditharperreed/dotfiles | 334 | 8 repos | ~1.4k | Automated safety check: Pass | None | |
| Hig Project Contextraintree-technology/hig-doctor | 142 | 5 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Hig Components Contentraintree-technology/hig-doctor | 142 | 5 repos | ~1.3k | Automated safety check: Pass | MIT |
twostraws/SwiftUI-Agent-Skill
Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.
AFK-surf/OpenBridge
Best practices and example-driven guidance for building SwiftUI views and components.
harperreed/dotfiles
Audit and improve SwiftUI runtime performance from code review and architecture.
raintree-technology/hig-doctor
Create or update a shared Apple design context document that other HIG skills use to tailor guidance.
raintree-technology/hig-doctor
Apple Human Interface Guidelines for content display components.
liseami/ChunUI
Build iOS apps with the ChunUI design system (Monochrome texture extracted from the production app Zinner/Chat0IM).
rshankras/claude-code-apple-skills
Generate accessibility infrastructure for VoiceOver, Dynamic Type, and accessibility features.
rshankras/claude-code-apple-skills
SwiftUI animation patterns including springs, transitions, PhaseAnimator, KeyframeAnimator, SF Symbol effects, scroll-driven effects, mesh gradients, text renderers, and shader effects.
rshankras/claude-code-apple-skills
Generate compelling App Store descriptions that convert browsers into users.
rshankras/claude-code-apple-skills
Generates an app icon for macOS or iOS — a fast CoreGraphics placeholder and/or flat layered source art to finish in Icon Composer (the Liquid Glass / iOS 26+ standard).
rshankras/claude-code-apple-skills
Turn an app idea into validated, App-Store-ready name candidates.
rshankras/claude-code-apple-skills
Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School &…
Works with
Categories
SwiftUI's actual mental model — view identity, lifetime, and dependencies (the Demystify canon), state ownership decision rules, Observation's per-property tracking, body-performance discipline, and…. Data Flow is an agent skill from rshankras/claude-code-apple-skills. SwiftUI's actual mental model — view identity, lifetime, and dependencies (the Demystify canon), state ownership decision rules, Observation's per-property tracking, body-performance discipline, and the main-actor concurrency contract.
Data Flow fits situations like: state resets mysteriously; views re-render too often; animations glitch between branches; choosing @State vs @Bindable vs plain property.
Run `npx skills add rshankras/claude-code-apple-skills --skill data-flow -a claude-code`. Or copy the skill folder (skills/swiftui/data-flow in rshankras/claude-code-apple-skills) into .claude/skills/data-flow in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rshankras/claude-code-apple-skills --skill data-flow -a codex`. Or copy the skill folder (skills/swiftui/data-flow in rshankras/claude-code-apple-skills) into .agents/skills/data-flow in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rshankras/claude-code-apple-skills --skill data-flow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/data-flow, .gemini/skills/data-flow, .github/skills/data-flow and .opencode/skills/data-flow in your project.
SKILL.md names no scripts, command-line tools or credentials: Data Flow is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep.
SKILL.md names 1 domain. As links in the text: developer.apple.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Data Flow is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Data Flow: Swiftui Pro (twostraws/SwiftUI-Agent-Skill, 5k stars), Swiftui UI Patterns (AFK-surf/OpenBridge, 430 stars), Swiftui Performance Audit (harperreed/dotfiles, 334 stars) and Hig Project Context (raintree-technology/hig-doctor, 142 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
rshankras (a GitHub user) maintains it in rshankras/claude-code-apple-skills, which has 781 GitHub stars. The repository holds 46 skills in this directory. The repository was last updated on July 24, 2026.
Source: rshankras/claude-code-apple-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.