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 troyjthomas/ios-agent-skills --skill swiftui-native-firstgit clone --depth 1 https://github.com/troyjthomas/ios-agent-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/troyjthomas/ios-agent-skills/swiftui-native-first)<a href="https://agentmods.dev/skills/troyjthomas/ios-agent-skills/swiftui-native-first"><img src="https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/swiftui-native-first/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/troyjthomas/ios-agent-skills/swiftui-native-first"><img src="https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/swiftui-native-first.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.00065 | $0.02451 |
| Opus 5 | $0.00032 | $0.01226 |
| Sonnet 5 | $0.00013 | $0.00490 |
| Haiku 4.5 | $0.00006 | $0.00245 |
Grade A, and why
swiftui-native-first 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 9d 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 — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI Native First
This is not a build phase. This is a philosophy that governs every phase. The rule is simple: if SwiftUI has a native component for it, use the native component. Period.
Why This Matters
Claude Code's default behavior is to build custom implementations. It will create a custom tab bar instead of using TabView. It will build a custom dropdown instead of using Menu. It will construct a hand-rolled list instead of using List. Every custom component is a liability: it won't animate correctly, it won't support Dynamic Type, it won't respect system appearance, and it won't feel like iOS.
Native components inherit all of this for free.
The Decision Framework
For every UI element Claude Code produces, apply this test:
1. Does SwiftUI have a built-in component for this? → Use it
2. Does SwiftUI have a modifier for this? → Use it
3. Can this be achieved with a combination of native components? → Do that
4. Is there truly no native way? → Build custom, but justify it
If the answer to question 4 is "yes," the custom component must be:
- Listed in CLAUDE.md under Custom Components
- Specced with all interaction states
- Built once, in its own file, in /Components
- Referenced by other screens, never rebuilt
Component Map
When you describe what you want, Claude Code should reach for these:
| You Describe | Claude Code Uses | NOT |
|---|---|---|
| "A list of items" | List or LazyVStack |
Custom ScrollView with VStack |
| "Tabs at the bottom" | TabView |
Custom HStack with buttons |
| "A button that opens options" | Menu |
Custom popover or action sheet |
| "A sliding toggle" | Toggle |
Custom switch view |
| "A selection from fixed options" | Picker |
Custom segmented control |
| "A text input field" | TextField / TextEditor |
Custom input component |
| "A date selection" | DatePicker |
Custom calendar |
| "A page that slides up" | .sheet modifier |
Custom modal presentation |
| "Long press options" | .contextMenu modifier |
Custom long-press gesture handler |
| "A toolbar button" | .toolbar modifier |
Custom top bar |
| "A search bar" | .searchable modifier |
Custom search field |
| "A pull to refresh" | .refreshable modifier |
Custom pull gesture |
| "A progress indicator" | ProgressView |
Custom loading spinner |
| "A popup alert" | .alert modifier |
Custom alert view |
| "A confirmation dialog" | .confirmationDialog |
Custom action sheet |
| "A navigation title" | .navigationTitle |
Custom header text |
| "A labeled value" | LabeledContent |
Custom HStack with spacer |
| "A grouped settings list" | Form or List with .insetGrouped |
Custom grouped VStack |
| "An image from SF Symbols" | Image(systemName:) |
Bundled icon assets |
| "A share button" | ShareLink |
Custom share implementation |
| "A color selection" | ColorPicker |
Custom color grid |
| "A stepper for numbers" | Stepper |
Custom plus/minus buttons |
| "A gauge or meter" | Gauge |
Custom progress bar |
| "A disclosure group" | DisclosureGroup |
Custom expandable section |
| "Content behind a paywall" | .subscriptionStoreView |
Custom purchase UI |
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.
- 9d ago First seen · 191 lines · 65 tokens per session scan A 405c21233fa3
swiftui-native-first is a skill published in the GitHub repository troyjthomas/ios-agent-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 65 tokens to every session and 2,451 once invoked, about $0.0003 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-31.
Other skills, from other repositories
ios-accessibility
Build and audit SwiftUI, UIKit, and AppKit accessibility for VoiceOver, Voice Control, Switch Control, Full Keyboard Access, Dynamic Type, focus restoration, labels/traits/actions, traversal, custom rotors, NSAccessibility, XCTest checks, adaptive system preferences, and App Store accessibility declarations. Use when…
pencilkit
Add Apple Pencil drawing with PKCanvasView, PKToolPicker, PKDrawing serialization/export, stroke inspection, and PencilKit/PaperKit handoffs. Use when building drawing apps, annotation features, handwriting capture, signature fields, content-version-safe ink workflows, or Apple Pencil-powered experiences on…
swiftui-liquid-glass
Implement, review, or improve SwiftUI Liquid Glass effects for iOS 26+. Covers glassEffect modifier, GlassEffectContainer, glass button styles, glass toolbar/tab bar, static status badges vs interactive controls, morphing transitions, tinting, interactive glass, ToolbarSpacer, scrollEdgeEffectStyle…
swiftui-design-principles
Design principles for building polished, native-feeling SwiftUI apps and widgets. Use this skill when creating or modifying SwiftUI views, iOS widgets (WidgetKit), or any native Apple UI. Ensures proper spacing, typography, colors, and widget implementations that look and feel like quality apps rather than…
swift-accessibility-skill
Apply platform accessibility best practices to SwiftUI, UIKit, and AppKit code. Essential companion to any SwiftUI, UIKit, or AppKit skill — always use together. Use whenever writing, editing, or reviewing ANY SwiftUI views, UIKit view controllers, AppKit views/window controllers, or platform UI — even when the user…
figma-to-swiftui
Translate Figma designs into production-ready SwiftUI code with 1:1 visual fidelity using the Figma MCP workflow. Trigger when the user provides Figma URLs or node IDs and wants iOS/SwiftUI implementation, asks to implement a design or component from Figma for an iOS app, or references Figma selections in the context…