AvdLee/SwiftUI-Agent-Skill is a portable set of expert guidance for AI coding tools that work with SwiftUI, Apple’s framework for building app interfaces. It helps teams and developers review, refactor, and write SwiftUI code involving state, view structure, performance, and newer visual APIs. The catalogue entries provide the skill and plugin instructions that agents use to apply this guidance.
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 AvdLee/SwiftUI-Agent-Skill --skill swiftui-expert-skillgit clone --depth 1 https://github.com/AvdLee/SwiftUI-Agent-SkillWrote 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/avdlee/swiftui-agent-skill/swiftui-expert-skill)<a href="https://agentmods.dev/skills/avdlee/swiftui-agent-skill/swiftui-expert-skill"><img src="https://agentmods.dev/badge/skills/avdlee/swiftui-agent-skill/swiftui-expert-skill/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/avdlee/swiftui-agent-skill/swiftui-expert-skill"><img src="https://agentmods.dev/badge/skills/avdlee/swiftui-agent-skill/swiftui-expert-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- 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.00092 | $0.02894 |
| Opus 5 | $0.00046 | $0.01447 |
| Sonnet 5 | $0.00018 | $0.00579 |
| Haiku 4.5 | $0.00009 | $0.00289 |
Grade A, and why
swiftui-expert-skill 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.
Copies of this mod
5 near-identical copies found in the catalogue:
- swiftui-expert-skill — 100% identical, 4 lines differ
- swiftui-expert-skill — 98% identical, 20 lines differ
- swiftui-expert-skill — 97% identical, 19 lines differ
- swiftui-expert-skill — 97% identical, 19 lines differ
- swiftui-expert-skill — 94% identical, 2 lines differ
How it starts
The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI Expert Skill
Operating Rules
- Consult
references/latest-apis.mdat the start of every task to avoid deprecated APIs - Prefer native SwiftUI APIs over UIKit/AppKit bridging unless bridging is necessary
- Focus on correctness and performance; do not enforce specific architectures (MVVM, VIPER, etc.)
- Encourage separating business logic from views for testability without mandating how
- Follow Apple's Human Interface Guidelines and API design patterns
- Only adopt Liquid Glass when explicitly requested by the user (see
references/liquid-glass.md) - Present performance optimizations as suggestions, not requirements
- Use
#availablegating with sensible fallbacks for version-specific APIs
Task Workflow
Review existing SwiftUI code
- Read the code under review and identify which topics apply
- Flag deprecated APIs (compare against
references/latest-apis.md) - Run the Topic Router below for each relevant topic
- Validate
#availablegating and fallback paths for iOS 26+ features
Improve existing SwiftUI code
- Audit current implementation against the Topic Router topics
- Replace deprecated APIs with modern equivalents from
references/latest-apis.md - Refactor hot paths to reduce unnecessary state updates
- Extract complex view bodies into separate subviews
- Suggest image downsampling when
UIImage(data:)is encountered (optional optimization, seereferences/image-optimization.md)
Implement new SwiftUI feature
- Design data flow first: identify owned vs injected state
- Structure views for optimal diffing (extract subviews early)
- Apply correct animation patterns (implicit vs explicit, transitions)
- Use
Buttonfor all tappable elements; add accessibility grouping and labels - Gate version-specific APIs with
#availableand provide fallbacks
Record a new Instruments trace
Trigger when the user asks to "record a trace", "profile the app", "capture a session", etc. Full reference: references/trace-recording.md.
- Confirm target — attach to a running app, launch an app, or record all processes? If the user didn't say, ask. List connected devices when useful:
python3 "${SKILL_DIR}/scripts/record_trace.py" --list-devices - Pick a template based on target kind — the
SwiftUItemplate populates the SwiftUI lane on any real device: a physical iOS/iPadOS device or the host Mac. The only exception is the iOS Simulator, where the SwiftUI lane comes back empty — switch to--template "Time Profiler"in that case (still gives Time Profiler + Hangs + Animation Hitches). Always check--list-devices:simulatorskind →Time Profiler;deviceskind (real devices and the host Mac) → defaultSwiftUI. Full decision table inreferences/trace-recording.md. - Start the recording. For agent-driven sessions where the user says "I'll tell you when I'm done", start in the background and use a stop-file:
For interactive sessions, just tell the user to press Ctrl+C when done.python3 "${SKILL_DIR}/scripts/record_trace.py" \ --device "<name|udid>" --attach "<AppName>" \ --stop-file /tmp/stop-trace --output ~/Desktop/session.trace - Signal stop — when the user says they've finished exercising the app,
touch /tmp/stop-trace. The script cleanly SIGINTs xctrace and waits up to 60s for finalisation. - Analyse the resulting trace (flow into the "Trace-driven improvement" workflow below).
What ships with it
43 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.
- agents/openai.yaml 249 B
- assets/logo-small.png 29 KB
- assets/logo.png 389 KB
- assets/logo.svg 2.0 KB
- references/accessibility-patterns.md 5.9 KB
- references/animation-advanced.md 11 KB
- references/animation-basics.md 6.7 KB
- references/animation-transitions.md 7.4 KB
- references/charts-accessibility.md 6.1 KB
- references/charts.md 17 KB
- references/focus-patterns.md 8.7 KB
- references/image-optimization.md 7.2 KB
- references/latest-apis.md 18 KB
- references/layout-best-practices.md 6.8 KB
- references/liquid-glass.md 12 KB
- references/list-patterns.md 15 KB
- references/localization.md 9.7 KB
- references/macos-scenes.md 9.1 KB
- references/macos-views.md 11 KB
- references/macos-window-styling.md 8.6 KB
- references/performance-patterns.md 13 KB
- references/previews.md 8.1 KB
- references/scroll-patterns.md 11 KB
- references/sheet-navigation-patterns.md 11 KB
- references/soft-deprecation.md 2.9 KB
- references/state-management.md 21 KB
- references/text-patterns.md 1.4 KB
- references/trace-analysis.md 14 KB
- references/trace-recording.md 5.8 KB
- references/view-structure.md 29 KB
- scripts/analyze_trace.py 9.9 KB runs code
- scripts/instruments_parser/__init__.py 69 B runs code
- scripts/instruments_parser/causes.py 5.9 KB runs code
- scripts/instruments_parser/correlate.py 6.2 KB runs code
- scripts/instruments_parser/events.py 11 KB runs code
- scripts/instruments_parser/hangs.py 3.4 KB runs code
- scripts/instruments_parser/hitches.py 4.5 KB runs code
- scripts/instruments_parser/summary.py 9.1 KB runs code
- scripts/instruments_parser/swiftui.py 6.6 KB runs code
- scripts/instruments_parser/time_profiler.py 4.3 KB runs code
- scripts/instruments_parser/xctrace.py 3.5 KB runs code
- scripts/instruments_parser/xml_utils.py 7.4 KB runs code
- scripts/record_trace.py 11 KB runs code
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 · 172 lines · 92 tokens per session scan A 9fe4bb06a2b1
swiftui-expert-skill is a skill published in the GitHub repository AvdLee/SwiftUI-Agent-Skill (3,503 stars, last pushed 27d ago), licensed MIT. It adds 92 tokens to every session and 2,894 once invoked, about $0.0005 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
animate-expo
Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and…
leanback-to-compose-tv-migration
Provides instructions and architectural patterns for migrating Android TV applications from legacy Leanback UI Toolkit, Android Views, or Support Fragments to Jetpack Compose for TV (androidx.tv). Use this skill for Leanback to Compose migrations, including browse screen, settings screen, authentication screen, login…
maui-data-binding
Guidance for .NET MAUI XAML and C# data bindings — compiled bindings, INotifyPropertyChanged / ObservableObject, value converters, binding modes, multi-binding, relative bindings, fallbacks, and MVVM best practices. USE FOR: setting up compiled bindings with x:DataType, implementing INotifyPropertyChanged or…
migrate-xml-views-to-jetpack-compose
Provides a structured workflow for migrating an Android XML View to Jetpack Compose. This skill details the step-by-step process, from planning and dependency setup, to theming and layout migration, validation and XML cleanup. Use this skill when you need to migrate an XML View to Jetpack Compose in an Android…
web-haptics
Add haptic feedback to web apps using the web-haptics library. Use when building mobile-facing UIs that need tactile feedback on buttons, toggles, forms, pickers, and other interactive elements.
axiom-swiftui
Use when building, fixing, or improving ANY SwiftUI UI — views, navigation, layout, animations, performance, architecture, gestures, debugging, iOS 26 features.