@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,238 @@
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
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
20
+
21
+ > ๐Ÿค– *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)*
22
+
23
+ # macOS Menubar / Notch App (SwiftUI)
24
+
25
+ ## Overview
26
+
27
+ 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.
28
+
29
+ ## When to Use
30
+
31
+ - User asks to build an app for the macOS menubar, status bar, or notch
32
+ - Adding a menubar presence to an existing macOS app
33
+ - Debugging sandbox rejections or entitlement errors in a SwiftUI app
34
+
35
+ ## Workflow
36
+
37
+ ### 1. Project Setup
38
+
39
+ Create a new macOS App target in Xcode:
40
+
41
+ - **Interface**: SwiftUI
42
+ - **App Sandbox**: Enabled (required for App Store)
43
+ - **Bundle ID**: `com.yourname.AppName`
44
+ - **Deployment target**: macOS 13+ (for `MenuBarExtra`)
45
+
46
+ In `Info.plist`, set:
47
+
48
+ ```xml
49
+ <key>LSUIElement</key>
50
+ <true/>
51
+ ```
52
+
53
+ This hides the app from the Dock โ€” the menu bar becomes the only entry point.
54
+
55
+ ### 2. MenuBarExtra (SwiftUI native)
56
+
57
+ ```swift
58
+ @main
59
+ struct FocusApp: App {
60
+ var body: some Scene {
61
+ MenuBarExtra {
62
+ ContentView()
63
+ .frame(width: 320, height: 480)
64
+ } label: {
65
+ Label("Focus", systemImage: "timer")
66
+ }
67
+ .menuBarExtraStyle(.window)
68
+ }
69
+ }
70
+ ```
71
+
72
+ Use `.menuBarExtraStyle(.window)` for a popover-style panel. Use `.menuBarExtraStyle(.menu)` for a dropdown menu.
73
+
74
+ ### 3. Notch Detection
75
+
76
+ On MacBooks with a notch, the safe area changes. Detect and adapt:
77
+
78
+ ```swift
79
+ func isNotchPresent() -> Bool {
80
+ guard let screen = NSScreen.main else { return false }
81
+ // The notch area is excluded from visibleFrame top
82
+ let screenHeight = screen.frame.height
83
+ let visibleTop = screen.visibleFrame.maxY
84
+ return visibleTop < screenHeight
85
+ }
86
+ ```
87
+
88
+ Position windows below the notch:
89
+
90
+ ```swift
91
+ window.setFrameOrigin(NSPoint(
92
+ x: window.frame.origin.x,
93
+ y: NSScreen.main!.frame.height - window.frame.height - notchOffset
94
+ ))
95
+ ```
96
+
97
+ ### 4. Sandbox Entitlements
98
+
99
+ Minimum `.entitlements` for a sandboxed menubar app:
100
+
101
+ ```xml
102
+ <?xml version="1.0" encoding="UTF-8"?>
103
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
104
+ <plist version="1.0">
105
+ <dict>
106
+ <key>com.apple.security.app-sandbox</key>
107
+ <true/>
108
+ <!-- Add only what the app actually uses: -->
109
+ <!-- <key>com.apple.security.network.client</key> -->
110
+ <!-- <true/> -->
111
+ </dict>
112
+ </plist>
113
+ ```
114
+
115
+ For focus/blocking features that need accessibility:
116
+
117
+ ```xml
118
+ <key>com.apple.security.temporary-exception.apple-events</key>
119
+ <array>
120
+ <string>com.apple.systemevents</string>
121
+ </array>
122
+ ```
123
+
124
+ ### 5. Accessibility Permission (Focus Detection)
125
+
126
+ To detect which app is in focus (required for distraction blocking):
127
+
128
+ ```swift
129
+ import ApplicationServices
130
+
131
+ func requestAccessibilityPermission() -> Bool {
132
+ let options: NSDictionary = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true]
133
+ return AXIsProcessTrustedWithOptions(options)
134
+ }
135
+ ```
136
+
137
+ Call this on first launch and prompt the user to grant access in **System Settings โ†’ Privacy โ†’ Accessibility**.
138
+
139
+ ### 6. Sound Effects
140
+
141
+ ```swift
142
+ import AVFoundation
143
+
144
+ class SoundPlayer {
145
+ private var player: AVAudioPlayer?
146
+
147
+ func play(_ filename: String, extension ext: String = "mp3") {
148
+ guard let url = Bundle.main.url(forResource: filename, withExtension: ext) else { return }
149
+ player = try? AVAudioPlayer(contentsOf: url)
150
+ player?.play()
151
+ }
152
+ }
153
+ ```
154
+
155
+ Add sound files to the Xcode target (check **Target Membership** in file inspector).
156
+
157
+ For system sounds (no file needed):
158
+
159
+ ```swift
160
+ NSSound.beep()
161
+ // or
162
+ NSSound(named: .init("Hero"))?.play()
163
+ ```
164
+
165
+ ### 7. Keyboard Shortcuts
166
+
167
+ Global shortcuts (work when app is not focused) โ€” requires Accessibility permission:
168
+
169
+ ```swift
170
+ NSEvent.addGlobalMonitorForEvents(matching: .keyDown) { event in
171
+ if event.modifierFlags.contains([.command, .shift]) && event.keyCode == 36 { // โŒ˜โ‡งโ†ฉ
172
+ // Handle shortcut
173
+ }
174
+ }
175
+ ```
176
+
177
+ Local shortcuts (SwiftUI):
178
+
179
+ ```swift
180
+ .keyboardShortcut("s", modifiers: [.command, .shift])
181
+ ```
182
+
183
+ ### 8. Persistent State (AppStorage)
184
+
185
+ ```swift
186
+ @AppStorage("timerDuration") private var timerDuration: Double = 25 * 60
187
+ @AppStorage("soundEnabled") private var soundEnabled: Bool = true
188
+ ```
189
+
190
+ For complex state, use `UserDefaults` with a suite name to share across extensions.
191
+
192
+ ### 9. Polish Cycle
193
+
194
+ After each implementation slice:
195
+
196
+ > **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.
197
+
198
+ 1. Run `/critique` โ€” evaluate against Apple HIG, WCAG contrast, interaction consistency
199
+ 2. Fix all P0/P1 findings
200
+ 3. Run `/whimsy-injector` on completion screens and idle states
201
+ 4. Test on a machine **without** a notch to verify layout
202
+
203
+ ### 10. App Store Preparation
204
+
205
+ See `olko:apple-store-submit` for the full submission and rejection-handling workflow.
206
+
207
+ Pre-submission checklist:
208
+
209
+ ```bash
210
+ # Validate archive
211
+ xcodebuild archive -scheme <AppName> -archivePath build/<AppName>.xcarchive
212
+
213
+ # Check sandbox
214
+ codesign --verify --deep --strict build/<AppName>.xcarchive/Products/Applications/<AppName>.app
215
+
216
+ # Verify entitlements
217
+ codesign -d --entitlements :- build/<AppName>.xcarchive/Products/Applications/<AppName>.app
218
+ ```
219
+
220
+ ## Key Pitfalls
221
+
222
+ | Symptom | Cause | Fix |
223
+ |---------|-------|-----|
224
+ | App appears in Dock | `LSUIElement` missing | Add to `Info.plist` |
225
+ | Menubar icon missing after build | Asset catalog misconfigured | Use PDF or SVG template image, tick **Template Image** |
226
+ | Crash on click | View not loaded in popover window | Add `.frame()` to `MenuBarExtra` content |
227
+ | Sound not playing | File not in target | Check Target Membership in file inspector |
228
+ | Accessibility prompt not shown | Missing entitlement | Add `temporary-exception.apple-events` or use XPC |
229
+ | Notch overlap | Hardcoded y-position | Detect `visibleFrame` vs `frame` delta |
230
+
231
+ ## Verification
232
+
233
+ - [ ] App does not appear in Dock (`LSUIElement` = true)
234
+ - [ ] MenuBarExtra icon renders as template image (respects dark/light mode)
235
+ - [ ] Sound plays on timer events
236
+ - [ ] Keyboard shortcuts respond both globally and locally
237
+ - [ ] App passes `codesign --verify --deep --strict`
238
+ - [ ] Layout correct on M1 MacBook (no notch) and M3 MacBook Pro (notch)
@@ -0,0 +1,3 @@
1
+ # Codex adapter
2
+
3
+ Use the canonical skill directly from `packages/software-development/macos-menubar-app/SKILL.md`.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "olko:macos-menubar-app",
3
+ "version": "0.1.0",
4
+ "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.",
5
+ "skills": "skills/"
6
+ }
@@ -0,0 +1,238 @@
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: ["cursor"]
9
+ author: Oleg Koval
10
+ tags:
11
+ - macos
12
+ - swiftui
13
+ - menubar
14
+ - notch
15
+ - xcode
16
+ - apple
17
+ - sandbox
18
+ ---
19
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
20
+
21
+ > ๐Ÿค– *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)*
22
+
23
+ # macOS Menubar / Notch App (SwiftUI)
24
+
25
+ ## Overview
26
+
27
+ 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.
28
+
29
+ ## When to Use
30
+
31
+ - User asks to build an app for the macOS menubar, status bar, or notch
32
+ - Adding a menubar presence to an existing macOS app
33
+ - Debugging sandbox rejections or entitlement errors in a SwiftUI app
34
+
35
+ ## Workflow
36
+
37
+ ### 1. Project Setup
38
+
39
+ Create a new macOS App target in Xcode:
40
+
41
+ - **Interface**: SwiftUI
42
+ - **App Sandbox**: Enabled (required for App Store)
43
+ - **Bundle ID**: `com.yourname.AppName`
44
+ - **Deployment target**: macOS 13+ (for `MenuBarExtra`)
45
+
46
+ In `Info.plist`, set:
47
+
48
+ ```xml
49
+ <key>LSUIElement</key>
50
+ <true/>
51
+ ```
52
+
53
+ This hides the app from the Dock โ€” the menu bar becomes the only entry point.
54
+
55
+ ### 2. MenuBarExtra (SwiftUI native)
56
+
57
+ ```swift
58
+ @main
59
+ struct FocusApp: App {
60
+ var body: some Scene {
61
+ MenuBarExtra {
62
+ ContentView()
63
+ .frame(width: 320, height: 480)
64
+ } label: {
65
+ Label("Focus", systemImage: "timer")
66
+ }
67
+ .menuBarExtraStyle(.window)
68
+ }
69
+ }
70
+ ```
71
+
72
+ Use `.menuBarExtraStyle(.window)` for a popover-style panel. Use `.menuBarExtraStyle(.menu)` for a dropdown menu.
73
+
74
+ ### 3. Notch Detection
75
+
76
+ On MacBooks with a notch, the safe area changes. Detect and adapt:
77
+
78
+ ```swift
79
+ func isNotchPresent() -> Bool {
80
+ guard let screen = NSScreen.main else { return false }
81
+ // The notch area is excluded from visibleFrame top
82
+ let screenHeight = screen.frame.height
83
+ let visibleTop = screen.visibleFrame.maxY
84
+ return visibleTop < screenHeight
85
+ }
86
+ ```
87
+
88
+ Position windows below the notch:
89
+
90
+ ```swift
91
+ window.setFrameOrigin(NSPoint(
92
+ x: window.frame.origin.x,
93
+ y: NSScreen.main!.frame.height - window.frame.height - notchOffset
94
+ ))
95
+ ```
96
+
97
+ ### 4. Sandbox Entitlements
98
+
99
+ Minimum `.entitlements` for a sandboxed menubar app:
100
+
101
+ ```xml
102
+ <?xml version="1.0" encoding="UTF-8"?>
103
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
104
+ <plist version="1.0">
105
+ <dict>
106
+ <key>com.apple.security.app-sandbox</key>
107
+ <true/>
108
+ <!-- Add only what the app actually uses: -->
109
+ <!-- <key>com.apple.security.network.client</key> -->
110
+ <!-- <true/> -->
111
+ </dict>
112
+ </plist>
113
+ ```
114
+
115
+ For focus/blocking features that need accessibility:
116
+
117
+ ```xml
118
+ <key>com.apple.security.temporary-exception.apple-events</key>
119
+ <array>
120
+ <string>com.apple.systemevents</string>
121
+ </array>
122
+ ```
123
+
124
+ ### 5. Accessibility Permission (Focus Detection)
125
+
126
+ To detect which app is in focus (required for distraction blocking):
127
+
128
+ ```swift
129
+ import ApplicationServices
130
+
131
+ func requestAccessibilityPermission() -> Bool {
132
+ let options: NSDictionary = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true]
133
+ return AXIsProcessTrustedWithOptions(options)
134
+ }
135
+ ```
136
+
137
+ Call this on first launch and prompt the user to grant access in **System Settings โ†’ Privacy โ†’ Accessibility**.
138
+
139
+ ### 6. Sound Effects
140
+
141
+ ```swift
142
+ import AVFoundation
143
+
144
+ class SoundPlayer {
145
+ private var player: AVAudioPlayer?
146
+
147
+ func play(_ filename: String, extension ext: String = "mp3") {
148
+ guard let url = Bundle.main.url(forResource: filename, withExtension: ext) else { return }
149
+ player = try? AVAudioPlayer(contentsOf: url)
150
+ player?.play()
151
+ }
152
+ }
153
+ ```
154
+
155
+ Add sound files to the Xcode target (check **Target Membership** in file inspector).
156
+
157
+ For system sounds (no file needed):
158
+
159
+ ```swift
160
+ NSSound.beep()
161
+ // or
162
+ NSSound(named: .init("Hero"))?.play()
163
+ ```
164
+
165
+ ### 7. Keyboard Shortcuts
166
+
167
+ Global shortcuts (work when app is not focused) โ€” requires Accessibility permission:
168
+
169
+ ```swift
170
+ NSEvent.addGlobalMonitorForEvents(matching: .keyDown) { event in
171
+ if event.modifierFlags.contains([.command, .shift]) && event.keyCode == 36 { // โŒ˜โ‡งโ†ฉ
172
+ // Handle shortcut
173
+ }
174
+ }
175
+ ```
176
+
177
+ Local shortcuts (SwiftUI):
178
+
179
+ ```swift
180
+ .keyboardShortcut("s", modifiers: [.command, .shift])
181
+ ```
182
+
183
+ ### 8. Persistent State (AppStorage)
184
+
185
+ ```swift
186
+ @AppStorage("timerDuration") private var timerDuration: Double = 25 * 60
187
+ @AppStorage("soundEnabled") private var soundEnabled: Bool = true
188
+ ```
189
+
190
+ For complex state, use `UserDefaults` with a suite name to share across extensions.
191
+
192
+ ### 9. Polish Cycle
193
+
194
+ After each implementation slice:
195
+
196
+ > **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.
197
+
198
+ 1. Run `/critique` โ€” evaluate against Apple HIG, WCAG contrast, interaction consistency
199
+ 2. Fix all P0/P1 findings
200
+ 3. Run `/whimsy-injector` on completion screens and idle states
201
+ 4. Test on a machine **without** a notch to verify layout
202
+
203
+ ### 10. App Store Preparation
204
+
205
+ See `olko:apple-store-submit` for the full submission and rejection-handling workflow.
206
+
207
+ Pre-submission checklist:
208
+
209
+ ```bash
210
+ # Validate archive
211
+ xcodebuild archive -scheme <AppName> -archivePath build/<AppName>.xcarchive
212
+
213
+ # Check sandbox
214
+ codesign --verify --deep --strict build/<AppName>.xcarchive/Products/Applications/<AppName>.app
215
+
216
+ # Verify entitlements
217
+ codesign -d --entitlements :- build/<AppName>.xcarchive/Products/Applications/<AppName>.app
218
+ ```
219
+
220
+ ## Key Pitfalls
221
+
222
+ | Symptom | Cause | Fix |
223
+ |---------|-------|-----|
224
+ | App appears in Dock | `LSUIElement` missing | Add to `Info.plist` |
225
+ | Menubar icon missing after build | Asset catalog misconfigured | Use PDF or SVG template image, tick **Template Image** |
226
+ | Crash on click | View not loaded in popover window | Add `.frame()` to `MenuBarExtra` content |
227
+ | Sound not playing | File not in target | Check Target Membership in file inspector |
228
+ | Accessibility prompt not shown | Missing entitlement | Add `temporary-exception.apple-events` or use XPC |
229
+ | Notch overlap | Hardcoded y-position | Detect `visibleFrame` vs `frame` delta |
230
+
231
+ ## Verification
232
+
233
+ - [ ] App does not appear in Dock (`LSUIElement` = true)
234
+ - [ ] MenuBarExtra icon renders as template image (respects dark/light mode)
235
+ - [ ] Sound plays on timer events
236
+ - [ ] Keyboard shortcuts respond both globally and locally
237
+ - [ ] App passes `codesign --verify --deep --strict`
238
+ - [ ] Layout correct on M1 MacBook (no notch) and M3 MacBook Pro (notch)