Use when creating a new project folder, starter pack, app scaffold, or agent-ready workspace — AGENTS.md, README, TASKS, DECISIONS, PROMPTS, an idempotent bootstrap script, and starter-pack modes.
中文简介正在准备中。当前显示原文说明。
Use when designing, reviewing, or implementing Settings/Preferences for Apple-platform apps — what belongs in Settings vs Inspector/Toolbar, grouped forms, native controls, secure storage, launch at login, and destructive actions.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Use this skill when designing, reviewing, or implementing Settings/Preferences for Apple-platform apps. It covers macOS Settings, iOS Settings screens, app preferences, model configuration, shortcuts, launch at login, folders, privacy, accounts, appearance, and advanced options.
Settings are for persistent preferences, not one-time actions or navigation.
Use for:
Do not put these in Settings:
General
Models
Projects
Keyboard
Notifications
Privacy
Appearance
Advanced
About
For an agent-driven app:
General
- Launch at Login
- Show Dock icon
- Start hidden
Models
- Provider: Ollama / OpenAI / Other
- Ollama Base URL
- Default model
- Test connection
Projects
- Default projects folder
- Open folder after create
- Include skills by default
Keyboard
- Command Palette shortcut
- Quick Capture shortcut
- Toggle Inspector shortcut
Notifications
- Notify when the agent finishes
- Notify on failure
- Quiet hours
Privacy
- Local-only mode
- Allowed folders
- Clear local history
Appearance
- System / Light / Dark
- Compact mode
- Show advanced metadata
Advanced
- Debug logs
- Reset app state
- Export diagnostics
@main
struct MyApp: App {
var body: some Scene {
MenuBarExtra("My App", systemImage: "sparkles") {
AppMenuView()
}
Settings {
SettingsView()
}
}
}
import SwiftUI
struct SettingsView: View {
@AppStorage("launchAtLogin") private var launchAtLogin = false
@AppStorage("defaultModel") private var defaultModel = "llama3.1:8b"
@AppStorage("ollamaBaseURL") private var ollamaBaseURL = "http://127.0.0.1:11434"
@AppStorage("appearance") private var appearance = "system"
var body: some View {
TabView {
GeneralSettingsView(launchAtLogin: $launchAtLogin)
.tabItem { Label("General", systemImage: "gearshape") }
ModelSettingsView(defaultModel: $defaultModel, ollamaBaseURL: $ollamaBaseURL)
.tabItem { Label("Models", systemImage: "brain") }
AppearanceSettingsView(appearance: $appearance)
.tabItem { Label("Appearance", systemImage: "paintbrush") }
}
.frame(width: 560, height: 420)
}
}
struct ModelSettingsView: View {
@Binding var defaultModel: String
@Binding var ollamaBaseURL: String
var body: some View {
Form {
Section("Provider") {
TextField("Ollama URL", text: $ollamaBaseURL)
TextField("Default Model", text: $defaultModel)
Button("Test Connection") {
testConnection()
}
}
Section("Behavior") {
Toggle("Prefer local models", isOn: .constant(true))
Toggle("Fallback to cloud model", isOn: .constant(false))
}
}
.formStyle(.grouped)
.padding()
}
private func testConnection() {}
}
Use @AppStorage for simple preferences:
Booleans
Strings
Small enum-like values
Numbers
Use a settings service or model for:
API keys
Folder bookmarks
Secure tokens
Complex JSON
Per-project preferences
Use Keychain for secrets.
Do not store API keys in plain UserDefaults.
Use SMAppService where appropriate.
import ServiceManagement
func setLaunchAtLogin(_ enabled: Bool) {
do {
if enabled {
try SMAppService.mainApp.register()
} else {
try SMAppService.mainApp.unregister()
}
} catch {
print("Failed to update launch at login: \(error)")
}
}
For folder settings:
Dangerous settings must be separated and confirmed:
Clear Local History…
Reset All Settings…
Delete All Cached Runs…
Use ellipsis for actions needing confirmation.
[ ] Settings are persistent preferences
[ ] Settings are grouped clearly
[ ] App-wide settings are not in Inspector
[ ] Current-screen actions are not in Settings
[ ] Secrets are stored securely
[ ] Folder permissions are handled safely
[ ] Destructive options require confirmation
[ ] Launch at Login handles errors
[ ] Settings window has appropriate size
[ ] Labels are clear and literal
Using Settings for navigation
Putting selected item details in Settings
Storing API keys in UserDefaults
No confirmation for reset/delete actions
Too many advanced options visible by default
Long explanations everywhere
Custom controls where native controls work
Drop this into any coding agent (Claude Code, Codex, Cursor, …) to apply the skill:
Use the apple-hig-settings skill to create or improve app settings.
Rules:
- Settings are for persistent app preferences.
- Use Settings scene on macOS.
- Use grouped Form sections.
- Use native controls.
- Store simple preferences in AppStorage.
- Store secrets in Keychain, not UserDefaults.
- Keep selected-item details in Inspector, not Settings.
- Keep current-screen actions in Toolbar, not Settings.
- Put advanced and destructive actions last.
- Require confirmation for destructive actions.
After coding:
1. List settings added.
2. Explain storage choices.
3. Explain security for secrets.
4. Explain destructive safeguards.
5. Give manual test steps.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Use when creating a new project folder, starter pack, app scaffold, or agent-ready workspace — AGENTS.md, README, TASKS, DECISIONS, PROMPTS, an idempotent bootstrap script, and starter-pack modes.
中文简介正在准备中。当前显示原文说明。
Use when designing or implementing states for AI agent tasks, background jobs, local model runs, queues, and notifications — one shared set of states, only legal transitions, and a recovery path out of every failure.
中文简介正在准备中。当前显示原文说明。
Use when exposing app features to App Intents, Shortcuts, Siri, Spotlight, widgets, controls, or system actions — small safe AppIntents, AppShortcutsProvider, AppEnum/AppEntity, parameters, and open-vs-background behavior.
中文简介正在准备中。当前显示原文说明。
Use when designing, reviewing, or implementing a command-palette / ⌘K layer for an Apple-platform app — keyboard-first global search, ranked and grouped results, native floating panel, and protected destructive commands.
中文简介正在准备中。当前显示原文说明。
Use when designing or implementing empty, first-run, no-result, offline, error, or waiting states in Apple-platform apps — every empty state explains what is missing, why it matters, and what to do next.
中文简介正在准备中。当前显示原文说明。
Use when designing or implementing feedback, status, progress, alerts, errors, success states, and live activity indicators in Apple-platform apps — inline status, banners, alerts, notifications, and loading states.
中文简介正在准备中。当前显示原文说明。