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.
npx skills add Xopoko/build-swift-apps --skill macos-view-architectgit clone --depth 1 https://github.com/Xopoko/build-swift-appsWrote 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.
[](https://agentmods.dev/skills/xopoko/build-swift-apps/macos-view-architect)<a href="https://agentmods.dev/skills/xopoko/build-swift-apps/macos-view-architect"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/macos-view-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.
<a href="https://agentmods.dev/skills/xopoko/build-swift-apps/macos-view-architect"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/macos-view-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.00544 |
| Opus 5 | $0.00019 | $0.00272 |
| Sonnet 5 | $0.00008 | $0.00109 |
| Haiku 4.5 | $0.00004 | $0.00054 |
Grade A, and why
macos-view-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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
macOS View Architect
Refactor macOS SwiftUI toward explicit scene structure and focused files. Use macos-swiftui-architect for missing desktop patterns and macos-appkit-bridge for true AppKit boundaries.
Rules
- Model scenes explicitly: main window, settings, utility windows, inspectors, menu bar extras.
- Keep predictable order unless local style is stronger: environment, inputs, state, non-view computed vars, init, body, view helpers, actions.
- Split responsibilities:
App/<AppName>App.swift:@mainapp and minimal delegate only.Views/*: root composition and feature UI.Models/*: values, IDs, selection enums.Stores/*: state stores.Services/*: network, app-server, process clients.Support/*: small formatters/resolvers/extensions.
- Accept one-file apps only for tiny throwaway snippets: ~50 lines, one screen, no persistence/network/process client/reusable models.
- Prefer dedicated subview types over many computed
some Viewfragments; pass explicit data, bindings, and actions. - Keep root layout stable around selection/scenes/commands; avoid top-level branch swaps.
- Extract non-trivial actions, command routing, and toolbar behavior from
body. - Use
@SceneStoragefor per-window ephemeral state and@AppStoragefor durable preferences. - Keep AppKit bridges isolated behind small wrappers/helpers.
- For modern
@Observableowners, use@State; on older targets use@StateObject/@ObservedObject.
Workflow
- Identify scene boundary and whether the file owns too many responsibilities.
- Reorder top-to-bottom.
- Extract sidebar rows, detail panels, inspectors, toolbar content, and utility surfaces into subviews/files.
- Stabilize selection/layout.
- Move action/command/toolbar logic into named helpers or types.
- Narrow AppKit edges.
- Build after each major split and keep behavior intact unless requested.
Smells
- One root view owns window scaffolding, settings, toolbar, commands, service clients, and detail layout.
- iOS push navigation forced into a Mac sidebar-detail problem.
- Several booleans for mutually exclusive inspectors/sheets/windows.
- AppKit objects passed through unrelated SwiftUI layers.
- Large computed view fragments replacing real subviews.
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.
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.
- 11d ago First seen · 46 lines · 38 tokens per session scan A 28bc0bd94b45
macos-view-architect is a skill published in the GitHub repository Xopoko/build-swift-apps (45 stars, last pushed 14d ago), licensed MIT. It adds 38 tokens to every session and 544 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.
Other skills, from other repositories
flutter-codestyle
Custom Instructions: Senior Flutter & Dart Engineer.
ios-agent-skill
Expert iOS/Swift developer behavior for AI coding agents. Use when writing, reviewing, or refactoring Swift, SwiftUI, UIKit, or SwiftData code; when designing iOS app architecture (MVVM, Clean Architecture, coordinators, routing); when building UI that must meet Apple's Human Interface Guidelines, contrast, dark-mode…
bootstrap-ios
Bootstrap agents for iOS, iPadOS, macOS, Swift, SwiftUI, SwiftData/Core Data, Swift Testing, Xcode build/test/debug, Simulator, App Intents, or XcodeBuildMCP work. Use before building, fixing, refactoring, QAing, or setting up Apple-platform repos, and when asked to load/install Ray's iOS skills or bootstrap iOS.
macos-menubar-swiftui
Use when building, refactoring, or debugging a macOS menu bar app with SwiftUI, or when a MenuBarExtra misbehaves — the icon renders wrong or vanishes, the Settings window opens behind other apps, the popover cannot be closed, controls inside a .menu style do not render, the Dock icon comes back, or the app quits when…
swiftui-skills
Apple-authored SwiftUI and platform guidance extracted from Xcode. Helps AI agents write idiomatic, Apple-native SwiftUI with reduced hallucinations.
swift6-concurrency
Handle Swift 6 concurrency patterns. Use when encountering Sendable warnings, data race errors, MainActor isolation issues, or framework interop problems (EventKit, Speech, AVFoundation, etc.). Trigger on "Swift 6 error", "Sendable", "data race", "MainActor", "concurrency warning", or "strict concurrency".