Macos View Refactor
Refactor macOS SwiftUI views and scenes into stable structure. Use when splitting large views, tightening scene state, or narrowing AppKit escapes.
Install
npx skills add robinebers/skills --skill macos-view-refactorgit clone --depth 1 https://github.com/robinebers/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/macos-view-refactor ~/.claude/skills/macos-view-refactorPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# View Refactor ## Overview Refactor macOS views toward small, explicit, stable scene and view types. Default to native SwiftUI for layout, selection, commands, and settings. Reach for AppKit only at the narrow edges where desktop behavior truly requires it. ## Core Guidelines ### 1) Model scenes explicitly - Break the app into meaningful scene roots: main window, settings, utility windows, inspectors, or menu bar extras. - Do not let one giant root view silently own every desktop surface. ### 2) Keep a predictable file shape - Follow this ordering unless the file already has a stronger local convention: - Environment - `private`/`public` `let` - `@State` / other stored properties - computed `var` (non-view) - `init` - `body` - computed view builders / other view helpers - helper / async functions ### 2b) Split files by responsibility - For non-trivial apps, do not keep the full app, all views, models, stores, networking clients, process clients, and helpers in one Swift file. - Accept a single Swift file only for tiny throwaway examples or snippets: roughly under 50 lines, one screen, no persistence, no networking/process client, and no reusable models. - Use `App/<AppName>App.swift` for the `@main` app and `AppDelegate` only. - Keep `Views/ContentView.swift` focused on root layout and composition; move feature UI into files such as `Views/SidebarView.swift`, `Views/DetailView.swift`, and `Views/ComposerView.swift`.
Details
- Skill name
macos-view-refactor- Repository
- robinebers/skills
- Path
skills/macos-view-refactor/SKILL.md- Repo updated
- 25 June 2026
FAQ
What does the Macos View Refactor skill do?
Refactor macOS SwiftUI views and scenes into stable structure. Use when splitting large views, tightening scene state, or narrowing AppKit escapes.
How do I install the Macos View Refactor skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add robinebers/skills --skill macos-view-refactor. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Macos View Refactor popular?
It lives in robinebers/skills, which has 49 GitHub stars and 5 forks.
Related skills
Building Native UI
49robinebers/skills
Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.
Code Upgrade
49robinebers/skills
Engineering-discipline toolkit for non-technical users working with AI coders. Wields KISS, DRY, YAGNI, fail-fast, and idempotency as commands. Use when the user asks to audit, simplify, clean up, dedupe, or harden code; or says "make this simpler", "any duplicates?", "is this safe to run twice", "explain this app", "find dead code", "simplify the plan", or "find silent failures".
Expo API Routes
49robinebers/skills
Guidelines for creating API routes in Expo Router with EAS Hosting
Native Data Fetching
49robinebers/skills
Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (`useLoaderData`).
Macos Signing Entitlements
49robinebers/skills
Inspect macOS signing, entitlements, and Gatekeeper issues. Use when diagnosing code signing, sandbox, hardened runtime, or trust failures.
Use Dom
49robinebers/skills
Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.