Skip to main content 홈 크리에이터 fumiya-kume toy-poodle-love macos-swiftui
macos-swiftui This skill should be used when the user asks to "build macOS app",
"create macOS window", "implement NavigationSplitView", "add menu commands",
"create Settings window", "implement document-based app", "use WindowGroup",
"add toolbar", "implement sidebar", "multi-window app",
"macOS アプリを作成", "macOS で実装", "メニューを追加",
"設定画面を作成", "マルチウィンドウ", "サイドバーを実装",
"ドキュメントベースアプリ", "ツールバーを追加".
Provides macOS 14+ (Sonoma) development guidance with SwiftUI,
window management, menu integration, and macOS-specific patterns.
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/fumiya-kume/toy-poodle-love --skill macos-swiftui명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... This skill should be used when the user asks to "implement Wan I2V", "set up Wan2.1", "configure Wan2.2", "image to video with Wan", "ComfyUI video generation", "low VRAM video generation", "GGUF Wan model", "setup video diffusion model", "Wan I2Vを実装", "Wan2.1をセットアップ", "Wan2.2を設定", "画像から動画生成", "ComfyUIで動画生成", "低VRAMで動画生成", "GGUFモデルを使用", "動画生成モデルのセットアップ", or needs guidance on Wan2.1/2.2 image-to-video model setup, ComfyUI workflow configuration, GGUF quantization for low VRAM, video generation parameters, or troubleshooting Wan model issues.
This skill should be used when the user asks to "implement Material 3 Expressive",
"add spring animations", "use MotionScheme", "create expressive button",
"add loading indicator", "implement FAB menu", "use shape morphing",
"create floating toolbar", "add carousel", "implement ButtonGroup",
"use MaterialShapes", "implement vibrant FAB", "add expressive UI",
"configure MaterialExpressiveTheme", "use spring physics animation",
"Material 3 Expressive を実装", "スプリングアニメーション", "MotionScheme を使用",
"表現力豊かなボタン", "ローディングインジケーター", "FABメニュー",
"シェイプモーフィング", "フローティングツールバー", "カルーセル",
"ButtonGroup を追加", "MaterialShapes を使用", "Vibrant FAB",
"MaterialExpressiveTheme を設定", "物理ベースアニメーション",
or needs guidance on Material 3 Expressive implementation for Android
with Jetpack Compose, including MotionScheme, spring animations,
shape morphing, and new expressive components for Android API 24+.
swift6-strict-concurrency This skill should be used when the user asks to "migrate to Swift 6",
"enable strict concurrency", "fix Sendable errors", "add @MainActor",
"resolve data race warnings", "implement actor isolation",
"configure complete concurrency checking", "fix Swift 6 warnings",
"make class Sendable", "handle @Sendable closures",
"Swift 6 に移行", "Strict Concurrency を有効化", "Sendable エラーを修正",
"@MainActor を追加", "データ競合警告を解決", "アクター分離を実装",
"完全な並行性チェックを設定", "Swift 6 警告を修正",
"クラスを Sendable にする", "@Sendable クロージャを扱う",
or needs guidance on Swift 6 strict concurrency migration,
Sendable protocol implementation, actor isolation patterns,
data race safety, and migration strategies from Swift 5 to Swift 6.
name macos-swiftui description This skill should be used when the user asks to "build macOS app",
"create macOS window", "implement NavigationSplitView", "add menu commands",
"create Settings window", "implement document-based app", "use WindowGroup",
"add toolbar", "implement sidebar", "multi-window app",
"macOS アプリを作成", "macOS で実装", "メニューを追加",
"設定画面を作成", "マルチウィンドウ", "サイドバーを実装",
"ドキュメントベースアプリ", "ツールバーを追加".
Provides macOS 14+ (Sonoma) development guidance with SwiftUI,
window management, menu integration, and macOS-specific patterns.
version 1.0.0
macOS SwiftUI Development
Comprehensive macOS app development skill for macOS 14+ (Sonoma) with SwiftUI and modern Swift practices.
Overview
Target Platform : macOS 14+ (Sonoma) / Swift 5.9+
Core Technologies :
UI Framework: SwiftUI (primary), AppKit (when needed)
Window Management: WindowGroup, Window, MenuBarExtra
Navigation: NavigationSplitView, NavigationStack
Data: SwiftData (recommended), Core Data
Document: FileDocument, DocumentGroup
Quick Start
New Project Setup
To create a new macOS project:
Open Xcode and select "Create New Project"
Choose "App" template under macOS
Select SwiftUI for Interface
Set minimum deployment target to macOS 14.0
Enable Swift strict concurrency checking in Build Settings
Basic App Structure
import SwiftUI
@main
struct MyMacApp : {
body: {
{
()
}
.commands {
}
{
()
}
}
}
App
var
some
Scene
WindowGroup
ContentView
Settings
SettingsView
Existing Project Analysis To analyze an existing project structure:
bash scripts/macos-project-analyzer.sh /path/to/project
Window Management
WindowGroup (Multi-Instance Windows) @main
struct MyApp : App {
var body: some Scene {
WindowGroup {
ContentView ()
}
.defaultSize(width: 800 , height: 600 )
.defaultPosition(.center)
}
}
Window (Single Instance) @main
struct MyApp : App {
var body: some Scene {
Window ("Inspector" , id: "inspector" ) {
InspectorView ()
}
.defaultSize(width: 300 , height: 400 )
.windowResizability(.contentSize)
}
}
Opening Windows Programmatically struct ContentView : View {
@Environment (\.openWindow) private var openWindow
var body: some View {
Button ("Open Inspector" ) {
openWindow(id: "inspector" )
}
}
}
Menu Bar Integration
Custom Commands @main
struct MyApp : App {
var body: some Scene {
WindowGroup {
ContentView ()
}
.commands {
CommandGroup (after: .newItem) {
Button ("New Document" ) {
}
.keyboardShortcut("n" , modifiers: [.command, .shift])
}
CommandMenu ("Custom" ) {
Button ("Action 1" ) { }
.keyboardShortcut("1" , modifiers: .command)
Divider ()
Button ("Action 2" ) { }
}
}
}
}
FocusedValue for Window-Specific State struct FocusedDocumentKey : FocusedValueKey {
typealias Value = Binding <Document >
}
extension FocusedValues {
var document: Binding <Document >? {
get { self [FocusedDocumentKey .self ] }
set { self [FocusedDocumentKey .self ] = newValue }
}
}
.focusedSceneValue(\.document, $document )
Navigation Patterns
NavigationSplitView (Two/Three Column) struct ContentView : View {
@State private var selectedCategory: Category ?
@State private var selectedItem: Item ?
var body: some View {
NavigationSplitView {
List (categories, selection: $selectedCategory ) { category in
Label (category.name, systemImage: category.icon)
}
.navigationSplitViewColumnWidth(min: 180 , ideal: 200 , max: 250 )
} content: {
if let category = selectedCategory {
List (category.items, selection: $selectedItem ) { item in
Text (item.name)
}
}
} detail: {
if let item = selectedItem {
ItemDetailView (item: item)
} else {
ContentUnavailableView ("Select an Item" , systemImage: "doc" )
}
}
.navigationSplitViewStyle(.balanced)
}
}
Settings/Preferences
Settings Scene @main
struct MyApp : App {
var body: some Scene {
WindowGroup {
ContentView ()
}
Settings {
SettingsView ()
}
}
}
struct SettingsView : View {
var body: some View {
TabView {
GeneralSettingsView ()
.tabItem {
Label ("General" , systemImage: "gear" )
}
AdvancedSettingsView ()
.tabItem {
Label ("Advanced" , systemImage: "gearshape.2" )
}
}
.frame(width: 450 , height: 300 )
}
}
@AppStorage for User Defaults struct GeneralSettingsView : View {
@AppStorage ("showSidebar" ) private var showSidebar = true
@AppStorage ("fontSize" ) private var fontSize = 14.0
var body: some View {
Form {
Toggle ("Show Sidebar" , isOn: $showSidebar )
Slider (value: $fontSize , in: 10 ... 24 , step: 1 ) {
Text ("Font Size: \(Int(fontSize)) " )
}
}
.formStyle(.grouped)
.padding()
}
}
Document-Based Apps
FileDocument Implementation struct TextDocument : FileDocument {
static var readableContentTypes: [UTType ] { [.plainText] }
var text: String
init (text : String = "" ) {
self .text = text
}
init (configuration : ReadConfiguration ) throws {
guard let data = configuration.file.regularFileContents,
let string = String (data: data, encoding: .utf8) else {
throw CocoaError (.fileReadCorruptFile)
}
text = string
}
func fileWrapper (configuration : WriteConfiguration ) throws -> FileWrapper {
let data = text.data(using: .utf8)!
return FileWrapper (regularFileWithContents: data)
}
}
@main
struct TextEditorApp : App {
var body: some Scene {
DocumentGroup (newDocument: TextDocument ()) { file in
TextEditorView (document: file.$document )
}
}
}
Toolbar
Toolbar Items struct ContentView : View {
@State private var searchText = ""
var body: some View {
NavigationSplitView {
Sidebar ()
} detail: {
DetailView ()
}
.toolbar {
ToolbarItem (placement: .primaryAction) {
Button (action: addItem) {
Label ("Add" , systemImage: "plus" )
}
}
ToolbarItem (placement: .navigation) {
Button (action: toggleSidebar) {
Label ("Sidebar" , systemImage: "sidebar.left" )
}
}
}
.searchable(text: $searchText , placement: .toolbar)
}
}
ToolbarItemGroup .toolbar {
ToolbarItemGroup (placement: .primaryAction) {
Button { } label: {
Label ("Bold" , systemImage: "bold" )
}
Button { } label: {
Label ("Italic" , systemImage: "italic" )
}
}
}
System Integration
Notifications import UserNotifications
func requestNotificationPermission () async -> Bool {
let center = UNUserNotificationCenter .current()
do {
return try await center.requestAuthorization(options: [.alert, .sound, .badge])
} catch {
return false
}
}
func sendNotification (title : String , body : String ) {
let content = UNMutableNotificationContent ()
content.title = title
content.body = body
content.sound = .default
let request = UNNotificationRequest (
identifier: UUID ().uuidString,
content: content,
trigger: nil
)
UNUserNotificationCenter .current().add(request)
}
Menu Bar Extra (Status Bar Apps) @main
struct MyApp : App {
var body: some Scene {
MenuBarExtra ("My App" , systemImage: "star" ) {
MenuBarView ()
}
.menuBarExtraStyle(.window)
}
}
Drag & Drop / Pasteboard
Transferable Protocol struct MyItem : Transferable , Codable {
var id: UUID
var name: String
static var transferRepresentation: some TransferRepresentation {
CodableRepresentation (contentType: .myItem)
ProxyRepresentation (exporting: \.name)
}
}
extension UTType {
static var myItem = UTType (exportedAs: "com.example.myitem" )
}
Draggable and DropDestination struct ItemView : View {
let item: MyItem
var body: some View {
Text (item.name)
.draggable(item)
}
}
struct DropZoneView : View {
@State private var items: [MyItem ] = []
var body: some View {
VStack {
ForEach (items) { item in
Text (item.name)
}
}
.dropDestination(for: MyItem .self ) { items, location in
self .items.append(contentsOf: items)
return true
}
}
}
macOS-Specific UI Components
Table View struct TableExample : View {
@State private var items: [Item ] = []
@State private var selection: Set <Item .ID > = []
@State private var sortOrder = [KeyPathComparator (\Item .name)]
var body: some View {
Table (items, selection: $selection , sortOrder: $sortOrder ) {
TableColumn ("Name" , value: \.name)
TableColumn ("Date" , value: \.date) { item in
Text (item.date.formatted())
}
TableColumn ("Size" , value: \.size) { item in
Text ("\(item.size) KB" )
}
}
.onChange(of: sortOrder) { _ , newOrder in
items.sort(using: newOrder)
}
}
}
Popover struct PopoverExample : View {
@State private var showPopover = false
var body: some View {
Button ("Show Info" ) {
showPopover = true
}
.popover(isPresented: $showPopover , arrowEdge: .bottom) {
VStack {
Text ("Information" )
.font(.headline)
Text ("Details go here" )
}
.padding()
.frame(width: 200 )
}
}
}
AppKit Integration
NSViewRepresentable import AppKit
import SwiftUI
struct NSTextViewWrapper : NSViewRepresentable {
@Binding var text: String
func makeNSView (context : Context ) -> NSScrollView {
let scrollView = NSTextView .scrollableTextView()
let textView = scrollView.documentView as! NSTextView
textView.delegate = context.coordinator
textView.string = text
return scrollView
}
func updateNSView (_ scrollView : NSScrollView , context : Context ) {
let textView = scrollView.documentView as! NSTextView
if textView.string != text {
textView.string = text
}
}
func makeCoordinator () -> Coordinator {
Coordinator (self )
}
class Coordinator : NSObject , NSTextViewDelegate {
var parent: NSTextViewWrapper
init (_ parent : NSTextViewWrapper ) {
self .parent = parent
}
func textDidChange (_ notification : Notification ) {
guard let textView = notification.object as? NSTextView else { return }
parent.text = textView.string
}
}
}
Code Quality Checklist Before submitting code, verify:
Additional Resources
Reference Files
Example Files
Utility Scripts