Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

apply-macos-higapply macOS HIG 搜索

Agent Skill

apply-macos-hig 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

259

周安装

11

GitHub Stars

5

下载量

91
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:apply-macos-hig(apply macOS HIG 搜索)
来源仓库:https://github.com/yigitkonur/skills-by-yigitkonur
仓库路径:skills/apply-macos-hig
安装命令:
npx skills add https://github.com/yigitkonur/skills-by-yigitkonur --skill apply-macos-hig
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yigitkonur/skills-by-yigitkonur --skill apply-macos-hig

简介

用于查找、检索和筛选相关信息。apply-macos-hig 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合根据关键词快速定位候选结果。
  • 通过 GitHub 安装,需确认权限和维护状态。
  • 可能触发联网或文件读写,建议提前评估风险。
  • 适用于 Codex、Claude、Cursor 和 Gemini CLI。

SKILL.md

macOS Human Interface Guidelines — Complete Design System Reference

Definitive reference for building native macOS applications. Backed by 21 exhaustively sourced reference documents totaling 13,286 lines — every claim traced to Apple HIG, AppKit API docs, SDK headers, WWDC sessions, or verified practitioner sources. Covers macOS Sequoia (15) through Tahoe (26) including Liquid Glass, Compositional Layout, SF Symbol effects, AutoFill/Passkeys, and window tiling.

The skill body below contains critical values you need constantly — spacing scale, typography sizes, component decision trees, and core patterns. For detailed specs, read the corresponding reference file from the Reference Index. Do not guess dimensions or behaviors — look them up.


1. The Three Laws of macOS UI

  1. Every action must be in the menu bar. Toolbars can be hidden/customized. The menu bar is the source of truth for discoverability. Every toolbar action needs a menu bar equivalent.
  2. Standard keyboard shortcuts are sacred. Cmd-Q quits, Cmd-W closes, Cmd-, opens Settings, Cmd-Z/X/C/V/A/S/F do what users expect. Breaking any of these is immediately noticed.
  3. Settings take effect immediately. No Save/Cancel/Apply buttons in preferences. macOS settings are live.

2. Spacing Scale

macOS uses an 8pt baseline grid. All standard values are multiples or sub-multiples of 4pt.

TokenValueUse
xxs1ptButton separators in bottom bars
xs4ptDescription label gaps, mini-control sub-spacing
s6ptStacked controls minimum, radio/checkbox spacing
m8ptLabel-to-control gap, column gap, toolbar spacing
l10ptGroupBox internal top/bottom
ml12ptSection separator padding, last-control-to-button-row
xl14ptFirst control below titlebar (no tab view)
xxl16ptGroupBox internal margin (canonical)
xxxl20ptWindow content margin (L/R/B)
xxxxl24ptMenu bar height, max section whitespace

The 20-8-6 rule: 20pt window margins, 8pt label-to-control gaps, 6pt minimum between stacked controls.


3. Typography Quick Reference

macOS text styles are 25-50% smaller than iOS equivalents for the same semantic name.

StylemacOS SizeWeightSwiftUIUse
Large Title26ptRegular.largeTitleMajor headings
Title 122ptRegular.titleSection titles
Title 217ptRegular.title2Subsections
Title 315ptRegular.title3Tertiary headings
Headline13ptBold.headlineEmphasized body
Body13ptRegular.bodyMain content
Callout12ptRegular.calloutSecondary descriptions
Subheadline11ptRegular.subheadlineSmall labels
Footnote10ptRegular.footnoteAnnotations
Caption 110ptRegular.captionCaptions
Caption 210ptMedium.caption2Micro-copy

Critical: macOS body text is 13pt, not 17pt. Headline on macOS is Bold, not Semibold. SF Pro Text for sizes <= 19pt; SF Pro Display at >= 20pt.


4. Control Size Tiers

SizeSwiftUIAppKitTypical HeightUse
Mini.mini.mini~16ptDense forms, table accessories
Small.small.small~19ptToolbars, inspectors
Regular.regular.regular~22ptDefault for everything
Large.large.large~26-32ptPrimary actions, onboarding

5. Component Decision Trees

Which Button Type?

Is it an action that executes immediately?
  YES -> Push button (.bordered / .borderedProminent)
    Is it the most likely action? -> Default button (Return key, accent fill)
    Is it destructive? -> .destructive role (system red, NOT the default)
    Does it open more UI? -> Add ellipsis: "Export..."
  NO -> Is it a binary on/off?
    YES -> Is it a major feature toggle taking effect immediately?
      YES -> NSSwitch / Toggle(.switch)
      NO -> Checkbox / Toggle(.checkbox)
    NO -> Is it one of 2-5 mutually exclusive options?
      YES -> Radio buttons (vertical preferred)
      NO -> Pop-up button (NSPopUpButton / Picker(.menu))

Which Container for Additional UI?

Blocks a critical operation? -> Alert (NSAlert) or Modal Sheet
Anchored to a control, brief and transient? -> Popover (.transient)
Persistent property editing alongside content? -> Inspector panel
Full-focus task, window still accessible? -> Sheet (beginSheetModal)
Inline expansion in current layout? -> DisclosureGroup / Disclosure triangle

Which Data Display Component?

Is the data hierarchical?
  YES -> Column-by-column navigation? -> NSBrowser
         Expandable tree? -> NSOutlineView
  NO -> Grid layout (equal-size items)? -> NSCollectionView / LazyVGrid
        List/rows?
          Need max performance (5000+ rows)? -> NSTableView (AppKit)
          Simple list (<1000 rows)? -> SwiftUI Table or List
          Sidebar navigation? -> NSOutlineView with .sourceList

Checkbox vs Toggle (NSSwitch)?

Major feature-level on/off, immediate effect, standalone? -> Toggle/Switch
Minor/detail setting, part of a form, or hierarchy of options? -> Checkbox
Already using checkboxes in same UI? -> Keep using checkboxes (consistency)
Deferred apply (Save/Submit button)? -> Checkbox

6. Window and Toolbar Patterns

Toolbar Styles (macOS 11+)

StyleUseItem Labels
.unifiedMost apps (default)Hidden by default
.unifiedCompactApps needing vertical spaceHidden
.expandedDocument-based appsShown, compact
.preferenceSettings windowsShown, selected highlighted

Toolbar Item Ordering

Leading: Sidebar toggle (anchored) -> App-specific items -> Center: Navigation -> Trailing: Search -> Share -> Inspector toggle

Sidebar Specs

PropertyValue
preferredThicknessFraction0.15 (15% of window)
Content list fraction (with sidebar)0.28
Inspector standard size270pt (fixed)
Practical sidebar range160-400pt
Material.sidebar with .behindWindow blending

7. Dialog and Alert Rules

Button Placement (macOS Convention)

[Destructive]     [Cancel]     [Default Action]
  <- left           middle       right (Return) ->
  • Default button: trailing (rightmost), accent-colored, bound to Return
  • Cancel: second from right, bound to Escape
  • Never make a destructive button the default
  • Use specific verbs ("Delete", "Erase"), not "OK" or "Yes"/"No"

Alert Text

  • messageText (bold, larger): State the specific action — "Delete 'Project Alpha'?"
  • informativeText (regular, smaller): State consequences — "You can't undo this."

8. Menu Bar Requirements

Standard menus in order: App Menu -> File -> Edit -> View -> [App-specific] -> Window -> Help

  • "Settings..." (not "Preferences..." on macOS 13+) with Cmd-,
  • Ellipsis only when further input required (Open..., Save As...) — NOT for About, Quit
  • Toggle titles describe the action: "Show Toolbar" / "Hide Toolbar"
  • Modifier glyph order: Fn -> Ctrl -> Opt -> Shift -> Cmd
  • Help menu always contains a search field at top (system-provided)

9. Color System Essentials

Label Hierarchy (auto-adapts light/dark)

LevelNSColorSwiftUIUse
Primary.labelColor.primaryMain text
Secondary.secondaryLabelColor.secondarySupporting text
Tertiary.tertiaryLabelColor.tertiaryPlaceholder text
Quaternary.quaternaryLabelColorWatermark
  • Use semantic colors, never hardcoded hex — they auto-adapt to light/dark/high-contrast
  • controlAccentColor follows the user's system accent color choice
  • CALayer does NOT auto-adapt — refresh in viewDidChangeEffectiveAppearance()
  • Asset catalog colors support 4 slots: Any, Dark, High Contrast, High Contrast Dark

10. Materials and Vibrancy

Blending ModeWhat It BlursUse
.behindWindowOther windows + desktopSidebars, menus, popovers
.withinWindowContent within same windowTitle bars, selection, sheets

Critical: Title bar material MUST use .withinWindow. Sidebar uses .behindWindow (requires window.isOpaque = false).

Liquid Glass (macOS 26)

  • API: NSGlassEffectView (AppKit) / .glassEffect() (SwiftUI)
  • Variants: Regular (adaptive) and Clear (needs dimming overlay)
  • Glass on control layer only (toolbars, sidebars) — never content
  • No .state property — appearance depends on key window status

11. Motion and Animation

ContextDurationCurve
NSAnimationContext default0.25seaseInEaseOut
SwiftUI .default0.35seaseInEaseOut
Window resize / sheet~0.20ssystem default
Rule of thumb< 0.4sAlways on macOS

Use no-bounce or near-zero bounce springs on macOS. Always check accessibilityReduceMotion — substitute .opacity for spatial transitions.


12. Accessibility Non-Negotiables

  • Every interactive element needs accessibilityLabel (unless visible text serves as label)
  • Every custom NSView control must adopt a role-specific protocol (NSAccessibilityButton, etc.)
  • Decorative images: .accessibilityHidden(true) / setAccessibilityElement(false)
  • Test with VoiceOver (Cmd-F5) and Full Keyboard Access

13. SwiftUI vs AppKit

ScenarioRecommendation
Simple forms, settings, < 1000 rowsSwiftUI
Complex tables, 5000+ rowsNSTableView via AppKit
Native sidebar vibrancyAppKit NSVisualEffectView
Window lifecycle controlAppKit
Rich drag-and-dropAppKit
Cross-platform (macOS + iOS)SwiftUI

Practitioner consensus: SwiftUI implements HIG for you on iOS; on macOS, it fights you at every turn. Use SwiftUI for layout, fall back to AppKit via NSViewRepresentable for complex controls.


14. Common Mistakes

  1. Treating macOS as a big iPad — No bottom tab bars, no full-screen sheets
  2. Save/Cancel/Apply in Settings — Settings changes are immediate
  3. Missing standard keyboard shortcutsCmd-, Cmd-W Cmd-Q Cmd-Z/X/C/V/A/S/F
  4. Missing menu bar items — Every action needs a menu equivalent
  5. iOS body text size (17pt) — macOS body is 13pt
  6. iOS row heights (44pt) — macOS default is 22pt
  7. Custom dark mode toggle — Respect NSAppearance
  8. SwiftUI List/Table for large datasets — Falls apart past ~1000 rows
  9. Missing Services menu — Text apps must support NSServicesMenuRequestor
  10. Hardcoded colors — Use semantic NSColor tokens or asset catalog names

Reference Index

Read these files for detailed specs. Each contains exact values, API examples, and do's/don'ts.

Foundations

TopicFileKey Content
Color System & Dark Modereferences/foundations/01-color-system-and-dark-mode.md50+ color tokens, dark mode, accent colors, dynamic color construction, P3 wide gamut, CALayer refresh pattern, asset catalogs
Typography & Text Stylesreferences/foundations/02-typography-and-text-styles.mdAll text styles, SF Pro family, Dynamic Type, tracking
Layout, Spacing & Alignmentreferences/foundations/03-layout-spacing-and-alignment.mdWindow chrome dimensions, form layouts, sidebar widths
Iconography & SF Symbolsreferences/foundations/04-iconography-and-sf-symbols.md10 app icon sizes, squircle geometry, SF Symbols rendering, animated symbol effects (.bounce/.pulse/.wiggle/.breathe/.rotate)
Materials, Vibrancy & Effectsreferences/foundations/05-materials-vibrancy-and-effects.md14 named materials, blending modes, Liquid Glass API
Motion & Animationreferences/foundations/06-motion-and-animation.mdTiming values, spring parameters, easing curves, Reduced Motion

Components

TopicFileKey Content
Buttons & Action Controlsreferences/components/01-buttons-and-action-controls.md20+ button variants, segmented controls, dialog button rules
Text Inputs, Labels & Searchreferences/components/02-text-inputs-labels-and-search.mdText fields, search fields, token fields, combo boxes, validation, AutoFill/NSTextContentType, passkey integration
Selection Controls & Pickersreferences/components/03-selection-controls-and-pickers.mdCheckboxes, radio buttons, sliders, steppers, color wells, NSLevelIndicator (4 styles), NSPathControl (3 styles)
Menus & Menu Barreferences/components/04-menus-and-menu-bar.mdComplete menu system, NSMenu delegate lifecycle, validation, Services menu, dynamic menus, toggle states, Format menu
Popovers, Tooltips & Disclosurereferences/components/05-popovers-tooltips-and-disclosure.mdPopover sizing/behavior, tooltip timing, disclosure controls
Tables, Lists & Outlinesreferences/components/06-tables-lists-and-outlines.mdNSTableView, NSOutlineView, NSCollectionView, NSBrowser, NSCollectionViewCompositionalLayout
Alerts, Sheets & Dialogsreferences/components/07-alerts-sheets-and-dialogs.mdAlert styles, button placement, modality levels, accessoryView, SwiftUI limits, NSPanel patterns, Save Changes pattern, multi-item phrasing

Platform Patterns

TopicFileKey Content
Window Management & Typesreferences/platform-patterns/01-window-management-and-types.mdWindow types, title bar 28pt, traffic lights, full-screen, Stage Manager, tabbing, proxy icons, tiling
Sidebars & Split Viewsreferences/platform-patterns/02-sidebars-source-lists-split-views.mdSidebar types, width specs, inspectors, collapse, macOS 26 floating Liquid Glass sidebars, migration path
Toolbars & Title Barsreferences/platform-patterns/03-toolbars-and-title-bars.md5 toolbar styles, customization, overflow
Keyboard Shortcuts & Inputreferences/platform-patterns/04-keyboard-shortcuts-and-input.mdComplete shortcut table, focus system
Drag, Drop & File Managementreferences/platform-patterns/05-drag-drop-and-file-management.mdDrag lifecycle, cursor badges, file promises

Technologies

TopicFileKey Content
Accessibilityreferences/technologies/01-accessibility-and-assistive-tech.mdVoiceOver, keyboard navigation, 33-item audit checklist
Widgets, Notifications & Systemreferences/technologies/02-widgets-notifications-system.mdWidget dimensions, notifications, Spotlight, Services

Context

TopicFileKey Content
Practitioner Insightsreferences/context/01-practitioner-insights.mdCommon mistakes, what devs override, SwiftUI vs AppKit reality

Using References

When implementing a component or pattern:

  1. Identify the reference file from the index above
  2. Read it for exact dimensions, API examples, states, and do's/don'ts
  3. Cross-reference practitioner insights for real-world gotchas
  4. Check accessibility requirements in the accessibility reference

Do not rely on memory alone — the references are authoritative.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.39%
按下载量换算31

Claude

29.64%
按下载量换算27

Cursor

19.55%
按下载量换算18

Gemini CLI

8.77%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills