swiftui-ui-patterns
Skill by openai
Build and refactor SwiftUI interfaces with component patterns and examples. The skill covers navigation, state, layouts, controls and screen composition for developers working on SwiftUI apps.
Install swiftui-ui-patterns
Built from the published package, never by AI.
git clone --depth 1 https://github.com/openai/plugins /tmp/plugins && mkdir -p ~/.claude/skills && cp -r /tmp/plugins/plugins/build-ios-apps/skills/swiftui-ui-patterns ~/.claude/skills/swiftui-ui-patternsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/openai/plugins /tmp/plugins && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/plugins/plugins/build-ios-apps/skills/swiftui-ui-patterns ~/.gemini/antigravity-cli/skills/swiftui-ui-patternsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install swiftui-ui-patterns in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
The swiftui-ui-patterns skill helps an AI assistant build and refactor SwiftUI interfaces. It covers navigation, state, layouts, controls and screen composition. It points to reference files for NavigationStack, sheets, deep links, async state, previews and performance. For new projects, it starts from an app wiring reference that sets up TabView, NavigationStack and sheets.
The skill sets working rules. It prefers modern SwiftUI state, uses .sheet(item:) when state represents a selected model, and asks sheets to call dismiss() internally. It asks the assistant to state the minimum OS for each pattern and to check for compiler errors before moving on. It is aimed at developers who want small, focused SwiftUI views.
Written from the project's SKILL.md and checked against it.
What it can do
- State ownership guidanceChooses the narrowest state tool, such as @State, @Binding, @Observable or @Environment, for a given scenario.
- Navigation and sheetsCovers NavigationStack ownership, per-tab history, enum routing and enum-driven sheet presentation.
- App wiringSets up the root dependency graph with TabView, NavigationStack and sheets for new projects.
- Async loadingUses .task and .task(id:) with explicit loading and error states, plus cancellation and debouncing guidance.
- Scroll-driven revealsDerives a normalized progress value from scroll offset to drive visual state.
- PreviewsCovers #Preview setup, fixtures and mock environments for isolated previews.
- Performance reviewChecks stable identity, observation scope and lazy container use for large or frequently updated screens.
- Deep linksExplains URL handling and routing external links into app destinations.
What you need
- A SwiftUI project to work in
- Access to web search for current Apple Developer documentation
Try asking
- Refactor this SwiftUI screen to use a NavigationStack with enum routing.
- Replace my isPresented sheets with a single sheet(item:) pattern.
- Review this view for stable identity and avoidable re-renders.
Good to know
- Observation API patterns require iOS 17 or later; iOS 16 and earlier use ObservableObject instead.
- Legacy patterns should only be kept when editing legacy files.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/build-ios-apps/skills/swiftui-ui-patterns/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB -
agents/openai.yaml221 B -
references/app-wiring.md6 KB -
references/async-state.md3 KB -
references/components-index.md4 KB
Show all 32 files
-
references/controls.md2 KB -
references/deeplinks.md2 KB -
references/focus.md2 KB -
references/form.md3 KB -
references/grids.md2 KB -
references/haptics.md2 KB -
references/input-toolbar.md1 KB -
references/lightweight-clients.md2 KB -
references/list.md3 KB -
references/loading-placeholders.md1 KB -
references/macos-settings.md2 KB -
references/matched-transitions.md2 KB -
references/media.md2 KB -
references/menu-bar.md2 KB -
references/navigationstack.md4 KB -
references/overlay.md1 KB -
references/performance.md2 KB -
references/previews.md2 KB -
references/scroll-reveal.md5 KB -
references/scrollview.md2 KB -
references/searchable.md2 KB -
references/sheets.md4 KB -
references/split-views.md2 KB -
references/tabview.md3 KB -
references/theming.md2 KB
And 2 more files on GitHub.
Alternatives to swiftui-ui-patterns
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-ui-patterns: common questions
What is the swiftui-ui-patterns skill for?
It helps an AI assistant build and refactor SwiftUI views, covering navigation, state, layouts, controls and screen composition.
Does it support older iOS versions?
Yes. The source says that when the deployment target is iOS 16 or earlier, the skill falls back to ObservableObject, @StateObject, @ObservedObject and @EnvironmentObject.
How does it handle sheets?
The source says to prefer .sheet(item:) when state represents a selected model, avoid if let inside a sheet body, and have sheets call dismiss() internally.
How do I install swiftui-ui-patterns?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is swiftui-ui-patterns free?
The code is public, but no licence file was found, so check the repository before commercial use.
Is swiftui-ui-patterns safe to use?
It scores 87 of 100. Grades: maintenance A, licence F, 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-ui-patterns?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
