@olegkoval/agent-skills 1.12.0 โ†’ 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/.claude-plugin/plugin.json +5 -2
  2. package/.cursor-plugin/index.json +10 -0
  3. package/.kiro/steering/apple-store-submit.md +146 -0
  4. package/.kiro/steering/macos-menubar-app.md +226 -0
  5. package/.windsurf/rules/apple-store-submit.md +145 -0
  6. package/.windsurf/rules/macos-menubar-app.md +225 -0
  7. package/catalog/skills.json +66 -0
  8. package/package.json +1 -1
  9. package/packages/software-development/apple-store-submit/SKILL.md +157 -0
  10. package/packages/software-development/apple-store-submit/adapters/claude/plugin.json +5 -0
  11. package/packages/software-development/apple-store-submit/adapters/claude/skills/apple-store-submit/SKILL.md +158 -0
  12. package/packages/software-development/apple-store-submit/adapters/codex/README.md +3 -0
  13. package/packages/software-development/apple-store-submit/adapters/cursor/plugin.json +6 -0
  14. package/packages/software-development/apple-store-submit/adapters/cursor/skills/apple-store-submit/SKILL.md +158 -0
  15. package/packages/software-development/apple-store-submit/adapters/kiro/steering/apple-store-submit.md +145 -0
  16. package/packages/software-development/apple-store-submit/adapters/windsurf/rules/apple-store-submit.md +144 -0
  17. package/packages/software-development/macos-menubar-app/SKILL.md +237 -0
  18. package/packages/software-development/macos-menubar-app/adapters/claude/plugin.json +5 -0
  19. package/packages/software-development/macos-menubar-app/adapters/claude/skills/macos-menubar-app/SKILL.md +238 -0
  20. package/packages/software-development/macos-menubar-app/adapters/codex/README.md +3 -0
  21. package/packages/software-development/macos-menubar-app/adapters/cursor/plugin.json +6 -0
  22. package/packages/software-development/macos-menubar-app/adapters/cursor/skills/macos-menubar-app/SKILL.md +238 -0
  23. package/packages/software-development/macos-menubar-app/adapters/kiro/steering/macos-menubar-app.md +225 -0
  24. package/packages/software-development/macos-menubar-app/adapters/windsurf/rules/macos-menubar-app.md +224 -0
  25. package/packages/software-development/skill-budget-audit/SKILL.md +145 -0
  26. package/packages/software-development/skill-budget-audit/adapters/claude/plugin.json +5 -0
  27. package/packages/software-development/skill-budget-audit/adapters/claude/skills/skill-budget-audit/SKILL.md +146 -0
  28. package/scripts/build-adapters.sh +8 -6
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: apple-store-submit
3
+ description: Handle Apple App Store rejection emails end-to-end โ€” parse rejection reasons, create a fix plan, implement code changes (privacy strings, entitlements, sandbox), navigate App Store Connect to update metadata, and resubmit. Use when an app receives a rejection or when preparing a first-time submission.
4
+ license: MIT
5
+ allowed-tools: Bash, Read, Write, Edit
6
+ compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires Xcode, an Apple Developer account, and App Store Connect access.
7
+ metadata:
8
+ targets: ["cursor"]
9
+ author: Oleg Koval
10
+ tags:
11
+ - apple
12
+ - app-store
13
+ - ios
14
+ - macos
15
+ - xcode
16
+ - submission
17
+ - rejection
18
+ ---
19
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
20
+
21
+ > ๐Ÿค– *Auto-generated by **weekly-pattern-learner** ยท App Store rejection handling workflow observed in FocusNotch App Store session, Jun 2026 (92 user turns covering rejection โ†’ plan โ†’ code fixes โ†’ metadata โ†’ resubmit)*
22
+
23
+ # Apple App Store Submission & Rejection Handling
24
+
25
+ ## Overview
26
+
27
+ Parse Apple rejection feedback, implement targeted fixes, update App Store Connect metadata, and resubmit โ€” covering the complete cycle from rejection email to approved build.
28
+
29
+ ## When to Use
30
+
31
+ - Apple review team sends a rejection email
32
+ - App fails automated pre-review checks (binary rejected at upload)
33
+ - Preparing metadata for first-time submission (screenshots, keywords, privacy labels)
34
+ - Resolving App Store Connect errors before submitting for review
35
+
36
+ ## Workflow
37
+
38
+ ### 1. Parse the Rejection
39
+
40
+ Read the full rejection email. Extract and list:
41
+
42
+ - **Guideline numbers** violated (e.g., 2.1, 4.2.0, 5.1.1)
43
+ - **Code-level issues** โ€” missing entitlements, incorrect privacy strings, sandbox violations
44
+ - **Metadata issues** โ€” wrong screenshot sizes, subtitle policy, keyword stuffing
45
+ - **UX issues** โ€” crashes described by reviewer, broken flows, missing functionality
46
+
47
+ Create a numbered fix plan: one item per rejection point, with the type of fix needed.
48
+
49
+ ### 2. Classify Fixes by Type
50
+
51
+ | Type | Location |
52
+ |------|----------|
53
+ | Privacy usage strings missing | `Info.plist` |
54
+ | Entitlement missing/wrong | `<AppName>.entitlements` |
55
+ | Crash or broken feature | Source code |
56
+ | Screenshots wrong size/content | App Store Connect |
57
+ | Keywords/subtitle/description | App Store Connect |
58
+ | Build number conflict | Xcode + App Store Connect |
59
+
60
+ ### 3. Implement Code Fixes
61
+
62
+ **Privacy permission strings** (`Info.plist`):
63
+
64
+ ```xml
65
+ <key>NSMicrophoneUsageDescription</key>
66
+ <string>Used for voice input during focus sessions.</string>
67
+
68
+ <key>NSCalendarsUsageDescription</key>
69
+ <string>Used to sync tasks with your calendar.</string>
70
+ ```
71
+
72
+ **Entitlements** (`<AppName>.entitlements`):
73
+
74
+ ```xml
75
+ <key>com.apple.security.app-sandbox</key>
76
+ <true/>
77
+ <key>com.apple.security.network.client</key>
78
+ <true/>
79
+ <key>com.apple.security.files.user-selected.read-write</key>
80
+ <true/>
81
+ ```
82
+
83
+ **Sandbox violations** โ€” remove `NoEscapeBlock` patterns, replace deprecated APIs, use only sandboxed file access via Security-Scoped Bookmarks when needed.
84
+
85
+ ### 4. Build and Archive
86
+
87
+ ```bash
88
+ # Clean build
89
+ xcodebuild clean \
90
+ -scheme <AppName> \
91
+ -destination 'generic/platform=macOS'
92
+
93
+ # Archive
94
+ xcodebuild archive \
95
+ -scheme <AppName> \
96
+ -archivePath build/<AppName>.xcarchive \
97
+ -destination 'generic/platform=macOS'
98
+
99
+ # Export for App Store
100
+ xcodebuild -exportArchive \
101
+ -archivePath build/<AppName>.xcarchive \
102
+ -exportPath build/export \
103
+ -exportOptionsPlist ExportOptions.plist
104
+ ```
105
+
106
+ Validate codesigning before upload:
107
+
108
+ ```bash
109
+ codesign --verify --deep --strict --verbose=4 build/export/<AppName>.app
110
+ spctl --assess --verbose=4 build/export/<AppName>.app
111
+ ```
112
+
113
+ ### 5. Update App Store Connect Metadata
114
+
115
+ Navigate: **My Apps โ†’ [App] โ†’ App Store tab**
116
+
117
+ Common metadata fixes:
118
+
119
+ - **App name**: max 30 chars
120
+ - **Subtitle**: max 30 chars, no duplicate keywords from the title field
121
+ - **Keywords**: 100-char total limit, comma-separated, no spaces after commas
122
+ - **Screenshots**: exact pixel dimensions per device type (check Apple's current spec)
123
+ - **Privacy Nutrition Labels**: must accurately reflect data collected/linked to user
124
+ - **Build selection**: select the newly uploaded build before submitting
125
+
126
+ ### 6. Write Reviewer Notes
127
+
128
+ In the submission form, fill **Notes for Reviewer**:
129
+
130
+ - Explain each rejection point and what was changed
131
+ - Reference specific guideline numbers: "Addressing 2.1 โ€” added NSMicrophoneUsageDescription to Info.plist"
132
+ - If a feature requires special credentials to test, provide test account details
133
+
134
+ ### 7. Submit and Track
135
+
136
+ 1. Upload via **Xcode Organizer โ†’ Distribute App โ†’ App Store Connect**
137
+ 2. In App Store Connect: select the new build, fill notes, **Submit for Review**
138
+ 3. Typical re-review: 24โ€“48h
139
+ 4. If rejected again: respond in the **Resolution Center** thread (same case number)
140
+ 5. Escalate via Resolution Center for policy disagreements โ€” do not open a new submission
141
+
142
+ ## Build Number Protocol
143
+
144
+ Apple rejects builds with a duplicate build number. Increment `CFBundleVersion` in `Info.plist` or Xcode target settings before every upload:
145
+
146
+ ```bash
147
+ # Bump build number (e.g., 9 โ†’ 10)
148
+ xcrun agvtool new-version -all 10
149
+ ```
150
+
151
+ ## Verification
152
+
153
+ - [ ] Every rejection guideline number has a corresponding fix in the plan
154
+ - [ ] `xcodebuild archive` exits 0 with no warnings about entitlements
155
+ - [ ] `codesign --verify` passes
156
+ - [ ] App Store Connect shows build status as "Ready to Submit"
157
+ - [ ] Reviewer Notes reference each changed item
158
+ - [ ] Build number is higher than any previously uploaded build
@@ -0,0 +1,145 @@
1
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
2
+
3
+ ---
4
+ inclusion: manual
5
+ description: "Handle Apple App Store rejection emails end-to-end: parse rejection reasons, plan fixes, implement code changes, navigate App Store Connect, and resubmit."
6
+ ---
7
+
8
+ > ๐Ÿค– *Auto-generated by **weekly-pattern-learner** ยท App Store rejection handling workflow observed in FocusNotch App Store session, Jun 2026 (92 user turns covering rejection โ†’ plan โ†’ code fixes โ†’ metadata โ†’ resubmit)*
9
+
10
+ # Apple App Store Submission & Rejection Handling
11
+
12
+ ## Overview
13
+
14
+ Parse Apple rejection feedback, implement targeted fixes, update App Store Connect metadata, and resubmit โ€” covering the complete cycle from rejection email to approved build.
15
+
16
+ ## When to Use
17
+
18
+ - Apple review team sends a rejection email
19
+ - App fails automated pre-review checks (binary rejected at upload)
20
+ - Preparing metadata for first-time submission (screenshots, keywords, privacy labels)
21
+ - Resolving App Store Connect errors before submitting for review
22
+
23
+ ## Workflow
24
+
25
+ ### 1. Parse the Rejection
26
+
27
+ Read the full rejection email. Extract and list:
28
+
29
+ - **Guideline numbers** violated (e.g., 2.1, 4.2.0, 5.1.1)
30
+ - **Code-level issues** โ€” missing entitlements, incorrect privacy strings, sandbox violations
31
+ - **Metadata issues** โ€” wrong screenshot sizes, subtitle policy, keyword stuffing
32
+ - **UX issues** โ€” crashes described by reviewer, broken flows, missing functionality
33
+
34
+ Create a numbered fix plan: one item per rejection point, with the type of fix needed.
35
+
36
+ ### 2. Classify Fixes by Type
37
+
38
+ | Type | Location |
39
+ |------|----------|
40
+ | Privacy usage strings missing | `Info.plist` |
41
+ | Entitlement missing/wrong | `<AppName>.entitlements` |
42
+ | Crash or broken feature | Source code |
43
+ | Screenshots wrong size/content | App Store Connect |
44
+ | Keywords/subtitle/description | App Store Connect |
45
+ | Build number conflict | Xcode + App Store Connect |
46
+
47
+ ### 3. Implement Code Fixes
48
+
49
+ **Privacy permission strings** (`Info.plist`):
50
+
51
+ ```xml
52
+ <key>NSMicrophoneUsageDescription</key>
53
+ <string>Used for voice input during focus sessions.</string>
54
+
55
+ <key>NSCalendarsUsageDescription</key>
56
+ <string>Used to sync tasks with your calendar.</string>
57
+ ```
58
+
59
+ **Entitlements** (`<AppName>.entitlements`):
60
+
61
+ ```xml
62
+ <key>com.apple.security.app-sandbox</key>
63
+ <true/>
64
+ <key>com.apple.security.network.client</key>
65
+ <true/>
66
+ <key>com.apple.security.files.user-selected.read-write</key>
67
+ <true/>
68
+ ```
69
+
70
+ **Sandbox violations** โ€” remove `NoEscapeBlock` patterns, replace deprecated APIs, use only sandboxed file access via Security-Scoped Bookmarks when needed.
71
+
72
+ ### 4. Build and Archive
73
+
74
+ ```bash
75
+ # Clean build
76
+ xcodebuild clean \
77
+ -scheme <AppName> \
78
+ -destination 'generic/platform=macOS'
79
+
80
+ # Archive
81
+ xcodebuild archive \
82
+ -scheme <AppName> \
83
+ -archivePath build/<AppName>.xcarchive \
84
+ -destination 'generic/platform=macOS'
85
+
86
+ # Export for App Store
87
+ xcodebuild -exportArchive \
88
+ -archivePath build/<AppName>.xcarchive \
89
+ -exportPath build/export \
90
+ -exportOptionsPlist ExportOptions.plist
91
+ ```
92
+
93
+ Validate codesigning before upload:
94
+
95
+ ```bash
96
+ codesign --verify --deep --strict --verbose=4 build/export/<AppName>.app
97
+ spctl --assess --verbose=4 build/export/<AppName>.app
98
+ ```
99
+
100
+ ### 5. Update App Store Connect Metadata
101
+
102
+ Navigate: **My Apps โ†’ [App] โ†’ App Store tab**
103
+
104
+ Common metadata fixes:
105
+
106
+ - **App name**: max 30 chars
107
+ - **Subtitle**: max 30 chars, no duplicate keywords from the title field
108
+ - **Keywords**: 100-char total limit, comma-separated, no spaces after commas
109
+ - **Screenshots**: exact pixel dimensions per device type (check Apple's current spec)
110
+ - **Privacy Nutrition Labels**: must accurately reflect data collected/linked to user
111
+ - **Build selection**: select the newly uploaded build before submitting
112
+
113
+ ### 6. Write Reviewer Notes
114
+
115
+ In the submission form, fill **Notes for Reviewer**:
116
+
117
+ - Explain each rejection point and what was changed
118
+ - Reference specific guideline numbers: "Addressing 2.1 โ€” added NSMicrophoneUsageDescription to Info.plist"
119
+ - If a feature requires special credentials to test, provide test account details
120
+
121
+ ### 7. Submit and Track
122
+
123
+ 1. Upload via **Xcode Organizer โ†’ Distribute App โ†’ App Store Connect**
124
+ 2. In App Store Connect: select the new build, fill notes, **Submit for Review**
125
+ 3. Typical re-review: 24โ€“48h
126
+ 4. If rejected again: respond in the **Resolution Center** thread (same case number)
127
+ 5. Escalate via Resolution Center for policy disagreements โ€” do not open a new submission
128
+
129
+ ## Build Number Protocol
130
+
131
+ Apple rejects builds with a duplicate build number. Increment `CFBundleVersion` in `Info.plist` or Xcode target settings before every upload:
132
+
133
+ ```bash
134
+ # Bump build number (e.g., 9 โ†’ 10)
135
+ xcrun agvtool new-version -all 10
136
+ ```
137
+
138
+ ## Verification
139
+
140
+ - [ ] Every rejection guideline number has a corresponding fix in the plan
141
+ - [ ] `xcodebuild archive` exits 0 with no warnings about entitlements
142
+ - [ ] `codesign --verify` passes
143
+ - [ ] App Store Connect shows build status as "Ready to Submit"
144
+ - [ ] Reviewer Notes reference each changed item
145
+ - [ ] Build number is higher than any previously uploaded build
@@ -0,0 +1,144 @@
1
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
2
+
3
+ ---
4
+ description: "Handle Apple App Store rejection emails end-to-end: parse rejection reasons, plan fixes, implement code changes, navigate App Store Connect, and resubmit."
5
+ ---
6
+
7
+ > ๐Ÿค– *Auto-generated by **weekly-pattern-learner** ยท App Store rejection handling workflow observed in FocusNotch App Store session, Jun 2026 (92 user turns covering rejection โ†’ plan โ†’ code fixes โ†’ metadata โ†’ resubmit)*
8
+
9
+ # Apple App Store Submission & Rejection Handling
10
+
11
+ ## Overview
12
+
13
+ Parse Apple rejection feedback, implement targeted fixes, update App Store Connect metadata, and resubmit โ€” covering the complete cycle from rejection email to approved build.
14
+
15
+ ## When to Use
16
+
17
+ - Apple review team sends a rejection email
18
+ - App fails automated pre-review checks (binary rejected at upload)
19
+ - Preparing metadata for first-time submission (screenshots, keywords, privacy labels)
20
+ - Resolving App Store Connect errors before submitting for review
21
+
22
+ ## Workflow
23
+
24
+ ### 1. Parse the Rejection
25
+
26
+ Read the full rejection email. Extract and list:
27
+
28
+ - **Guideline numbers** violated (e.g., 2.1, 4.2.0, 5.1.1)
29
+ - **Code-level issues** โ€” missing entitlements, incorrect privacy strings, sandbox violations
30
+ - **Metadata issues** โ€” wrong screenshot sizes, subtitle policy, keyword stuffing
31
+ - **UX issues** โ€” crashes described by reviewer, broken flows, missing functionality
32
+
33
+ Create a numbered fix plan: one item per rejection point, with the type of fix needed.
34
+
35
+ ### 2. Classify Fixes by Type
36
+
37
+ | Type | Location |
38
+ |------|----------|
39
+ | Privacy usage strings missing | `Info.plist` |
40
+ | Entitlement missing/wrong | `<AppName>.entitlements` |
41
+ | Crash or broken feature | Source code |
42
+ | Screenshots wrong size/content | App Store Connect |
43
+ | Keywords/subtitle/description | App Store Connect |
44
+ | Build number conflict | Xcode + App Store Connect |
45
+
46
+ ### 3. Implement Code Fixes
47
+
48
+ **Privacy permission strings** (`Info.plist`):
49
+
50
+ ```xml
51
+ <key>NSMicrophoneUsageDescription</key>
52
+ <string>Used for voice input during focus sessions.</string>
53
+
54
+ <key>NSCalendarsUsageDescription</key>
55
+ <string>Used to sync tasks with your calendar.</string>
56
+ ```
57
+
58
+ **Entitlements** (`<AppName>.entitlements`):
59
+
60
+ ```xml
61
+ <key>com.apple.security.app-sandbox</key>
62
+ <true/>
63
+ <key>com.apple.security.network.client</key>
64
+ <true/>
65
+ <key>com.apple.security.files.user-selected.read-write</key>
66
+ <true/>
67
+ ```
68
+
69
+ **Sandbox violations** โ€” remove `NoEscapeBlock` patterns, replace deprecated APIs, use only sandboxed file access via Security-Scoped Bookmarks when needed.
70
+
71
+ ### 4. Build and Archive
72
+
73
+ ```bash
74
+ # Clean build
75
+ xcodebuild clean \
76
+ -scheme <AppName> \
77
+ -destination 'generic/platform=macOS'
78
+
79
+ # Archive
80
+ xcodebuild archive \
81
+ -scheme <AppName> \
82
+ -archivePath build/<AppName>.xcarchive \
83
+ -destination 'generic/platform=macOS'
84
+
85
+ # Export for App Store
86
+ xcodebuild -exportArchive \
87
+ -archivePath build/<AppName>.xcarchive \
88
+ -exportPath build/export \
89
+ -exportOptionsPlist ExportOptions.plist
90
+ ```
91
+
92
+ Validate codesigning before upload:
93
+
94
+ ```bash
95
+ codesign --verify --deep --strict --verbose=4 build/export/<AppName>.app
96
+ spctl --assess --verbose=4 build/export/<AppName>.app
97
+ ```
98
+
99
+ ### 5. Update App Store Connect Metadata
100
+
101
+ Navigate: **My Apps โ†’ [App] โ†’ App Store tab**
102
+
103
+ Common metadata fixes:
104
+
105
+ - **App name**: max 30 chars
106
+ - **Subtitle**: max 30 chars, no duplicate keywords from the title field
107
+ - **Keywords**: 100-char total limit, comma-separated, no spaces after commas
108
+ - **Screenshots**: exact pixel dimensions per device type (check Apple's current spec)
109
+ - **Privacy Nutrition Labels**: must accurately reflect data collected/linked to user
110
+ - **Build selection**: select the newly uploaded build before submitting
111
+
112
+ ### 6. Write Reviewer Notes
113
+
114
+ In the submission form, fill **Notes for Reviewer**:
115
+
116
+ - Explain each rejection point and what was changed
117
+ - Reference specific guideline numbers: "Addressing 2.1 โ€” added NSMicrophoneUsageDescription to Info.plist"
118
+ - If a feature requires special credentials to test, provide test account details
119
+
120
+ ### 7. Submit and Track
121
+
122
+ 1. Upload via **Xcode Organizer โ†’ Distribute App โ†’ App Store Connect**
123
+ 2. In App Store Connect: select the new build, fill notes, **Submit for Review**
124
+ 3. Typical re-review: 24โ€“48h
125
+ 4. If rejected again: respond in the **Resolution Center** thread (same case number)
126
+ 5. Escalate via Resolution Center for policy disagreements โ€” do not open a new submission
127
+
128
+ ## Build Number Protocol
129
+
130
+ Apple rejects builds with a duplicate build number. Increment `CFBundleVersion` in `Info.plist` or Xcode target settings before every upload:
131
+
132
+ ```bash
133
+ # Bump build number (e.g., 9 โ†’ 10)
134
+ xcrun agvtool new-version -all 10
135
+ ```
136
+
137
+ ## Verification
138
+
139
+ - [ ] Every rejection guideline number has a corresponding fix in the plan
140
+ - [ ] `xcodebuild archive` exits 0 with no warnings about entitlements
141
+ - [ ] `codesign --verify` passes
142
+ - [ ] App Store Connect shows build status as "Ready to Submit"
143
+ - [ ] Reviewer Notes reference each changed item
144
+ - [ ] Build number is higher than any previously uploaded build
@@ -0,0 +1,237 @@
1
+ ---
2
+ name: macos-menubar-app
3
+ description: Build a production-quality macOS menubar or notch app in SwiftUI โ€” covering MenuBarExtra setup, sandbox entitlements, keyboard shortcuts, sound effects, accessibility permissions, and /critique-driven polish cycles. Use when starting or extending a macOS agent app that lives in the status bar or Mac notch area.
4
+ license: MIT
5
+ allowed-tools: Bash, Read, Write, Edit
6
+ compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires Xcode 15+, macOS 13+ deployment target, and an Apple Developer account for App Store distribution.
7
+ metadata:
8
+ targets: [_source-only]
9
+ author: Oleg Koval
10
+ tags:
11
+ - macos
12
+ - swiftui
13
+ - menubar
14
+ - notch
15
+ - xcode
16
+ - apple
17
+ - sandbox
18
+ ---
19
+
20
+ > ๐Ÿค– *Auto-generated by **weekly-pattern-learner** ยท SwiftUI macOS menubar app pattern observed in FocusNotch session, Jun 2026 (364 user turns, ~48 MB transcript covering idea โ†’ spec โ†’ impl โ†’ critique cycles โ†’ App Store)*
21
+
22
+ # macOS Menubar / Notch App (SwiftUI)
23
+
24
+ ## Overview
25
+
26
+ Build a macOS app that lives in the menu bar or notch using SwiftUI's `MenuBarExtra`. Covers the full lifecycle: project setup, window management, entitlements, user interaction (keyboard shortcuts, sound), and App Store preparation.
27
+
28
+ ## When to Use
29
+
30
+ - User asks to build an app for the macOS menubar, status bar, or notch
31
+ - Adding a menubar presence to an existing macOS app
32
+ - Debugging sandbox rejections or entitlement errors in a SwiftUI app
33
+
34
+ ## Workflow
35
+
36
+ ### 1. Project Setup
37
+
38
+ Create a new macOS App target in Xcode:
39
+
40
+ - **Interface**: SwiftUI
41
+ - **App Sandbox**: Enabled (required for App Store)
42
+ - **Bundle ID**: `com.yourname.AppName`
43
+ - **Deployment target**: macOS 13+ (for `MenuBarExtra`)
44
+
45
+ In `Info.plist`, set:
46
+
47
+ ```xml
48
+ <key>LSUIElement</key>
49
+ <true/>
50
+ ```
51
+
52
+ This hides the app from the Dock โ€” the menu bar becomes the only entry point.
53
+
54
+ ### 2. MenuBarExtra (SwiftUI native)
55
+
56
+ ```swift
57
+ @main
58
+ struct FocusApp: App {
59
+ var body: some Scene {
60
+ MenuBarExtra {
61
+ ContentView()
62
+ .frame(width: 320, height: 480)
63
+ } label: {
64
+ Label("Focus", systemImage: "timer")
65
+ }
66
+ .menuBarExtraStyle(.window)
67
+ }
68
+ }
69
+ ```
70
+
71
+ Use `.menuBarExtraStyle(.window)` for a popover-style panel. Use `.menuBarExtraStyle(.menu)` for a dropdown menu.
72
+
73
+ ### 3. Notch Detection
74
+
75
+ On MacBooks with a notch, the safe area changes. Detect and adapt:
76
+
77
+ ```swift
78
+ func isNotchPresent() -> Bool {
79
+ guard let screen = NSScreen.main else { return false }
80
+ // The notch area is excluded from visibleFrame top
81
+ let screenHeight = screen.frame.height
82
+ let visibleTop = screen.visibleFrame.maxY
83
+ return visibleTop < screenHeight
84
+ }
85
+ ```
86
+
87
+ Position windows below the notch:
88
+
89
+ ```swift
90
+ window.setFrameOrigin(NSPoint(
91
+ x: window.frame.origin.x,
92
+ y: NSScreen.main!.frame.height - window.frame.height - notchOffset
93
+ ))
94
+ ```
95
+
96
+ ### 4. Sandbox Entitlements
97
+
98
+ Minimum `.entitlements` for a sandboxed menubar app:
99
+
100
+ ```xml
101
+ <?xml version="1.0" encoding="UTF-8"?>
102
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
103
+ <plist version="1.0">
104
+ <dict>
105
+ <key>com.apple.security.app-sandbox</key>
106
+ <true/>
107
+ <!-- Add only what the app actually uses: -->
108
+ <!-- <key>com.apple.security.network.client</key> -->
109
+ <!-- <true/> -->
110
+ </dict>
111
+ </plist>
112
+ ```
113
+
114
+ For focus/blocking features that need accessibility:
115
+
116
+ ```xml
117
+ <key>com.apple.security.temporary-exception.apple-events</key>
118
+ <array>
119
+ <string>com.apple.systemevents</string>
120
+ </array>
121
+ ```
122
+
123
+ ### 5. Accessibility Permission (Focus Detection)
124
+
125
+ To detect which app is in focus (required for distraction blocking):
126
+
127
+ ```swift
128
+ import ApplicationServices
129
+
130
+ func requestAccessibilityPermission() -> Bool {
131
+ let options: NSDictionary = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true]
132
+ return AXIsProcessTrustedWithOptions(options)
133
+ }
134
+ ```
135
+
136
+ Call this on first launch and prompt the user to grant access in **System Settings โ†’ Privacy โ†’ Accessibility**.
137
+
138
+ ### 6. Sound Effects
139
+
140
+ ```swift
141
+ import AVFoundation
142
+
143
+ class SoundPlayer {
144
+ private var player: AVAudioPlayer?
145
+
146
+ func play(_ filename: String, extension ext: String = "mp3") {
147
+ guard let url = Bundle.main.url(forResource: filename, withExtension: ext) else { return }
148
+ player = try? AVAudioPlayer(contentsOf: url)
149
+ player?.play()
150
+ }
151
+ }
152
+ ```
153
+
154
+ Add sound files to the Xcode target (check **Target Membership** in file inspector).
155
+
156
+ For system sounds (no file needed):
157
+
158
+ ```swift
159
+ NSSound.beep()
160
+ // or
161
+ NSSound(named: .init("Hero"))?.play()
162
+ ```
163
+
164
+ ### 7. Keyboard Shortcuts
165
+
166
+ Global shortcuts (work when app is not focused) โ€” requires Accessibility permission:
167
+
168
+ ```swift
169
+ NSEvent.addGlobalMonitorForEvents(matching: .keyDown) { event in
170
+ if event.modifierFlags.contains([.command, .shift]) && event.keyCode == 36 { // โŒ˜โ‡งโ†ฉ
171
+ // Handle shortcut
172
+ }
173
+ }
174
+ ```
175
+
176
+ Local shortcuts (SwiftUI):
177
+
178
+ ```swift
179
+ .keyboardShortcut("s", modifiers: [.command, .shift])
180
+ ```
181
+
182
+ ### 8. Persistent State (AppStorage)
183
+
184
+ ```swift
185
+ @AppStorage("timerDuration") private var timerDuration: Double = 25 * 60
186
+ @AppStorage("soundEnabled") private var soundEnabled: Bool = true
187
+ ```
188
+
189
+ For complex state, use `UserDefaults` with a suite name to share across extensions.
190
+
191
+ ### 9. Polish Cycle
192
+
193
+ After each implementation slice:
194
+
195
+ > **Optional skills**: Steps 1 and 3 require `/critique` and `/whimsy-injector` from the agent-skills catalog. Install them via `skillshare` if not already available; skip these steps if not installed.
196
+
197
+ 1. Run `/critique` โ€” evaluate against Apple HIG, WCAG contrast, interaction consistency
198
+ 2. Fix all P0/P1 findings
199
+ 3. Run `/whimsy-injector` on completion screens and idle states
200
+ 4. Test on a machine **without** a notch to verify layout
201
+
202
+ ### 10. App Store Preparation
203
+
204
+ See `olko:apple-store-submit` for the full submission and rejection-handling workflow.
205
+
206
+ Pre-submission checklist:
207
+
208
+ ```bash
209
+ # Validate archive
210
+ xcodebuild archive -scheme <AppName> -archivePath build/<AppName>.xcarchive
211
+
212
+ # Check sandbox
213
+ codesign --verify --deep --strict build/<AppName>.xcarchive/Products/Applications/<AppName>.app
214
+
215
+ # Verify entitlements
216
+ codesign -d --entitlements :- build/<AppName>.xcarchive/Products/Applications/<AppName>.app
217
+ ```
218
+
219
+ ## Key Pitfalls
220
+
221
+ | Symptom | Cause | Fix |
222
+ |---------|-------|-----|
223
+ | App appears in Dock | `LSUIElement` missing | Add to `Info.plist` |
224
+ | Menubar icon missing after build | Asset catalog misconfigured | Use PDF or SVG template image, tick **Template Image** |
225
+ | Crash on click | View not loaded in popover window | Add `.frame()` to `MenuBarExtra` content |
226
+ | Sound not playing | File not in target | Check Target Membership in file inspector |
227
+ | Accessibility prompt not shown | Missing entitlement | Add `temporary-exception.apple-events` or use XPC |
228
+ | Notch overlap | Hardcoded y-position | Detect `visibleFrame` vs `frame` delta |
229
+
230
+ ## Verification
231
+
232
+ - [ ] App does not appear in Dock (`LSUIElement` = true)
233
+ - [ ] MenuBarExtra icon renders as template image (respects dark/light mode)
234
+ - [ ] Sound plays on timer events
235
+ - [ ] Keyboard shortcuts respond both globally and locally
236
+ - [ ] App passes `codesign --verify --deep --strict`
237
+ - [ ] Layout correct on M1 MacBook (no notch) and M3 MacBook Pro (notch)
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "olko-macos-menubar-app",
3
+ "description": "Build a production-quality macOS menubar or notch app in SwiftUI โ€” MenuBarExtra, sandbox entitlements, keyboard shortcuts, sound effects, accessibility permissions, and App Store preparation.",
4
+ "skills": "./skills"
5
+ }