@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.
- package/.claude-plugin/plugin.json +5 -2
- package/.cursor-plugin/index.json +10 -0
- package/.kiro/steering/apple-store-submit.md +146 -0
- package/.kiro/steering/macos-menubar-app.md +226 -0
- package/.windsurf/rules/apple-store-submit.md +145 -0
- package/.windsurf/rules/macos-menubar-app.md +225 -0
- package/catalog/skills.json +66 -0
- package/package.json +1 -1
- package/packages/software-development/apple-store-submit/SKILL.md +157 -0
- package/packages/software-development/apple-store-submit/adapters/claude/plugin.json +5 -0
- package/packages/software-development/apple-store-submit/adapters/claude/skills/apple-store-submit/SKILL.md +158 -0
- package/packages/software-development/apple-store-submit/adapters/codex/README.md +3 -0
- package/packages/software-development/apple-store-submit/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/apple-store-submit/adapters/cursor/skills/apple-store-submit/SKILL.md +158 -0
- package/packages/software-development/apple-store-submit/adapters/kiro/steering/apple-store-submit.md +145 -0
- package/packages/software-development/apple-store-submit/adapters/windsurf/rules/apple-store-submit.md +144 -0
- package/packages/software-development/macos-menubar-app/SKILL.md +237 -0
- package/packages/software-development/macos-menubar-app/adapters/claude/plugin.json +5 -0
- package/packages/software-development/macos-menubar-app/adapters/claude/skills/macos-menubar-app/SKILL.md +238 -0
- package/packages/software-development/macos-menubar-app/adapters/codex/README.md +3 -0
- package/packages/software-development/macos-menubar-app/adapters/cursor/plugin.json +6 -0
- package/packages/software-development/macos-menubar-app/adapters/cursor/skills/macos-menubar-app/SKILL.md +238 -0
- package/packages/software-development/macos-menubar-app/adapters/kiro/steering/macos-menubar-app.md +225 -0
- package/packages/software-development/macos-menubar-app/adapters/windsurf/rules/macos-menubar-app.md +224 -0
- package/packages/software-development/skill-budget-audit/SKILL.md +145 -0
- package/packages/software-development/skill-budget-audit/adapters/claude/plugin.json +5 -0
- package/packages/software-development/skill-budget-audit/adapters/claude/skills/skill-budget-audit/SKILL.md +146 -0
- package/scripts/build-adapters.sh +8 -6
package/packages/software-development/macos-menubar-app/adapters/kiro/steering/macos-menubar-app.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
inclusion: manual
|
|
5
|
+
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."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
> ๐ค *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)*
|
|
9
|
+
|
|
10
|
+
# macOS Menubar / Notch App (SwiftUI)
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
- User asks to build an app for the macOS menubar, status bar, or notch
|
|
19
|
+
- Adding a menubar presence to an existing macOS app
|
|
20
|
+
- Debugging sandbox rejections or entitlement errors in a SwiftUI app
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
### 1. Project Setup
|
|
25
|
+
|
|
26
|
+
Create a new macOS App target in Xcode:
|
|
27
|
+
|
|
28
|
+
- **Interface**: SwiftUI
|
|
29
|
+
- **App Sandbox**: Enabled (required for App Store)
|
|
30
|
+
- **Bundle ID**: `com.yourname.AppName`
|
|
31
|
+
- **Deployment target**: macOS 13+ (for `MenuBarExtra`)
|
|
32
|
+
|
|
33
|
+
In `Info.plist`, set:
|
|
34
|
+
|
|
35
|
+
```xml
|
|
36
|
+
<key>LSUIElement</key>
|
|
37
|
+
<true/>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This hides the app from the Dock โ the menu bar becomes the only entry point.
|
|
41
|
+
|
|
42
|
+
### 2. MenuBarExtra (SwiftUI native)
|
|
43
|
+
|
|
44
|
+
```swift
|
|
45
|
+
@main
|
|
46
|
+
struct FocusApp: App {
|
|
47
|
+
var body: some Scene {
|
|
48
|
+
MenuBarExtra {
|
|
49
|
+
ContentView()
|
|
50
|
+
.frame(width: 320, height: 480)
|
|
51
|
+
} label: {
|
|
52
|
+
Label("Focus", systemImage: "timer")
|
|
53
|
+
}
|
|
54
|
+
.menuBarExtraStyle(.window)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use `.menuBarExtraStyle(.window)` for a popover-style panel. Use `.menuBarExtraStyle(.menu)` for a dropdown menu.
|
|
60
|
+
|
|
61
|
+
### 3. Notch Detection
|
|
62
|
+
|
|
63
|
+
On MacBooks with a notch, the safe area changes. Detect and adapt:
|
|
64
|
+
|
|
65
|
+
```swift
|
|
66
|
+
func isNotchPresent() -> Bool {
|
|
67
|
+
guard let screen = NSScreen.main else { return false }
|
|
68
|
+
// The notch area is excluded from visibleFrame top
|
|
69
|
+
let screenHeight = screen.frame.height
|
|
70
|
+
let visibleTop = screen.visibleFrame.maxY
|
|
71
|
+
return visibleTop < screenHeight
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Position windows below the notch:
|
|
76
|
+
|
|
77
|
+
```swift
|
|
78
|
+
window.setFrameOrigin(NSPoint(
|
|
79
|
+
x: window.frame.origin.x,
|
|
80
|
+
y: NSScreen.main!.frame.height - window.frame.height - notchOffset
|
|
81
|
+
))
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 4. Sandbox Entitlements
|
|
85
|
+
|
|
86
|
+
Minimum `.entitlements` for a sandboxed menubar app:
|
|
87
|
+
|
|
88
|
+
```xml
|
|
89
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
90
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
91
|
+
<plist version="1.0">
|
|
92
|
+
<dict>
|
|
93
|
+
<key>com.apple.security.app-sandbox</key>
|
|
94
|
+
<true/>
|
|
95
|
+
<!-- Add only what the app actually uses: -->
|
|
96
|
+
<!-- <key>com.apple.security.network.client</key> -->
|
|
97
|
+
<!-- <true/> -->
|
|
98
|
+
</dict>
|
|
99
|
+
</plist>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
For focus/blocking features that need accessibility:
|
|
103
|
+
|
|
104
|
+
```xml
|
|
105
|
+
<key>com.apple.security.temporary-exception.apple-events</key>
|
|
106
|
+
<array>
|
|
107
|
+
<string>com.apple.systemevents</string>
|
|
108
|
+
</array>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 5. Accessibility Permission (Focus Detection)
|
|
112
|
+
|
|
113
|
+
To detect which app is in focus (required for distraction blocking):
|
|
114
|
+
|
|
115
|
+
```swift
|
|
116
|
+
import ApplicationServices
|
|
117
|
+
|
|
118
|
+
func requestAccessibilityPermission() -> Bool {
|
|
119
|
+
let options: NSDictionary = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true]
|
|
120
|
+
return AXIsProcessTrustedWithOptions(options)
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Call this on first launch and prompt the user to grant access in **System Settings โ Privacy โ Accessibility**.
|
|
125
|
+
|
|
126
|
+
### 6. Sound Effects
|
|
127
|
+
|
|
128
|
+
```swift
|
|
129
|
+
import AVFoundation
|
|
130
|
+
|
|
131
|
+
class SoundPlayer {
|
|
132
|
+
private var player: AVAudioPlayer?
|
|
133
|
+
|
|
134
|
+
func play(_ filename: String, extension ext: String = "mp3") {
|
|
135
|
+
guard let url = Bundle.main.url(forResource: filename, withExtension: ext) else { return }
|
|
136
|
+
player = try? AVAudioPlayer(contentsOf: url)
|
|
137
|
+
player?.play()
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Add sound files to the Xcode target (check **Target Membership** in file inspector).
|
|
143
|
+
|
|
144
|
+
For system sounds (no file needed):
|
|
145
|
+
|
|
146
|
+
```swift
|
|
147
|
+
NSSound.beep()
|
|
148
|
+
// or
|
|
149
|
+
NSSound(named: .init("Hero"))?.play()
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 7. Keyboard Shortcuts
|
|
153
|
+
|
|
154
|
+
Global shortcuts (work when app is not focused) โ requires Accessibility permission:
|
|
155
|
+
|
|
156
|
+
```swift
|
|
157
|
+
NSEvent.addGlobalMonitorForEvents(matching: .keyDown) { event in
|
|
158
|
+
if event.modifierFlags.contains([.command, .shift]) && event.keyCode == 36 { // โโงโฉ
|
|
159
|
+
// Handle shortcut
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Local shortcuts (SwiftUI):
|
|
165
|
+
|
|
166
|
+
```swift
|
|
167
|
+
.keyboardShortcut("s", modifiers: [.command, .shift])
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### 8. Persistent State (AppStorage)
|
|
171
|
+
|
|
172
|
+
```swift
|
|
173
|
+
@AppStorage("timerDuration") private var timerDuration: Double = 25 * 60
|
|
174
|
+
@AppStorage("soundEnabled") private var soundEnabled: Bool = true
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
For complex state, use `UserDefaults` with a suite name to share across extensions.
|
|
178
|
+
|
|
179
|
+
### 9. Polish Cycle
|
|
180
|
+
|
|
181
|
+
After each implementation slice:
|
|
182
|
+
|
|
183
|
+
> **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.
|
|
184
|
+
|
|
185
|
+
1. Run `/critique` โ evaluate against Apple HIG, WCAG contrast, interaction consistency
|
|
186
|
+
2. Fix all P0/P1 findings
|
|
187
|
+
3. Run `/whimsy-injector` on completion screens and idle states
|
|
188
|
+
4. Test on a machine **without** a notch to verify layout
|
|
189
|
+
|
|
190
|
+
### 10. App Store Preparation
|
|
191
|
+
|
|
192
|
+
See `olko:apple-store-submit` for the full submission and rejection-handling workflow.
|
|
193
|
+
|
|
194
|
+
Pre-submission checklist:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Validate archive
|
|
198
|
+
xcodebuild archive -scheme <AppName> -archivePath build/<AppName>.xcarchive
|
|
199
|
+
|
|
200
|
+
# Check sandbox
|
|
201
|
+
codesign --verify --deep --strict build/<AppName>.xcarchive/Products/Applications/<AppName>.app
|
|
202
|
+
|
|
203
|
+
# Verify entitlements
|
|
204
|
+
codesign -d --entitlements :- build/<AppName>.xcarchive/Products/Applications/<AppName>.app
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Key Pitfalls
|
|
208
|
+
|
|
209
|
+
| Symptom | Cause | Fix |
|
|
210
|
+
|---------|-------|-----|
|
|
211
|
+
| App appears in Dock | `LSUIElement` missing | Add to `Info.plist` |
|
|
212
|
+
| Menubar icon missing after build | Asset catalog misconfigured | Use PDF or SVG template image, tick **Template Image** |
|
|
213
|
+
| Crash on click | View not loaded in popover window | Add `.frame()` to `MenuBarExtra` content |
|
|
214
|
+
| Sound not playing | File not in target | Check Target Membership in file inspector |
|
|
215
|
+
| Accessibility prompt not shown | Missing entitlement | Add `temporary-exception.apple-events` or use XPC |
|
|
216
|
+
| Notch overlap | Hardcoded y-position | Detect `visibleFrame` vs `frame` delta |
|
|
217
|
+
|
|
218
|
+
## Verification
|
|
219
|
+
|
|
220
|
+
- [ ] App does not appear in Dock (`LSUIElement` = true)
|
|
221
|
+
- [ ] MenuBarExtra icon renders as template image (respects dark/light mode)
|
|
222
|
+
- [ ] Sound plays on timer events
|
|
223
|
+
- [ ] Keyboard shortcuts respond both globally and locally
|
|
224
|
+
- [ ] App passes `codesign --verify --deep --strict`
|
|
225
|
+
- [ ] Layout correct on M1 MacBook (no notch) and M3 MacBook Pro (notch)
|
package/packages/software-development/macos-menubar-app/adapters/windsurf/rules/macos-menubar-app.md
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
2
|
+
|
|
3
|
+
---
|
|
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
|
+
---
|
|
6
|
+
|
|
7
|
+
> ๐ค *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)*
|
|
8
|
+
|
|
9
|
+
# macOS Menubar / Notch App (SwiftUI)
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- User asks to build an app for the macOS menubar, status bar, or notch
|
|
18
|
+
- Adding a menubar presence to an existing macOS app
|
|
19
|
+
- Debugging sandbox rejections or entitlement errors in a SwiftUI app
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### 1. Project Setup
|
|
24
|
+
|
|
25
|
+
Create a new macOS App target in Xcode:
|
|
26
|
+
|
|
27
|
+
- **Interface**: SwiftUI
|
|
28
|
+
- **App Sandbox**: Enabled (required for App Store)
|
|
29
|
+
- **Bundle ID**: `com.yourname.AppName`
|
|
30
|
+
- **Deployment target**: macOS 13+ (for `MenuBarExtra`)
|
|
31
|
+
|
|
32
|
+
In `Info.plist`, set:
|
|
33
|
+
|
|
34
|
+
```xml
|
|
35
|
+
<key>LSUIElement</key>
|
|
36
|
+
<true/>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This hides the app from the Dock โ the menu bar becomes the only entry point.
|
|
40
|
+
|
|
41
|
+
### 2. MenuBarExtra (SwiftUI native)
|
|
42
|
+
|
|
43
|
+
```swift
|
|
44
|
+
@main
|
|
45
|
+
struct FocusApp: App {
|
|
46
|
+
var body: some Scene {
|
|
47
|
+
MenuBarExtra {
|
|
48
|
+
ContentView()
|
|
49
|
+
.frame(width: 320, height: 480)
|
|
50
|
+
} label: {
|
|
51
|
+
Label("Focus", systemImage: "timer")
|
|
52
|
+
}
|
|
53
|
+
.menuBarExtraStyle(.window)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use `.menuBarExtraStyle(.window)` for a popover-style panel. Use `.menuBarExtraStyle(.menu)` for a dropdown menu.
|
|
59
|
+
|
|
60
|
+
### 3. Notch Detection
|
|
61
|
+
|
|
62
|
+
On MacBooks with a notch, the safe area changes. Detect and adapt:
|
|
63
|
+
|
|
64
|
+
```swift
|
|
65
|
+
func isNotchPresent() -> Bool {
|
|
66
|
+
guard let screen = NSScreen.main else { return false }
|
|
67
|
+
// The notch area is excluded from visibleFrame top
|
|
68
|
+
let screenHeight = screen.frame.height
|
|
69
|
+
let visibleTop = screen.visibleFrame.maxY
|
|
70
|
+
return visibleTop < screenHeight
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Position windows below the notch:
|
|
75
|
+
|
|
76
|
+
```swift
|
|
77
|
+
window.setFrameOrigin(NSPoint(
|
|
78
|
+
x: window.frame.origin.x,
|
|
79
|
+
y: NSScreen.main!.frame.height - window.frame.height - notchOffset
|
|
80
|
+
))
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 4. Sandbox Entitlements
|
|
84
|
+
|
|
85
|
+
Minimum `.entitlements` for a sandboxed menubar app:
|
|
86
|
+
|
|
87
|
+
```xml
|
|
88
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
89
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
90
|
+
<plist version="1.0">
|
|
91
|
+
<dict>
|
|
92
|
+
<key>com.apple.security.app-sandbox</key>
|
|
93
|
+
<true/>
|
|
94
|
+
<!-- Add only what the app actually uses: -->
|
|
95
|
+
<!-- <key>com.apple.security.network.client</key> -->
|
|
96
|
+
<!-- <true/> -->
|
|
97
|
+
</dict>
|
|
98
|
+
</plist>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
For focus/blocking features that need accessibility:
|
|
102
|
+
|
|
103
|
+
```xml
|
|
104
|
+
<key>com.apple.security.temporary-exception.apple-events</key>
|
|
105
|
+
<array>
|
|
106
|
+
<string>com.apple.systemevents</string>
|
|
107
|
+
</array>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 5. Accessibility Permission (Focus Detection)
|
|
111
|
+
|
|
112
|
+
To detect which app is in focus (required for distraction blocking):
|
|
113
|
+
|
|
114
|
+
```swift
|
|
115
|
+
import ApplicationServices
|
|
116
|
+
|
|
117
|
+
func requestAccessibilityPermission() -> Bool {
|
|
118
|
+
let options: NSDictionary = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true]
|
|
119
|
+
return AXIsProcessTrustedWithOptions(options)
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Call this on first launch and prompt the user to grant access in **System Settings โ Privacy โ Accessibility**.
|
|
124
|
+
|
|
125
|
+
### 6. Sound Effects
|
|
126
|
+
|
|
127
|
+
```swift
|
|
128
|
+
import AVFoundation
|
|
129
|
+
|
|
130
|
+
class SoundPlayer {
|
|
131
|
+
private var player: AVAudioPlayer?
|
|
132
|
+
|
|
133
|
+
func play(_ filename: String, extension ext: String = "mp3") {
|
|
134
|
+
guard let url = Bundle.main.url(forResource: filename, withExtension: ext) else { return }
|
|
135
|
+
player = try? AVAudioPlayer(contentsOf: url)
|
|
136
|
+
player?.play()
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Add sound files to the Xcode target (check **Target Membership** in file inspector).
|
|
142
|
+
|
|
143
|
+
For system sounds (no file needed):
|
|
144
|
+
|
|
145
|
+
```swift
|
|
146
|
+
NSSound.beep()
|
|
147
|
+
// or
|
|
148
|
+
NSSound(named: .init("Hero"))?.play()
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 7. Keyboard Shortcuts
|
|
152
|
+
|
|
153
|
+
Global shortcuts (work when app is not focused) โ requires Accessibility permission:
|
|
154
|
+
|
|
155
|
+
```swift
|
|
156
|
+
NSEvent.addGlobalMonitorForEvents(matching: .keyDown) { event in
|
|
157
|
+
if event.modifierFlags.contains([.command, .shift]) && event.keyCode == 36 { // โโงโฉ
|
|
158
|
+
// Handle shortcut
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Local shortcuts (SwiftUI):
|
|
164
|
+
|
|
165
|
+
```swift
|
|
166
|
+
.keyboardShortcut("s", modifiers: [.command, .shift])
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 8. Persistent State (AppStorage)
|
|
170
|
+
|
|
171
|
+
```swift
|
|
172
|
+
@AppStorage("timerDuration") private var timerDuration: Double = 25 * 60
|
|
173
|
+
@AppStorage("soundEnabled") private var soundEnabled: Bool = true
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
For complex state, use `UserDefaults` with a suite name to share across extensions.
|
|
177
|
+
|
|
178
|
+
### 9. Polish Cycle
|
|
179
|
+
|
|
180
|
+
After each implementation slice:
|
|
181
|
+
|
|
182
|
+
> **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.
|
|
183
|
+
|
|
184
|
+
1. Run `/critique` โ evaluate against Apple HIG, WCAG contrast, interaction consistency
|
|
185
|
+
2. Fix all P0/P1 findings
|
|
186
|
+
3. Run `/whimsy-injector` on completion screens and idle states
|
|
187
|
+
4. Test on a machine **without** a notch to verify layout
|
|
188
|
+
|
|
189
|
+
### 10. App Store Preparation
|
|
190
|
+
|
|
191
|
+
See `olko:apple-store-submit` for the full submission and rejection-handling workflow.
|
|
192
|
+
|
|
193
|
+
Pre-submission checklist:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Validate archive
|
|
197
|
+
xcodebuild archive -scheme <AppName> -archivePath build/<AppName>.xcarchive
|
|
198
|
+
|
|
199
|
+
# Check sandbox
|
|
200
|
+
codesign --verify --deep --strict build/<AppName>.xcarchive/Products/Applications/<AppName>.app
|
|
201
|
+
|
|
202
|
+
# Verify entitlements
|
|
203
|
+
codesign -d --entitlements :- build/<AppName>.xcarchive/Products/Applications/<AppName>.app
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Key Pitfalls
|
|
207
|
+
|
|
208
|
+
| Symptom | Cause | Fix |
|
|
209
|
+
|---------|-------|-----|
|
|
210
|
+
| App appears in Dock | `LSUIElement` missing | Add to `Info.plist` |
|
|
211
|
+
| Menubar icon missing after build | Asset catalog misconfigured | Use PDF or SVG template image, tick **Template Image** |
|
|
212
|
+
| Crash on click | View not loaded in popover window | Add `.frame()` to `MenuBarExtra` content |
|
|
213
|
+
| Sound not playing | File not in target | Check Target Membership in file inspector |
|
|
214
|
+
| Accessibility prompt not shown | Missing entitlement | Add `temporary-exception.apple-events` or use XPC |
|
|
215
|
+
| Notch overlap | Hardcoded y-position | Detect `visibleFrame` vs `frame` delta |
|
|
216
|
+
|
|
217
|
+
## Verification
|
|
218
|
+
|
|
219
|
+
- [ ] App does not appear in Dock (`LSUIElement` = true)
|
|
220
|
+
- [ ] MenuBarExtra icon renders as template image (respects dark/light mode)
|
|
221
|
+
- [ ] Sound plays on timer events
|
|
222
|
+
- [ ] Keyboard shortcuts respond both globally and locally
|
|
223
|
+
- [ ] App passes `codesign --verify --deep --strict`
|
|
224
|
+
- [ ] Layout correct on M1 MacBook (no notch) and M3 MacBook Pro (notch)
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-budget-audit
|
|
3
|
+
description: Diagnose and fix Claude Code's skill context budget overflow โ identify heavy plugin bundles that exceed the 2% budget, remove domain-specific ones, deactivate rarely-used skill sets, and validate the warning clears. Use when Claude Code shows "Exceeded skills context budget" or skill descriptions are stripped.
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit
|
|
6
|
+
compatibility: Claude Code only. Requires access to ~/.claude/ and ~/.claude/plugins/
|
|
7
|
+
metadata:
|
|
8
|
+
targets: [_source-only]
|
|
9
|
+
author: Oleg Koval
|
|
10
|
+
tags:
|
|
11
|
+
- claude-code
|
|
12
|
+
- skills
|
|
13
|
+
- plugins
|
|
14
|
+
- context-budget
|
|
15
|
+
- token-economy
|
|
16
|
+
- performance
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
> ๐ค *Auto-generated by **weekly-pattern-learner** ยท Skill context budget overflow appeared in 2 sessions this week (Jun 2026): initial investigation (7 turns, 742 skills hidden) and cleanup followup (14 turns)*
|
|
20
|
+
|
|
21
|
+
# Skill Context Budget Audit
|
|
22
|
+
|
|
23
|
+
## Overview
|
|
24
|
+
|
|
25
|
+
Claude Code allocates 2% of its context window for skill descriptions. With too many plugins installed, descriptions get stripped and skills become invisible. This skill audits plugin bundles, removes unused domain-specific ones, and restores skill discoverability.
|
|
26
|
+
|
|
27
|
+
## When to Use
|
|
28
|
+
|
|
29
|
+
- Claude Code shows: `โ Exceeded skills context budget of 2%. All skill descriptions were removed and N additional skills hidden.`
|
|
30
|
+
- Skill invocations fail silently or Claude cannot find a skill by name
|
|
31
|
+
- After installing multiple plugin bundles, noticing slowdown or skill lookup failures
|
|
32
|
+
- Periodically as a maintenance step when adding new skill collections
|
|
33
|
+
|
|
34
|
+
## Workflow
|
|
35
|
+
|
|
36
|
+
### 1. Confirm the Symptom
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Check Claude Code logs for context budget warning
|
|
40
|
+
cat ~/.claude/logs/claude-code.log 2>/dev/null | grep -i "skill" | tail -20
|
|
41
|
+
|
|
42
|
+
# Or count installed plugins
|
|
43
|
+
ls ~/.claude/plugins/cache/ | wc -l
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If you see `Exceeded skills context budget` or more than ~20 plugin bundles, proceed.
|
|
47
|
+
|
|
48
|
+
### 2. Inventory Installed Plugins
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# List all installed plugins with size
|
|
52
|
+
du -sh ~/.claude/plugins/cache/*/ 2>/dev/null | sort -rh | head -30
|
|
53
|
+
|
|
54
|
+
# Count skills per bundle
|
|
55
|
+
for dir in ~/.claude/plugins/cache/*/; do
|
|
56
|
+
count=$(find "$dir" -name "*.md" -path "*/skills/*" 2>/dev/null | wc -l | tr -d ' ')
|
|
57
|
+
echo "$count $dir"
|
|
58
|
+
done | sort -rn | head -20
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 3. Identify Removal Candidates
|
|
62
|
+
|
|
63
|
+
Remove bundles that match any of these criteria:
|
|
64
|
+
|
|
65
|
+
| Criterion | Example bundles |
|
|
66
|
+
|-----------|----------------|
|
|
67
|
+
| Domain not active in current projects | `claude-for-financial-services`, `bitwize-music` |
|
|
68
|
+
| Duplicate superpowers installations | Multiple `superpowers-*` versions |
|
|
69
|
+
| Language-specific bundles for inactive languages | `cc-skills-golang` when not working in Go |
|
|
70
|
+
| Bundles with 30+ skills you never invoke | Large catch-all collections |
|
|
71
|
+
|
|
72
|
+
Keep: core workflow skills (superpowers, agent-skills), project-specific skills, personal skill collections.
|
|
73
|
+
|
|
74
|
+
### 4. Remove Heavy Bundles
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# List Claude Code plugins (check settings.json for registered ones)
|
|
78
|
+
cat ~/.claude/settings.json | grep -A 50 '"plugins"'
|
|
79
|
+
# or
|
|
80
|
+
cat ~/.claude/settings.local.json 2>/dev/null | grep -A 50 '"plugins"'
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Remove via Claude Code settings or by editing the plugins list directly:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Backup first
|
|
87
|
+
cp ~/.claude/settings.json ~/.claude/settings.json.bak
|
|
88
|
+
|
|
89
|
+
# Then edit ~/.claude/settings.json to remove plugin entries
|
|
90
|
+
# Remove entries like:
|
|
91
|
+
# "claude-for-financial-services"
|
|
92
|
+
# "bitwize-music"
|
|
93
|
+
# duplicate superpowers entries
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Remove cached plugin directories:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
cache_dir="$HOME/.claude/plugins/cache/<bundle-name>"
|
|
100
|
+
if [ -d "$cache_dir" ]; then
|
|
101
|
+
rm -rf "$cache_dir"
|
|
102
|
+
fi
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 5. Conditionally Load Heavy Skill Sets
|
|
106
|
+
|
|
107
|
+
For language-specific bundles (e.g., `cc-skills-golang`):
|
|
108
|
+
- Only install when actively working in that language
|
|
109
|
+
- Uninstall when switching projects
|
|
110
|
+
|
|
111
|
+
For security-focused skills (`secskills`):
|
|
112
|
+
- Configure as manually invocable only (not auto-loaded)
|
|
113
|
+
- In plugin settings: set `autoLoad: false` if supported
|
|
114
|
+
|
|
115
|
+
### 6. Validate the Fix
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Restart Claude Code and check:
|
|
119
|
+
# 1. No "Exceeded skills context budget" warning on startup
|
|
120
|
+
# 2. /find-skills or skill listing shows descriptions (not empty)
|
|
121
|
+
# 3. rtk gain shows reasonable context usage
|
|
122
|
+
rtk gain 2>/dev/null || echo "rtk not available"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Open a new Claude Code session and run a skill that was previously failing โ verify it activates correctly.
|
|
126
|
+
|
|
127
|
+
### 7. Prevent Recurrence
|
|
128
|
+
|
|
129
|
+
**Budget targets:**
|
|
130
|
+
- Keep installed skills under ~200 total (rough safe limit)
|
|
131
|
+
- Prefer curated skill sets over catch-all bundles
|
|
132
|
+
- Review and prune quarterly
|
|
133
|
+
|
|
134
|
+
**Useful heuristics:**
|
|
135
|
+
- If you haven't invoked a skill in 30 days, the bundle is a candidate for removal
|
|
136
|
+
- Language packs โ install per-project, not globally
|
|
137
|
+
- Duplicate superpowers/agent-skills versions โ keep exactly one
|
|
138
|
+
|
|
139
|
+
## Verification
|
|
140
|
+
|
|
141
|
+
- [ ] No "Exceeded skills context budget" warning in new session
|
|
142
|
+
- [ ] Skill descriptions visible in `/find-skills` output
|
|
143
|
+
- [ ] Previously failing skill invocations succeed
|
|
144
|
+
- [ ] Plugin count reduced to below ~20 bundles
|
|
145
|
+
- [ ] `~/.claude/settings.json` backed up before changes
|