skills/golem-powers/mac-systems/SKILL.md
macOS systems specialist — AppKit NSPanel architecture, launchd services, socket activation, MCP bridge resilience, syspolicyd, and high-frequency SwiftUI dashboards. Use when building menu-bar apps, LaunchAgents, debugging syspolicyd/Gatekeeper/TCC, resilient UDS/MCP bridges, or SwiftUI dashboards at 10Hz+.
npx skillsauth add etanhey/golems mac-systemsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
macOS systems specialist for low-level AppKit, launchd, security policy, resilient networking, and SwiftUI dashboard architecture.
One-liners every worker and launchd plist author must internalize:
127.0.0.1 / loopback or resolve at start. Three live catches: Phoenix phantom listener (two eras), W10 dead :8852 URL.exec reaps detached children (& / nohup die). launchctl submit is the surviving detach path; clean up leftover runners after.set -o pipefail, piping into an early-exit consumer (awk '{exit}') SIGPIPE-kills the producer (exit 141). Buffer first, then consume. See /shell-hardening.status, etc.) as variable names.voicelayer-profile node hits nvm _lazy_nvm FUNCNEST recursion — use bun for profile scripts.~/Library/CloudStorage — cloud-only placeholders hang naive tar/read.osascript System Events AX → keystroke.NSPopover is wrong for dashboard-class UIs. It causes:
The correct primitive: NSStatusItem + custom NSPanel + NSHostingView.
Every serious menu-bar app uses this: Ice, Stats, Raycast, 1Password mini, Bartender, iStatMenus, CleanShot X, Alfred, MonitorControl.
final class DashboardPanel: NSPanel {
init<V: View>(rootView: V) {
super.init(
contentRect: NSRect(x: 0, y: 0, width: 520, height: 620),
styleMask: [.titled, .closable, .resizable, .fullSizeContentView,
.nonactivatingPanel, .utilityWindow],
backing: .buffered, defer: false
)
titlebarAppearsTransparent = true
titleVisibility = .hidden
isFloatingPanel = true
level = .statusBar
hidesOnDeactivate = false
becomesKeyOnlyIfNeeded = true
collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary, .transient]
animationBehavior = .utilityWindow // THE flash fix
isMovableByWindowBackground = false
hasShadow = true
isOpaque = false
backgroundColor = .clear
let effect = NSVisualEffectView()
effect.material = .menu
effect.state = .active
effect.blendingMode = .behindWindow
effect.wantsLayer = true
effect.layer?.cornerRadius = 10
effect.layer?.masksToBounds = true
let host = NSHostingView(rootView: rootView)
host.sizingOptions = [.preferredContentSize]
host.translatesAutoresizingMaskIntoConstraints = false
effect.addSubview(host)
NSLayoutConstraint.activate([
host.leadingAnchor.constraint(equalTo: effect.leadingAnchor),
host.trailingAnchor.constraint(equalTo: effect.trailingAnchor),
host.topAnchor.constraint(equalTo: effect.topAnchor),
host.bottomAnchor.constraint(equalTo: effect.bottomAnchor),
])
contentView = effect
}
override var canBecomeKey: Bool { true }
override var canBecomeMain: Bool { false }
}
animationBehavior = .utilityWindow — subtle fade instead of scale-insetContentSize(...) before first makeKeyAndOrderFrontisOpaque = false + backgroundColor = .clear + NSVisualEffectViewwantsLayer = true on hosting viewclipsToBounds = true on Sonoma+NSHostingView.sizingOptions = [.preferredContentSize] (macOS 13.3+)See mechanical truth #1 (loopback bind) and #2 (launchctl submit for Codex detach).
# Load/enable
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.example.myservice.plist
# Unload/disable
launchctl bootout gui/$(id -u)/com.example.myservice
# Status
launchctl print gui/$(id -u)/com.example.myservice
# Detached one-shot (survives Codex exec reap — preferred over bare nohup &)
launchctl submit -l com.example.oneshot -- /path/to/script.sh
# Watch syspolicyd in real time
/usr/bin/log stream --predicate 'subsystem == "com.apple.syspolicy"' --level debug
# ⚠️ In scripted zsh, ALWAYS invoke /usr/bin/log absolutely — zsh has a `log` builtin that
# shadows it and exits 0 with no output, silently fabricating "no log entries" conclusions.
~/Gits/orchestrator/docs.local/research/R1-claude-desktop-macos-menubar-ux-FULL.md~/Gits/orchestrator/docs.local/research/mcp-reconnection-research.md/shell-hardening — pipefail/SIGPIPE section pairs with mechanical truth #3tools
The human-eval UX contract for Phoenix views: turn-by-turn scrollable replay (not a scorecard), hide-but-copyable IDs, collapsed thinking, identity chips, tool filters, tiny frozen starter datasets, mark-wrong-in-thread, mobile-first. Use when: building or reviewing ANY Phoenix/eval view, annotation UI, session replay, or human-grading surface. Triggers: phoenix view, eval UI, annotation view, session replay, human eval UX, grading interface. NOT for: Phoenix data pipelines/ingest (capture scripts have their own specs).
development
Bulk LLM-judging protocol for fleet-dispatched verdict runs (KG cluster, eval harness). Use when: dispatching or running judge workers (J1/J2/RT), planning bulk-apply from verdict JSONL, or triaging evidence_degraded outputs. Triggers: judge fleet, bulk judge, R3 verdicts, kg-judge, RT gate, evidence_degraded. NOT for: single-item code review, Phoenix view UX (use phoenix-human-view), or non-judge eval pipelines.
development
Quiet-down protocol for sprint close: when the fleet wraps, delete ALL polling crons and monitors, send ONE final dashboard + ONE message, then go SILENT. Use when: fleet wraps, all workers done, overnight queue exhausted, sprint close, Etan asleep/away with nothing approved left. Triggers: fleet wrap, wrap the fleet, stand down, going quiet, sprint close. NOT for: mid-sprint monitoring (keep your loops), spawning a successor (use /session-handoff first).
development
Brain Drive filing discipline — where every artifact goes + how to name it. Use WHENEVER touching Google Drive / Brain Drive: uploading, creating folders, saving research prompts/results, audits, plans, transcripts, dashboards, or when about to leave a durable artifact in docs.local/. Teaches the numbered folder model (01_STANDARDS / 02_GROUNDING / 03_RESEARCH / 04_INGEST / 06_ARCHIVE), date-prefixed naming, and the rule: FILE durable artifacts in the right Drive folder — docs.local/ is cache-only. NOT for querying Drive via Gemini (use /braindrive) or web research (use /gemini-research); for >100KB heavy archival defer to /google-drive-archive.