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 Xopoko/build-swift-apps --skill swiftui-view-architectgit clone --depth 1 https://github.com/Xopoko/build-swift-appsWrote 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/xopoko/build-swift-apps/swiftui-view-architect)<a href="https://agentmods.dev/skills/xopoko/build-swift-apps/swiftui-view-architect"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/swiftui-view-architect/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/xopoko/build-swift-apps/swiftui-view-architect"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/swiftui-view-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00036 | $0.00522 |
| Opus 5 | $0.00018 | $0.00261 |
| Sonnet 5 | $0.00007 | $0.00104 |
| Haiku 4.5 | $0.00004 | $0.00052 |
Grade A, and why
swiftui-view-architect 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 11d 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 — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI View Architect
Default to vanilla SwiftUI: local state in views, shared dependencies in environment/services, business logic outside view bodies, and view models only when requested or already present.
Ordering
Preserve stronger local conventions; otherwise order stored members top-to-bottom:
- environment
letinputs@State/other stored properties- non-view computed vars
initbody- view builders/helpers
- actions/async helpers
Rules
- Prefer MV over MVVM. Do not introduce a view model just to mirror local state or wrap environment dependencies.
- Split long bodies into dedicated
Viewtypes with explicit inputs/bindings/callbacks. Keep computedsome Viewhelpers small and rare. - Extract non-trivial button actions and side effects from
body; call private methods, and move real domain logic into services/models. - Keep a stable root view tree. Avoid top-level
if/elseswapping entire root branches; localize conditions in sections/modifiers/overlays/toolbars. - If a view model exists, prefer non-optional state initialized in
init:@State private var viewModel: SomeViewModel init(dependency: Dependency) { _viewModel = State(initialValue: SomeViewModel(dependency: dependency)) } - For
@Observableowners on iOS 17+, store as@Stateand pass explicitly. For iOS 16 or earlier, use@StateObjectowner and@ObservedObjectinjection. - Keep behavior/layout intact unless the user asked for a product change.
Workflow
- Reorder the view.
- Move inline actions/effects out of
body. - Extract meaningful sections into dedicated subviews; move reusable/independent subviews to files.
- Stabilize root structure.
- Normalize view model and Observation usage.
- Build/test the touched surface.
Large Views
For ~300+ line files, split aggressively into section views and small private helpers. // MARK: extensions can organize actions/helpers but are not a substitute for extracting real subviews.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 11d ago First seen · 53 lines · 36 tokens per session scan A 47a07ebbb087
swiftui-view-architect is a skill published in the GitHub repository Xopoko/build-swift-apps (45 stars, last pushed 13d ago), licensed MIT. It adds 36 tokens to every session and 522 once invoked, about $0.0002 per session on Opus 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-08-30.
Other skills, from other repositories
flutter-codestyle
Custom Instructions: Senior Flutter & Dart Engineer.
ios-agent-skill
Expert iOS/Swift developer behavior for AI coding agents. Use when writing, reviewing, or refactoring Swift, SwiftUI, UIKit, or SwiftData code; when designing iOS app architecture (MVVM, Clean Architecture, coordinators, routing); when building UI that must meet Apple's Human Interface Guidelines, contrast, dark-mode…
bootstrap-ios
Bootstrap agents for iOS, iPadOS, macOS, Swift, SwiftUI, SwiftData/Core Data, Swift Testing, Xcode build/test/debug, Simulator, App Intents, or XcodeBuildMCP work. Use before building, fixing, refactoring, QAing, or setting up Apple-platform repos, and when asked to load/install Ray's iOS skills or bootstrap iOS.
swiftui-skills
Apple-authored SwiftUI and platform guidance extracted from Xcode. Helps AI agents write idiomatic, Apple-native SwiftUI with reduced hallucinations.
ios-standards
Swift 6.0+ standards — strict concurrency, @MainActor isolation, @Observable (not ObservableObject), and modern SwiftUI architecture for iOS 26+. Use when writing or reviewing Swift code, structuring ViewModels and services, or resolving concurrency and isolation design questions. Trigger on "Swift 6", "strict…
uikit-expert
Write, review, or improve UIKit code following best practices for view controller lifecycle, Auto Layout, collection views, navigation, animation, memory management, and modern iOS 18–26 APIs. Use when building new UIKit features, refactoring existing views or view controllers, reviewing code quality, adopting modern…