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 agentmods add skills/dagba/ios-mcp/swiftui-ui-patternsnpx skills add dagba/ios-mcp --skill swiftui-ui-patternsgit clone --depth 1 https://github.com/dagba/ios-mcpWrote 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/dagba/ios-mcp/swiftui-ui-patterns)<a href="https://agentmods.dev/skills/dagba/ios-mcp/swiftui-ui-patterns"><img src="https://agentmods.dev/badge/skills/dagba/ios-mcp/swiftui-ui-patterns.svg" alt="Measured on agentmods" 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.00048 | $0.00895 |
| Opus 5 | $0.00024 | $0.00447 |
| Sonnet 5 | $0.00010 | $0.00179 |
| Haiku 4.5 | $0.00005 | $0.00089 |
Grade A, and why
swiftui-ui-patterns 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 5d 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.
This is a copy
86% identical to swiftui-ui-patterns — 11 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI UI Patterns
Quick start
Choose a track based on your goal:
Existing project
- Identify the feature or screen and the primary interaction model (list, detail, editor, settings, tabbed).
- Find a nearby example in the repo with
rg "TabView\("or similar, then read the closest SwiftUI view. - Apply local conventions: prefer SwiftUI-native state, keep state local when possible, and use environment injection for shared dependencies.
- Choose the relevant component reference from
references/components-index.mdand follow its guidance. - Build the view with small, focused subviews and SwiftUI-native data flow.
New project scaffolding
- Start with
references/app-scaffolding-wiring.mdto wire TabView + NavigationStack + sheets. - Add a minimal
AppTabandRouterPathbased on the provided skeletons. - Choose the next component reference based on the UI you need first (TabView, NavigationStack, Sheets).
- Expand the route and sheet enums as new screens are added.
General rules to follow
- Use modern SwiftUI state (
@State,@Binding,@Observable,@Environment) and avoid unnecessary view models. - Prefer composition; keep views small and focused.
- Use async/await with
.taskand explicit loading/error states. - Maintain existing legacy patterns only when editing legacy files.
- Follow the project's formatter and style guide.
- Sheets: Prefer
.sheet(item:)over.sheet(isPresented:)when state represents a selected model. Avoidif letinside a sheet body. Sheets should own their actions and calldismiss()internally instead of forwardingonCancel/onConfirmclosures.
Workflow for a new SwiftUI view
- Define the view's state and its ownership location.
- Identify dependencies to inject via
@Environment. - Sketch the view hierarchy and extract repeated parts into subviews.
- Implement async loading with
.taskand explicit state enum if needed. - Add accessibility labels or identifiers when the UI is interactive.
- Validate with a build and update usage callsites if needed.
What ships with it
30 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.
- references/app-wiring.md 5.9 KB
- references/components-index.md 3.5 KB
- references/controls.md 1.6 KB
- references/deeplinks.md 1.7 KB
- references/focus.md 2.3 KB
- references/form.md 3.0 KB
- references/grids.md 1.8 KB
- references/haptics.md 2.0 KB
- references/input-toolbar.md 1.4 KB
- references/lightweight-clients.md 2.5 KB
- references/list.md 2.7 KB
- references/loading-placeholders.md 1.2 KB
- references/macos-settings.md 2.0 KB
- references/matched-transitions.md 1.6 KB
- references/media.md 2.0 KB
- references/menu-bar.md 2.2 KB
- references/navigationstack.md 4.2 KB
- references/overlay.md 1.2 KB
- references/scrollview.md 2.3 KB
- references/searchable.md 1.7 KB
- references/sheets.md 3.1 KB
- references/split-views.md 2.0 KB
- references/SwiftUI-AlarmKit-Integration.md 23 KB
- references/SwiftUI-New-Toolbar-Features.md 6.5 KB
- references/SwiftUI-Styled-Text-Editing.md 11 KB
- references/SwiftUI-WebKit-Integration.md 12 KB
- references/tabview.md 3.4 KB
- references/theming.md 1.7 KB
- references/title-menus.md 2.1 KB
- references/top-bar.md 1.3 KB
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.
- 5d ago First seen · 107 lines · 48 tokens per session scan A be62958b6762
swiftui-ui-patterns is a skill published in the GitHub repository dagba/ios-mcp (3 stars, last pushed 7mo ago), licensed MIT. It adds 48 tokens to every session and 895 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to swiftui-ui-patterns, differing in 11 lines, and is treated as a copy.
Other skills, from other repositories
orca-emulator-android
Control an Android emulator / device from inside Orca using the orca CLI. Use for listing/booting AVDs, taps, swipes, typing, hardware buttons (incl. Back and Recents), rotation, app install/launch, runtime permissions, the accessibility tree, and logcat — driving a real adb-connected device or emulator.…
android-tombstone-symbolication
Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app…
dogfood
Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.
winapp-maui
Package and sign .NET MAUI Windows apps with winapp, resolving the resizetizer manifest dependency. Use when packaging or signing a .NET MAUI Windows app, building a MAUI MSIX or signed unpackaged build in CI, or fixing 'manifest contains unresolved placeholders ($placeholder$)' errors from winapp package.
apple-search-ads
When the user wants to set up, optimize, or scale Apple Search Ads (ASA) campaigns — including keyword bidding, match types, campaign structure, Creative Product Sets, CPP routing, and ROAS optimization. Use when the user mentions "Apple Search Ads", "ASA", "Search Ads", "Search tab ads", "Today tab ads", "CPT"…
android-pentest
安卓应用渗透测试 — APK分析、Hook、自动化测试、运行态驱动、签名恢复、抓包分析.