一键导入
view-refactor
Refactor macOS SwiftUI views and scenes into stable structure. Use when splitting large views, tightening scene state, or narrowing AppKit escapes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Refactor macOS SwiftUI views and scenes into stable structure. Use when splitting large views, tightening scene state, or narrowing AppKit escapes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | view-refactor |
| description | Refactor macOS SwiftUI views and scenes into stable structure. Use when splitting large views, tightening scene state, or narrowing AppKit escapes. |
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.
private/public let@State / other stored propertiesvar (non-view)initbodyApp/<AppName>App.swift for the @main app and AppDelegate only.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.Models/*.swift, stores into Stores/*.swift, app-server/network/process clients into Services/*.swift, and small formatters/resolvers/extensions into Support/*.swift.some View fragmentssome View helpers small and rare.bodybody readable as UI, not as a desktop view controller.@SceneStorage for per-window ephemeral state when it truly helps restore the scene.@AppStorage for durable preferences, not transient UI toggles that only matter in one window.NSWindow bridge exists, isolate it behind a small wrapper or helper.@Observable reference types on modern macOS targets, store them as @State in the owning view.@StateObject and @ObservedObject where needed.Process, URLSession, app-server, and platform client code out of SwiftUI views into Services/.AppDelegate and the @main app entrypoint minimal.swiftui-patterns.appkit-interop.Scaffold a new shared-brain knowledge base folder (default ~/kb) — a plain-markdown, OKF v0.1-conformant memory store that any coding agent can read/write across sessions. Use when the user asks to set up, init, or bootstrap a kb / shared brain / persistent agent memory folder, or wants an OKF bundle with a graph viewer ready out of the box.
Author, initialize, validate, and render Open Knowledge Format (OKF) bundles — vendor-neutral knowledge as markdown files with YAML frontmatter. Use when creating an OKF bundle, scaffolding a knowledge catalog, writing OKF concept docs, building index.md/log.md files, checking a bundle for OKF v0.1 conformance, or rendering a bundle as an interactive graph viewer.
Mirror an iOS Simulator into an in-app browser and hot-reload SwiftUI previews from importable Swift packages. Use when previewing SwiftUI in the simulator, mirroring a running simulator in the browser, or live-reloading package-backed previews.
Audit SwiftUI runtime performance from code first. Use when diagnosing slow rendering, janky scrolling, expensive updates, or profiling needs.
Specialized knowledge for the ClickHouse Monitor dashboard. Use this skill when: working with ClickHouse monitoring dashboards, analyzing query performance, writing ClickHouse system table queries, developing dashboard features, or integrating with the ClickHouse Monitor API. Covers query monitoring, table management, merge operations, system metrics, and ClickHouse version compatibility.
MUST USE when reviewing ClickHouse schemas, queries, or configurations. Contains 28 rules that MUST be checked before providing recommendations. Always read relevant rule files and cite specific rules in responses.