macos-window-management

macos-window-management is a skill for Claude Code, Codex from robinebers/openusage. It costs 36 tokens per session (1,824 once invoked), scanned A, original, MIT.

A macOS development guide for controlling how SwiftUI app windows look and behave, including their title areas, size, position, restoration, and dragging.

In plain words
What is it for?
Use it when customizing main windows, utility panels, About screens, media players, welcome windows, or borderless surfaces in SwiftUI.
Why use it?
It helps avoid inconsistent or awkward window behavior when building a Mac app. It also clarifies when newer SwiftUI features require macOS 15 or when older systems need AppKit support.

Skill for Claude CodeCodex

About the project

robinebers/openusage is a native macOS menu-bar application that tracks usage of AI coding subscriptions, including limits, credits, and spending. Developers use it to monitor plans from services such as Claude, Codex, Cursor, and Copilot, while the catalogue entries support related workflows.

robinebers/openusage · 3,975 stars · on GitHub

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/robinebers/openusage/macos-window-management
Any agent
npx skills add robinebers/openusage --skill macos-window-management
Clone the repo
git clone --depth 1 https://github.com/robinebers/openusage

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/robinebers/openusage/macos-window-management.svg)](https://agentmods.dev/skills/robinebers/openusage/macos-window-management)
Your own site
<a href="https://agentmods.dev/skills/robinebers/openusage/macos-window-management"><img src="https://agentmods.dev/badge/skills/robinebers/openusage/macos-window-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,824 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.00036 $0.01824
Opus 5 $0.00018 $0.00912
Sonnet 5 $0.00007 $0.00365
Haiku 4.5 $0.00004 $0.00182

Measured 5d ago against content hash 548167ec90f8, 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 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 5d 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.agents/skills/macos-window-management/SKILL.md · 171 lines

How it starts

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

Window Management

Overview

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.

Workflow

  1. Inspect the relevant scene declaration and classify the window role: main app navigation, inspector/detail utility, About/support window, media playback window, welcome window, or a borderless custom surface.
  2. Adjust toolbar and title presentation to match the content.
  3. If the toolbar background or entire toolbar is hidden, make sure the window still has a usable drag region.
  4. Refine window behavior for that role: minimize availability, restoration, resize expectations, and whether the window should appear at launch.
  5. Set default placement for newly opened windows and ideal placement for zoom behavior when content and display size matter.
  6. Build and launch the app with macos-build-run-debug to verify the result in a real foreground .app bundle.
  7. If SwiftUI scene/window modifiers are not enough, switch to macos-appkit-interop for a narrow NSWindow bridge rather than spreading AppKit through the view tree.

Toolbar And Title

  • Use .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.
  • Use .toolbarBackgroundVisibility(.hidden, for: .windowToolbar) when large media or hero content should visually extend to the top edge of the window.
  • If the window still needs close/minimize/full-screen controls, remove only the title and toolbar background. If the toolbar should disappear entirely, use .toolbarVisibility(.hidden, for: .windowToolbar) instead.
  • Remove custom toolbar backgrounds and manually painted titlebar fills before layering new SwiftUI toolbar APIs on top.
  • Keep the window's logical title meaningful even if hidden; the system can still use it for accessibility and menu items. These are visual changes only.

Read the full file on GitHub · 171 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. 5d ago First seen · 171 lines · 36 tokens per session scan A 548167ec90f8

Subscribe to this mod's changes

macos-window-management is a skill published in the GitHub repository robinebers/openusage (3,975 stars, last pushed 2d ago), licensed MIT. It adds 36 tokens to every session and 1,824 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

create-video

Create videos from a text prompt using HeyGen's Video Agent. Use when: (1) Creating a video from a description or idea, (2) Generating explainer, demo, or marketing videos from a prompt, (3) Making a video without specifying exact avatars, voices, or scenes, (4) Quick video prototyping or drafts, (5) One-shot…

calesthio/OpenMontage · 103 tokens

figma-implement-design

Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Use when the user provides Figma URLs or node IDs and asks to implement designs or components that must match Figma specs. Requires a working…

tech-leads-club/agent-skills · 97 tokens

figma

Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Use when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting. Covers general Figma data fetching and exploration.…

tech-leads-club/agent-skills · 94 tokens

web-design-guidelines

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices". Focuses on visual design and interaction patterns. Do NOT use for performance audits (use core-web-vitals), SEO (use seo), or…

tech-leads-club/agent-skills · 82 tokens

figma-connect

Figma-to-code bridge combining Figma MCP server tools with the Code Connect CLI for end-to-end design implementation workflows. Use this skill when implementing UI components from Figma design URLs, publishing Code Connect mappings to Figma Dev Mode, extracting design tokens from Figma variables, setting up Figma Code…

anton-abyzov/vskill · 223 tokens

standards-kit

Unified development and design standards. Enforces code quality (complexity < 8), strict naming conventions, and the mandatory use of approved UI component libraries.

wednesday-solutions/ai-agent-skills · 35 tokens