macos-window-management-workflow

macos-window-management-workflow is a skill for Claude Code, Codex from gaelic-ghost/socket. It costs 54 tokens per session (608 once invoked), scanned A, original, Apache-2.0.

A workflow for designing and testing how macOS app windows behave in SwiftUI and AppKit. It covers window types, titles, toolbars, resizing, placement, restoration, and drag areas.

In plain words
What is it for?
Use it for main windows, document windows, settings, inspectors, utilities, transient activity windows, and windows shown on external displays.
Why use it?
It helps prevent confusing window behavior such as lost restoration state, unclear ownership, broken dragging, or inappropriate custom title bars.

Skill for Claude CodeCodex

Part of the apple-dev-skills plugin — 65 skills, 2 MCP servers shipped together

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.

agentmods
npx agentmods add skills/gaelic-ghost/socket/macos-window-management-workflow
Any agent
npx skills add gaelic-ghost/socket --skill macos-window-management-workflow
Clone the repo
git clone --depth 1 https://github.com/gaelic-ghost/socket

Made for: Claude Code, Codex.

Or install apple-dev-skills, the plugin that ships this one along with the rest of its 65 skills, 2 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-management-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/gaelic-ghost/socket/macos-window-management-workflow.svg)](https://agentmods.dev/skills/gaelic-ghost/socket/macos-window-management-workflow)
Your own site
<a href="https://agentmods.dev/skills/gaelic-ghost/socket/macos-window-management-workflow"><img src="https://agentmods.dev/badge/skills/gaelic-ghost/socket/macos-window-management-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 608 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00054 $0.00608
Opus 5 $0.00027 $0.00304
Sonnet 5 $0.00011 $0.00122
Haiku 4.5 $0.00005 $0.00061

Measured yesterday against content hash 8ffffa00f40b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

macos-window-management-workflow 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 yesterday.

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.

plugins/apple-dev-skills/skills/macos-window-management-workflow/SKILL.md · 35 lines

How it starts

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

macOS Window Management Workflow

Purpose

Own concrete macOS window behavior that sits below broad app architecture: scene selection, chrome, drag affordances, sizing, placement, restoration, utility windows, and validation. Keep application-wide ownership and AppKit controller architecture with swiftui-app-architecture-workflow and appkit-app-architecture-workflow.

Workflow

  1. Identify the window's job: main content, document, settings, inspector, utility, transient activity, or external display. Start from WindowGroup, Window, Settings, or DocumentGroup; do not start by hiding the title bar.
  2. Define the window's ownership and identity. Give independently openable windows stable scene values and user-facing titles so Window-menu, restoration, and focus behavior remain understandable.
  3. Choose the least-custom chrome. Prefer normal title bars and standard toolbars; use windowToolbarStyle, toolbarBackgroundVisibility, toolbarVisibility, or windowStyle only to support the window's job.
  4. If custom chrome removes a normal drag surface, add WindowDragGesture only in a region that does not steal content controls. Use allowsWindowActivationEvents(true) only when the window must activate and drag from the same gesture.
  5. Treat placement, resizing, and zoom as behavioral contracts. Use scene-level placement APIs only when the content has a real ideal size or position; do not force a fixed geometry that fights user resizing or display changes.
  6. Respect state restoration by default. Disable restoration only for a truly transient, expensive, or unsafe-to-reconstruct window, and explain what opens instead on relaunch.
  7. Escalate to AppKit only for an actual AppKit-owned requirement such as NSWindow behavior, panels, responder-chain menus, or a controller lifecycle that SwiftUI cannot represent cleanly.
  8. Validate on the oldest supported macOS plus the current target: launch, open another window, focus switching, resize/zoom, full screen, close/reopen, restoration, VoiceOver title, and Window-menu state.

Read the full file on GitHub · 35 lines

Files

What ships with it

3 files 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. yesterday First seen · 35 lines · 54 tokens per session scan A 8ffffa00f40b

Subscribe to this mod's changes

macos-window-management-workflow is a skill published in the GitHub repository gaelic-ghost/socket (7 stars, last pushed 9d ago), licensed Apache-2.0. It adds 54 tokens to every session and 608 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

design

Generates and maintains a design manifest for visual consistency. In existing projects, reads current styles and documents the design language. In new projects, asks a few questions and generates a starter manifest. The post-edit hook reads the manifest and flags deviations.

SethGammon/Citadel · 51 tokens

create-diagram

Create architecture diagrams from a local codebase or system description. Use when the user asks to diagram a repo, map system architecture, show component relationships, create drill-down views, or explain a system visually with tld.

Mertcikla/tld · 48 tokens

user-research

User research and insight synthesis for interviews, usability testing, personas, journey mapping, and actionable product/design recommendations. Use when planning studies, collecting evidence, synthesizing patterns, or converting findings into prioritized decisions.

rsmdt/the-startup · 45 tokens

frontend-patterns

Context enrichment for frontend UI development using shadcn/ui and Tailwind CSS. Use when building component libraries, implementing UI designs, theming, or working with accessible React components.

rsmdt/the-startup · 40 tokens

flutter-ui

Build Flutter UI from Figma MCP or image input. Scans src for design tokens (colors, sizes, text styles), existing components, and naming conventions before writing a single line of code. Never hard-codes values.

datit309/supergraph · 48 tokens

review

Visual Stack's primary tool. Build a UI wireframe and open it in an interactive review workspace where the user comments directly on the page, turning those comments into the next iteration — or point the same workspace at an app that is already running and review the real thing. Use when the user wants a wireframe…

Cavalry-Collective/visual-stack · 140 tokens