swiftui-expert-skill
Skill by AvdLee
Guides AI assistants in writing, reviewing, and refactoring SwiftUI code for iOS or macOS. It covers state, layout, animation, performance, and Instruments trace recording and analysis.
Install swiftui-expert-skill
Built from the published package, never by AI.
git clone --depth 1 https://github.com/AvdLee/SwiftUI-Agent-Skill /tmp/SwiftUI-Agent-Skill && mkdir -p ~/.claude/skills && cp -r /tmp/SwiftUI-Agent-Skill/skills/swiftui-expert-skill ~/.claude/skills/swiftui-expert-skillRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/AvdLee/SwiftUI-Agent-Skill /tmp/SwiftUI-Agent-Skill && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/SwiftUI-Agent-Skill/skills/swiftui-expert-skill ~/.gemini/antigravity-cli/skills/swiftui-expert-skillAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install swiftui-expert-skill in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
SwiftUI Expert Skill is an agent skill defined in a SKILL.md file. It gives an AI assistant operating rules and a topic router that points to reference files for areas such as state management, view composition, layout, animation, lists, localization, Liquid Glass, and deprecated API lookup. It also includes a correctness checklist of hard rules that the assistant applies when checking code.
The skill has workflows for reviewing existing code, improving it, and implementing new features. It also includes Instruments support: a recording workflow that uses a bundled script and a trace analysis workflow that uses a second script. It is intended for developers who build SwiftUI apps for iOS or macOS and want the assistant to follow current SwiftUI practices.
Written from the project's SKILL.md and checked against it.
What it can do
- Code reviewReviews SwiftUI code, flags deprecated APIs, and checks version gating with #available.
- State and data flowCovers @State, @Observable, @Bindable, and environment patterns, including custom @Entry values.
- Layout and large displaysCovers resizable layouts, safe areas, two-column reflow, foldable grids, and iPhone Duo screens.
- AnimationProvides reference files for basic, transition, and advanced SwiftUI animations.
- Performance and listsGives performance patterns and list and ForEach guidance, presented as suggestions.
- Trace recordingRecords Instruments traces with a bundled script, using the SwiftUI or Time Profiler template.
- Trace analysisAnalyzes .trace files to find hitches, SwiftUI updates, and the causes of view invalidation.
- Document appsCovers Document and DocumentReader APIs for document-based apps.
- Localization and accessibilityProvides reference guidance for localization and accessibility patterns.
- Liquid GlassCovers Liquid Glass for iOS 26 and later, used only when the user asks for it.
What you need
- Python 3 to run the trace recording and analysis scripts
- Xcode with xctrace for Instruments trace recording
- A physical iOS, iPadOS, or macOS device for the SwiftUI trace template
Try asking
- Review this SwiftUI view for deprecated APIs and state management issues.
- Record an Instruments trace of my app running on a connected device.
- Refactor this view to use @Observable and fix its invalidation issues.
Good to know
- Liquid Glass is adopted only when the user explicitly requests it.
- On the iOS Simulator the SwiftUI trace template is empty, so Time Profiler is used instead.
- Soft-deprecated APIs are flagged and left in place during feature work unless the user asks to migrate.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/swiftui-expert-skill/SKILL.md, skills/swiftui-expert-skill/scripts/analyze_trace.py, skills/swiftui-expert-skill/scripts/instruments_parser/__init__.py, skills/swiftui-expert-skill/scripts/instruments_parser/causes.py, skills/swiftui-expert-skill/scripts/instruments_parser/correlate.py, skills/swiftui-expert-skill/scripts/instruments_parser/events.py, skills/swiftui-expert-skill/scripts/instruments_parser/hangs.py, skills/swiftui-expert-skill/scripts/instruments_parser/hitches.py, skills/swiftui-expert-skill/scripts/instruments_parser/summary.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md12 KB -
agents/openai.yaml228 B -
assets/logo-small.png29 KB -
assets/logo.png389 KB -
assets/logo.svg2 KB
Show all 51 files
-
references/accessibility-patterns.md6 KB -
references/animation-advanced.md11 KB -
references/animation-basics.md7 KB -
references/animation-transitions.md8 KB -
references/charts-accessibility.md6 KB -
references/charts.md17 KB -
references/document-apps.md11 KB -
references/environment-patterns.md7 KB -
references/focus-patterns.md9 KB -
references/image-optimization.md10 KB -
references/iphone-duo.md7 KB -
references/latest-apis.md29 KB -
references/layout-best-practices.md21 KB -
references/liquid-glass.md12 KB -
references/list-patterns.md21 KB -
references/localization.md10 KB -
references/macos-scenes.md10 KB -
references/macos-views.md11 KB -
references/macos-window-styling.md9 KB -
references/modifier-patterns.md2 KB -
references/performance-patterns.md12 KB -
references/previews.md8 KB -
references/scroll-patterns.md11 KB -
references/sheet-navigation-patterns.md15 KB -
references/soft-deprecation.md3 KB
And 21 more files on GitHub.
Alternatives to swiftui-expert-skill
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
swiftui-expert-skill: common questions
Does this skill enforce a specific app architecture?
No. It says it does not enforce architectures such as MVVM or VIPER, but it encourages separating business logic from views for testability.
Does it edit code automatically when analyzing a trace?
No. The trace analysis workflow only edits code when the user asks for edits.
Which target works with the SwiftUI Instruments template?
The SwiftUI template populates the SwiftUI lane on real iOS or iPadOS devices and the host Mac. The iOS Simulator is the exception, where Time Profiler is used.
How do I install swiftui-expert-skill?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is swiftui-expert-skill free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is swiftui-expert-skill safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to swiftui-expert-skill?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
