Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

swiftui-patterns

Skill by openai

Guides an AI assistant to build macOS SwiftUI scenes and components with desktop patterns. It covers windows, commands, toolbars, settings, split views, and inspectors. It is for developers building macOS apps with SwiftUI.

  • Score 81
  • 8.6k stars
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install swiftui-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-macos-apps/skills/swiftui-patterns ~/.claude/skills/swiftui-patterns

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install swiftui-patterns in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The swiftui-patterns skill guides an AI assistant when it builds macOS SwiftUI scenes and components. It covers windows, commands, toolbars, settings, split views, and inspectors, and it points to reference files for each area. It helps the assistant choose a scene model such as WindowGroup, Window, Settings, MenuBarExtra, or DocumentGroup, and choose where state should live.

For new app scaffolds, the skill asks the assistant to pick the scene model first, sketch file boundaries, and split code into App, Views, Models, Stores, Services, and Support folders. It also sets desktop rules, such as system-adaptive colors, short menu bar item labels, and flat native sidebar rows. When SwiftUI cannot express a required platform behavior cleanly, it suggests the appkit-interop skill. It is aimed at developers building macOS apps with SwiftUI.

Written from the project's SKILL.md and checked against it.

What it can do

  • Scene model selectionHelps choose between WindowGroup, Window, Settings, MenuBarExtra, and DocumentGroup for a macOS app.
  • Windowing guidanceExplains windowing patterns and window-opening, using references/windowing.md.
  • Commands and menusCovers command menus, keyboard shortcuts, focused values, and desktop action routing.
  • Settings scenesCovers dedicated settings windows, SettingsLink, and preference layouts.
  • Split views and inspectorsCovers sidebar-detail layouts, selection-driven layout, and inspector panes.
  • Menu bar extra structureDescribes menu bar extra structure and when it fits an app.
  • State ownership rulesMaps app-wide, scene-scoped, and view-local state to property wrappers like @State and @AppStorage.
  • New app file structureSets a folder layout for App, Views, Models, Stores, Services, and Support in new apps.

What you need

  • macOS
  • SwiftUI
  • git, for the new app scaffold setup
  • The appkit-interop skill, for AppKit-level behavior
  • The build-run-debug skill, for the run button bootstrap

Try asking

  • Set up a macOS SwiftUI app with a sidebar and detail split view
  • Add a settings scene to my macOS SwiftUI app
  • Which scene should my menu bar app use for its main window?

Good to know

  • Targets macOS SwiftUI apps only.
  • Some state patterns need macOS 14 or later, such as @Observable; older targets need a different pattern.
  • Scaffold steps assume a project-local script and environment file, following the build-run-debug skill.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: plugins/build-macos-apps/skills/swiftui-patterns/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to swiftui-patterns

All alternatives →
openclaw-github-repo-commandersickn33
94

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.

AAA Skill 50k
gradiogradio-app
94

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.

AAA Skill 44k
hig-components-menussickn33
94

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.

AAA Skill 50k
fastapi-templateswshobson
94

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.

AAA Skill 43k
appfunctionsandroid
94

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.

AAA Skill 11k
agent-qa-authoringsickn33
94

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.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

swiftui-patterns: common questions

Does this skill work for iOS SwiftUI apps?

The skill is written for macOS. It warns against porting touch-first iOS interaction models directly without desktop affordances.

When should I use WindowGroup instead of Window?

The skill says WindowGroup with an id fits the primary window that should appear at launch in apps with a MenuBarExtra. Window fits auxiliary or on-demand singleton windows.

What happens when SwiftUI cannot do a macOS behavior?

The skill recommends switching to the appkit-interop skill rather than forcing a fragile workaround in SwiftUI.

How do I install swiftui-patterns?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is swiftui-patterns free?

The code is public, but no licence file was found, so check the repository before commercial use.

Is swiftui-patterns safe to use?

It scores 81 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-patterns?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

swiftui-patterns Install

Add to stack

Loading.