plugins/build-macos-apps/skills/window-management/SKILL.md
Customize macOS SwiftUI windows and scene behavior. Use when tuning window chrome, drag regions, placement, restoration, launch behavior, or borderless windows.
npx skillsauth add openai/plugins window-managementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to tailor each SwiftUI window to its job. Start by identifying
which scene owns the window (Window, WindowGroup, or a dedicated utility
scene), then customize the toolbar/title area, background material, resize and
restoration behavior, and initial or zoomed placement.
Prefer scene and window modifiers over ad hoc AppKit bridges when SwiftUI offers the behavior directly. Keep each window purpose-built: a main browser window, an About window, and a media player window usually want different chrome, resizability, restoration, and placement rules.
These APIs are macOS 15+ SwiftUI window/scene customizations. For older deployment targets, expect to use more AppKit bridging or availability guards.
build-run-debug to verify the result in
a real foreground .app bundle.appkit-interop
for a narrow NSWindow bridge rather than spreading AppKit through the view
tree..toolbar(removing: .title) when the window title should stay associated
with the window for accessibility and menus, but not be visibly drawn in the
title bar..toolbarBackgroundVisibility(.hidden, for: .windowToolbar) when large
media or hero content should visually extend to the top edge of the window..toolbarVisibility(.hidden, for: .windowToolbar) instead.WindowDragGesture() to extend the draggable area into your content..allowsWindowActivationEvents(true) so clicking
and immediately dragging a background window still activates and moves it..containerBackground(.thickMaterial, for: .window) when a utility window
or About window should replace the default window background with a subtle
frosted material..windowMinimizeBehavior(.disabled) for always-reachable utility windows
such as a custom About window where minimizing adds little value..restorationBehavior(.disabled) for windows that should not reopen on
next launch, such as About panels, transient support/info windows, or
first-run welcome surfaces.restorationBehavior(...) only when a specific window should
intentionally opt into or out of that system behavior..defaultLaunchBehavior(.presented) for windows that should appear first
on launch, such as a welcome window, and choose that behavior intentionally
rather than relying on side effects from scene creation order..defaultWindowPlacement { content, context in ... } to control the
initial size and optional position of newly opened windows.content.sizeThatFits(.unspecified) to get
the content's ideal size.context.defaultDisplay.visibleRect to get the display's usable region
after accounting for the menu bar and Dock.WindowPlacement(size: size) with a size clamped to the visible rect
when media or document content may be larger than the display. If no position
is provided, the window is centered by default..windowIdealPlacement { content, context in ... } to control what
happens when the user chooses Zoom from the Window menu or Option-clicks the
green toolbar button. For media windows, preserve aspect ratio and grow to the
largest size that fits the display..windowStyle(.plain) for borderless or highly custom chrome windows, but
make sure the content still provides a clear drag/move affordance and visible
context.For concrete window modifier examples, read references/api-snippets.md.
content.sizeThatFits(.unspecified) and
context.defaultDisplay.visibleRect when content/display size matters..toolbar(removing: .title) just to hide a title you forgot to set.
Keep the underlying window title meaningful.NSWindow mutation before checking whether
.windowMinimizeBehavior, .restorationBehavior, .defaultWindowPlacement,
.windowIdealPlacement, .windowStyle, or .defaultLaunchBehavior already
solve the problem.swiftui-patterns for broader scene, commands, settings, sidebar,
and inspector architecture.liquid-glass when the main question is modern macOS visual treatment,
Liquid Glass, or system material adoption.appkit-interop if a custom window behavior truly requires NSWindow,
NSPanel, or responder-chain control.build-run-debug to launch and verify the resulting windows.tools
Top-level workflow skill for USD performance diagnosis and optimization. Use for slow loading, high memory, low FPS, or 'optimize my scene' requests; delegates auth/runtime setup to Phase 0 owners.
data-ai
Use when the user mentions MagicPath, designs, UI components, themes, canvas selections, or repo-to-canvas UI work; run magicpath-ai to search, inspect, install, or author components.
documentation
Use as the top-level router for Omniverse Realtime Viewer USD app requests and focused viewer reference documents.
tools
Turn Notion specs into implementation plans, tasks, and progress tracking; use when implementing PRDs/feature specs and creating Notion plans + tasks from them.