macos-window-architect

macos-window-architect is a skill for Claude Code, Codex from Xopoko/build-swift-apps. It costs 46 tokens per session (851 once invoked), scanned A, original, MIT.

A guide for designing macOS windows in SwiftUI, Apple's framework for describing app interfaces in Swift. It covers window roles such as main windows, inspectors, About windows, and media windows.

In plain words
What is it for?
Use it when creating or changing macOS window layouts, toolbars, drag regions, launch placement, resizing, minimization, restoration, or zoom behavior.
Why use it?
It helps keep window behavior consistent with macOS and prevents using lower-level AppKit code when SwiftUI already provides the needed setting. It also accounts for title bars, resizing, restoration, and placement.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the build-swift-apps plugin — 61 skills, 3 commands, 3 MCP servers shipped together

Good fit Use it when creating or changing macOS window layouts, toolbars, drag regions, launch placement, resizing, minimization, restoration, or zoom behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xopoko/build-swift-apps/macos-window-architect
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Xopoko/build-swift-apps --skill macos-window-architect
Clone the repo
git clone --depth 1 https://github.com/Xopoko/build-swift-apps

Made for: Claude Code, Codex.

Or install build-swift-apps, the plugin that ships this one along with the rest of its 61 skills, 3 commands, 3 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for macos-window-architect

README.md
[![agentmods](https://agentmods.dev/badge/skills/xopoko/build-swift-apps/macos-window-architect/github.svg)](https://agentmods.dev/skills/xopoko/build-swift-apps/macos-window-architect)
Your own site
<a href="https://agentmods.dev/skills/xopoko/build-swift-apps/macos-window-architect"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/macos-window-architect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for macos-window-architect

Your own site · 80×15
<a href="https://agentmods.dev/skills/xopoko/build-swift-apps/macos-window-architect"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/macos-window-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 851 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00851
Opus 5 $0.00023 $0.00426
Sonnet 5 $0.00009 $0.00170
Haiku 4.5 $0.00005 $0.00085

Measured 10d ago against content hash 769178d1990a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

macos-window-architect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/macos-window-architect/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

macOS Window Architect

Use SwiftUI scene/window modifiers first; switch to macos-appkit-bridge only when SwiftUI cannot express the behavior.

Workflow

  1. Classify the window role: main navigation, inspector/detail, About/support, media, welcome, or borderless custom surface.
  2. Adjust toolbar/title/background for that role.
  3. If toolbar chrome is hidden, add a reliable drag region.
  4. Set minimize, restoration, resize, launch, default placement, and ideal zoom behavior.
  5. Build/launch with macos-runtime-debugger.

Patterns

  • Hidden title but meaningful logical title:
    WindowGroup("Destination Video") {
      CatalogView()
        .toolbar(removing: .title)
        .toolbarBackgroundVisibility(.hidden, for: .windowToolbar)
    }
    
  • Utility/About material window:
    Window("About", id: "about") {
      AboutView()
        .toolbar(removing: .title)
        .toolbarBackgroundVisibility(.hidden, for: .windowToolbar)
        .containerBackground(.thickMaterial, for: .window)
    }
    .windowMinimizeBehavior(.disabled)
    .restorationBehavior(.disabled)
    
  • Placement from content/display:
    WindowGroup("Player", for: Video.self) { $video in
      PlayerView(video: video)
    }
    .defaultWindowPlacement { content, context in
      WindowPlacement(size: clampToDisplay(content.sizeThatFits(.unspecified),
                                           displayBounds: context.defaultDisplay.visibleRect))
    }
    .windowIdealPlacement { content, context in
      let size = zoomToFit(content.sizeThatFits(.unspecified),
                           displayBounds: context.defaultDisplay.visibleRect)
      return WindowPlacement(centeredPosition(for: size, in: context.defaultDisplay.visibleRect), size: size)
    }
    
  • Drag region after hidden toolbar:
    Color.clear
      .frame(height: 48)
      .contentShape(Rectangle())
      .gesture(WindowDragGesture())
      .allowsWindowActivationEvents(true)
    
  • Borderless/welcome:
    Window("Welcome", id: "welcome") { WelcomeView() }
      .windowStyle(.plain)
      .defaultLaunchBehavior(.presented)
    

Read the full file on GitHub · 87 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 87 lines · 46 tokens per session scan A 769178d1990a

Subscribe to this mod's changes

macos-window-architect is a skill published in the GitHub repository Xopoko/build-swift-apps (45 stars, last pushed 12d ago), licensed MIT. It adds 46 tokens to every session and 851 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Audit Apple-platform UI work against Human Interface Guidelines with HIG Doctor

Run a repeatable HIG compliance audit over app code before shipping UI changes, then use the findings to guide remediation.

agentskillexchange/skills · 38 tokens

apple-hig-feedback-status

Use when designing or implementing feedback, status, progress, alerts, errors, success states, and live activity indicators in Apple-platform apps — inline status, banners, alerts, notifications, and loading states.

aka-kika/akakika-skills · 46 tokens

apple-hig-sf-symbols

Use when choosing, reviewing, or implementing SF Symbols in an Apple-platform app — picking meaningful symbols, keeping the same concept on the same symbol everywhere, and handling variants, rendering modes, and accessibility.

aka-kika/akakika-skills · 48 tokens

apple-hig-toolbars

Use when designing, reviewing, or implementing Apple-platform toolbars — current-screen actions vs sidebar navigation, one primary action per screen, overflow menus, protected destructive actions, and keyboard shortcuts.

aka-kika/akakika-skills · 43 tokens

apple-hig-typography

Use when designing, reviewing, or implementing typography in Apple-platform apps — SwiftUI text styles, hierarchy, readable sizes, monospaced data, custom fonts, labels, captions, and accessibility.

aka-kika/akakika-skills · 46 tokens

mobile-rn-screen

Polish an existing React Native screen to feel intentional, native, and human-crafted. Use for "this screen looks off", "feels clunky on iOS", "Android version looks wrong", "jank when scrolling", "button is unreachable", or any RN-specific UX polish pass.

kensaurus/cursor-kenji · 64 tokens