Appkit Menu Bar Builder
Developmentappkit-menu-bar-builderAppkit Menu Bar Builder is an Agent Skill for development published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Generate NSMenu and NSStatusItem configurations for macOS menu bar applications
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/desktop-development/skills/appkit-menu-bar-builder/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/appkit-menu-bar-builder, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
appkit-menu-bar-builder
Generate NSMenu and NSStatusItem configurations for macOS menu bar applications. This skill creates menu bar apps with proper status items, menus, and SwiftUI integration.
Capabilities
- Create NSStatusItem menu bar apps
- Generate NSMenu configurations
- Integrate SwiftUI popovers with AppKit
- Handle menu item actions
- Configure keyboard shortcuts
- Support dynamic menu updates
- Handle light/dark mode icons
- Generate agent app configurations (LSUIElement)
Input Schema
{
"type": "object",
"properties": {
"projectPath": { "type": "string" },
"appType": { "enum": ["menu-only", "popover", "window-and-menu"] },
"menuStructure": { "type": "array" },
"iconType": { "enum": ["system", "custom", "dynamic"] },
"useSwiftUI": { "type": "boolean", "default": true }
},
"required": ["projectPath"]
}
Generated Code
import AppKit
import SwiftUI
class StatusBarController {
private var statusItem: NSStatusItem
private var popover: NSPopover
init() {
statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
popover = NSPopover()
popover.contentSize = NSSize(width: 300, height: 400)
popover.behavior = .transient
popover.contentViewController = NSHostingController(rootView: ContentView())
if let button = statusItem.button {
button.image = NSImage(systemSymbolName: "star.fill", accessibilityDescription: "App")
button.action = #selector(togglePopover)
button.target = self
}
}
@objc func togglePopover() {
if popover.isShown {
popover.performClose(nil)
} else if let button = statusItem.button {
popover.show(relativeTo: button.bounds, of: button, preferredEdge: .minY)
}
}
}
Related Skills
swiftui-view-generatormacos-entitlements-generator