rea-analysis-optimization
MOmorluto/rea485k近 7 天新增 9,215 个 star
Design rules that make a SwiftUI app look and feel like a native Mac app on macOS 26 and later, from Apple's eight design principles to Liquid Glass, layout, toolbars, menus, search, keyboard, type, color, and dark mode. Use when building or reviewing any window, sidebar, toolbar, menu, panel, or settings screen, or when the user asks for a more native, Apple-like, or better designed app.
Apple already designed your app. Pick the right system parts, arrange them, and stay out of their way. Use the system first. Add custom design only where the system has nothing.
"${CLAUDE_SKILL_DIR}/scripts/hig.sh" <topic> (for example toolbars,
sheets). It prints the HIG page as plain text.design-system.ux-design.layout-grid.design-kit, or design-from-app to match an app the user names.Use them as the review lens for every screen (HIG Design principles, 2026):
Every screen answers: Where am I? What can I do? Where can I go?
Write these four under ## Design plan in docs/BRIEF.md, or in
docs/DESIGN.md when the brief would pass one page:
A Mac app is used through its small entry points: a global shortcut, the menu bar, a quick panel, drag and drop, the Share menu. Design those first. A to-do app lives in its quick-add panel.
NavigationSplitView: sidebar, content, detail. Global actions in the
toolbar. No sidebar when navigation is one level..inspector or the detail column. An inspector looks
flat beside the floating sidebar. To make both sides match, call on
app-shell.md before you build the toolbar.ContentUnavailableView
with the first action. Filters appear once there is content.Space, on a 4 pt grid: 20 pt window margins, 8 pt
between related controls, 20 pt between groups. .controlSize for dense
areas, never hard-coded heights.GlassEffectContainer..glassEffect() only for a custom floating control. Tint only to carry
meaning. Interactive glass (the bounce on click) only on controls, and
sparingly.@Environment(\.appearsActive)
(patterns.md, "Custom chrome that follows the window").ToolbarSpacer. Monochrome SF
Symbols, each with a title and .help. At most one prominent action,
only for a completing action like Done or Send. Most main windows have
none.SidebarCommands(), ToolbarCommands(), and (with an inspector)
InspectorCommands() in .commands, so the View menu can show and hide
each part..commands, CommandGroup, CommandMenu). Apple's menu order
and labels: menus.md.swift-swiftui, "Menu commands")..noInitialFocus() on every
window and sheet. The one exception is a window whose only job is
typing, like a search or quick-add panel: it focuses its field..fitsContent()). It scrolls only when the content is taller than
the screen allows, about 640 pt.@FocusState) so the user can type at once..help tooltips, and a list in Settings..primary, .secondary, .tertiary. System backgrounds. No
fixed white, black, or gray in chrome.Label for icon and text, SF Symbols for every icon..contextMenu on everything a user can act on. It hides items that do
not apply and shows no shortcuts. Hover states on custom controls. Mac
controls are 22 to 28 pt tall, not 44.Transferable. A drag to Finder makes a
real file. ShareLink where it fits.@SceneStorage). Quit never asks unless typed work would be lost.Settings scene, opened with Command-comma: tabs, one grouped Form per
tab, sized to its content. Structure and rows: settings.md.Custom chrome is fine when it makes the app clearly better at its one job, like a quick-add field or a calendar grid. Write why in a code comment, and match the system: concentric radii, system fonts, system spacing.
Snapshot every surface in light and dark: each page, the menu bar menu, each panel and overlay (launcher, toasts, cards), editors, and each Settings tab (snapshot mode does pages and Settings tabs). Look for focus rings, selected text, scroll bars with nothing to scroll, and empty bands under short content. Capture each window as the key window: a snapshot of an inactive window (gray traffic lights, dim toggles) or with flattened glass does not count as reviewed. Views that pause while covered show a placeholder; that one is expected.
Done when every rule in design-rules.md holds on the light and dark snapshots of every surface, or has a comment saying why not.
MOmorluto/rea485k近 7 天新增 9,215 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star