.claude/skills/overlay-ui/SKILL.md
Notch overlay UI patterns — NSPanel setup, SwiftUI overlay views, screen-sharing hiding, and display adaptation
npx skillsauth add mohitmujawdiya/dagabaaz overlay-uiInstall 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.
Use NSPanel with .nonactivatingPanel style. This prevents the overlay from stealing focus from Zoom/Meet. The user can keep typing in their meeting app while the overlay is visible.
Critical window properties:
panel.level = .screenSaver // Above everything, including fullscreen
panel.sharingType = .none // INVISIBLE to screen sharing
panel.collectionBehavior = [
.canJoinAllSpaces, // Visible on all desktops
.fullScreenAuxiliary, // Visible alongside fullscreen apps
.stationary // Doesn't move with Space switching
]
panel.isOpaque = false
panel.backgroundColor = .clear
panel.hasShadow = false
sharingType = .none is the key feature. This makes the window completely invisible to ScreenCaptureKit-based screen sharing (Zoom, Google Meet, Teams). The interviewer cannot see the overlay.
Detect notch vs non-notch displays:
let menuBarHeight = screenFrame.maxY - visibleFrame.maxY
let hasNotch = menuBarHeight > 24 // Notch displays have taller menu bars
Center horizontally, position below notch/menu bar. The overlay should sit just below where the notch ends, centered on screen.
Handle display changes. Observe NSApplication.didChangeScreenParametersNotification to reposition when:
Guard against duplicate panels. Check panel?.isVisible == true before creating a new one in show().
Use .ultraThinMaterial with dark color scheme for the glassmorphism background. This gives a translucent dark overlay that adapts to the desktop wallpaper.
Use .clipShape(RoundedRectangle(...)) instead of deprecated .cornerRadius(). The cornerRadius modifier is deprecated in recent SwiftUI.
Answer text must scroll. Wrap answer text in ScrollView(.vertical) with a max height. Long answers (detailed mode) will overflow the overlay without this.
Animations on state transitions:
.move(edge: .top).combined(with: .opacity).opacityUse foregroundStyle instead of deprecated foregroundColor. Modern SwiftUI preference.
Font hierarchy for readability at small sizes:
Audio level indicator: 5 bars of increasing height, filled green based on the normalized audio level. Provides visual feedback that the system is hearing audio.
panel.contentView = hostingView directly instead of adding as a subview. This avoids autoresizing mask issues and is the recommended pattern for NSHostingView in NSPanel.development
WebSocket and Gemini Live API patterns — connection management, audio streaming, and response handling
development
Swift macOS code quality standards — architecture, patterns, and anti-patterns for native macOS apps
data-ai
Swift concurrency patterns for this project — async/await, Sendable, thread safety, and MainActor usage
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.