swiftui-patterns

Installation
SKILL.md

SwiftUI Patterns

Quick Start

Choose a track based on your goal:

Existing project

  • Identify the feature or scene and the primary interaction model: document, editor, sidebar-detail, utility window, settings, or menu bar extra.
  • Read the nearest existing scene or root view before inventing a new desktop structure.
  • Choose the relevant reference from references/components-index.md.
  • If SwiftUI cannot express the required platform behavior cleanly, use the appkit-interop skill rather than forcing a shaky workaround.

New app scaffolding

  • Choose the scene model first: WindowGroup, Window, Settings, MenuBarExtra, or DocumentGroup.
  • If the app combines a normal main window and a MenuBarExtra, use WindowGroup(..., id:) for the primary window when it should appear at launch. Treat Window(...) as a better fit for auxiliary/on-demand singleton windows; in menu-bar-heavy apps, a Window(...) scene may not present the main window automatically at launch.
  • Before creating the scaffold, check whether the workspace is already inside a git repo with git rev-parse --is-inside-work-tree. If not, run git init at the project root so Codex app git-backed features are available from the start. Do not initialize a nested repo inside an existing parent checkout.
  • For a new app scaffold, also create one project-local script/build_and_run.sh and .codex/environments/environment.toml so the Codex app Run button works immediately. Use the exact bootstrap contract from build-run-debug and its references/run-button-bootstrap.md file rather than inventing a second variant here.
Related skills

More from openai/plugins

Installs
3
Repository
openai/plugins
GitHub Stars
1.1K
First Seen
Apr 10, 2026