Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add rshankras/claude-code-apple-skills --skill data-flowgit clone --depth 1 https://github.com/rshankras/claude-code-apple-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/data-flow)<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/data-flow"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/data-flow/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/data-flow"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/data-flow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00083 | $0.02005 |
| Opus 5.5 | $0.00033 | $0.00802 |
| Sonnet 5.5 | $0.00017 | $0.00401 |
| Haiku 4.5 | $0.00008 | $0.00200 |
Grade A, and why
data-flow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI Data Flow
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.
When This Skill Activates
- "@State resets when…" / state loses its value on a condition change
- Views re-render too often; animations crossfade when they should move
- Lists flashing, rows reordering wrongly,
ForEachmisbehaving - Choosing between
@State,@Binding,@Bindable,@Environment, plain property - Debugging with
Self._printChanges(); concurrency warnings in view code
Identity: the root concept
SwiftUI 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/elsecreates 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 forScrollViewReader.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.
Lifetime: state is tied to identity
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 145 lines · 83 tokens per session scan A f6f4a1e4b76d
data-flow is a skill published in the GitHub repository rshankras/claude-code-apple-skills (864 stars, last pushed 2d ago), licensed MIT. It adds 83 tokens to every session and 2,005 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-05.
data-flow compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| data-flowrshankras/claude-code-apple-skills | Skill | 864 | 2d ago | MIT | A | 83 | Claude Code |
| swift-expertpersonamanagmentlayer/pcl | Skill | 44 | 11d ago | Apache-2.0 | A | 76 | Claude Code |
| ios-expertpersonamanagmentlayer/pcl | Skill | 44 | 11d ago | Apache-2.0 | A | 64 | Claude Code |
| ios-swiftui-productJasonColapietro/ios-app-dev-skills | Skill | 9 | 2mo ago | MIT | A | 67 | Codex |
| swiftui-maxDev869/swift-tothemax | Skill | 7 | 4mo ago | MIT | A | 271 | Claude Code |
| apple-dev-conductorDev869/swift-tothemax | Skill | 7 | 4mo ago | MIT | A | 156 | Claude Code |
| kotlin-patternssoftspark/ai-toolkit | Skill | 179 | 10d ago | Apache-2.0 | A | 51 | Claude Code |