macos-menubar-swiftui

macos-menubar-swiftui is a skill for Claude Code, Codex from aka-kika/akakika-skills. It costs 120 tokens per session (1,983 once invoked), scanned A, original, MIT.

Guidance for building macOS apps that live in the menu bar—the small area beside the clock—and using SwiftUI, Apple's interface framework. It covers the app's menu, popover window, Dock visibility, settings, and global keyboard shortcuts.

In plain words
What is it for?
Use it to create, refactor, or debug a SwiftUI menu bar utility, including its menu style, settings and quit actions, Dock visibility, launch-at-login option, and global shortcut.
Why use it?
It helps choose the right macOS APIs and structure for a menu bar app, avoiding mismatched behavior between menus, windows, and popovers.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create, refactor, or debug a SwiftUI menu bar utility, including its menu style, settings and quit actions, Dock visibility, launch-at-login option, and global shortcut.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aka-kika/akakika-skills/macos-menubar-swiftui
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aka-kika/akakika-skills --skill macos-menubar-swiftui
Clone the repo
git clone --depth 1 https://github.com/aka-kika/akakika-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for macos-menubar-swiftui

README.md
[![agentmods](https://agentmods.dev/badge/skills/aka-kika/akakika-skills/macos-menubar-swiftui/github.svg)](https://agentmods.dev/skills/aka-kika/akakika-skills/macos-menubar-swiftui)
Your own site
<a href="https://agentmods.dev/skills/aka-kika/akakika-skills/macos-menubar-swiftui"><img src="https://agentmods.dev/badge/skills/aka-kika/akakika-skills/macos-menubar-swiftui/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for macos-menubar-swiftui

Your own site · 80×15
<a href="https://agentmods.dev/skills/aka-kika/akakika-skills/macos-menubar-swiftui"><img src="https://agentmods.dev/badge/skills/aka-kika/akakika-skills/macos-menubar-swiftui.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,983 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Memory Poisoning · line 395
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00120 $0.01983
Opus 5 $0.00060 $0.00992
Sonnet 5 $0.00024 $0.00397
Haiku 4.5 $0.00012 $0.00198

Measured 2d ago against content hash 30de318622c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

macos-menubar-swiftui scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/swift-macos/macos-menubar-swiftui/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

macOS Menubar SwiftUI

Prefer MenuBarExtra (macOS 13+). Drop to an NSStatusItem bridge only for a requirement the SwiftUI scene cannot express. The scene is simple; the traps are around it, in activation, item mapping, the icon, and lifecycle.

Sibling skills own their topics. Do not restate them here:

  • REQUIRED SUB-SKILL for a Launch at Login toggle: macos-launch-at-login (the four SMAppService statuses, requiresApproval).
  • Global hotkeys: macos-global-shortcuts.
  • A status item that opens a floating NSPanel instead of a popover: swiftui-floating-panel-menubar.
  • Signing, notarization, DMG: macos-app-distribution-dmg.
  • Shortcuts and Siri: apple-app-intents.

Decide the shape

Need Use
Native dropdown of commands MenuBarExtra + .menuBarExtraStyle(.menu)
Custom SwiftUI layout, forms, lists, status cards MenuBarExtra + .menuBarExtraStyle(.window)
Right-click menu on the item, custom item drawing, drag-and-drop onto the item, variable item width, macOS 12 NSStatusItem bridge (bottom of this file)
Popover must be closed by code, or must survive click-outside NSStatusItem + NSPopover, or the floating-panel skill

Skeleton (window style)

import SwiftUI

@main
struct PulseApp: App {
    @State private var state = AppState()
    @AppStorage("showExtra") private var showExtra = true

    var body: some Scene {
        MenuBarExtra("Pulse", systemImage: "waveform", isInserted: $showExtra) {
            PopoverView()
                .environment(state)
                .frame(width: 280)          // .window style needs an explicit width
        }
        .menuBarExtraStyle(.window)
        // Custom asset instead of an SF Symbol: use the label closure.
        // MenuBarExtra(isInserted: $showExtra) { PopoverView() } label: { Image("MenuBarIcon") }

        Settings {
            SettingsView()
                .environment(state)         // scenes share no view tree; inject in both
        }
    }
}

struct PopoverView: View {
    @Environment(AppState.self) private var state

    var body: some View {
        VStack(alignment: .leading, spacing: 12) {
            Text(state.statusText)
            Divider()
            SettingsLink { Text("Settings…") }     // macOS 14+; opens or fronts the Settings scene
                .keyboardShortcut(",", modifiers: .command)
            Button("Quit Pulse") { NSApplication.shared.terminate(nil) }
                .keyboardShortcut("q", modifiers: .command)
        }
        .padding(16)
        .onAppear { NSApp.activate() }             // see "Windows open behind" below
    }
}

@Observable final class AppState {
    var statusText = "Ready"
}

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · -285 lines · +62 tokens per session 30de318622c2
  2. 12d ago First seen · 429 lines · 58 tokens per session scan A 75ea28158d21

Subscribe to this mod's changes

macos-menubar-swiftui is a skill published in the GitHub repository aka-kika/akakika-skills (10 stars, last pushed 2d ago), licensed MIT. It adds 120 tokens to every session and 1,983 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cometchat-android-v6-kotlin-placement

Where the CometChat Android v6 chat UI goes in a Kotlin XML Views app — the default conversations→message Activity flow, growing to the tab-based app (chats/users/groups/calls + detail, thread and search screens + incoming calls), a single one-to-one screen, or chat embedded in an existing Activity/Fragment, with a…

cometchat/cometchat-skills · 127 tokens

flutter-codestyle

Custom Instructions: Senior Flutter & Dart Engineer.

GulajavaMinistudio/awesome-copilot-id · 13 tokens

xcode-build-tuner

Implement approved Xcode build-speed fixes after strategist approval or explicit requests covering build settings, script phases, Swift compilation, or SwiftPM graphs; re-benchmark results.

Xopoko/build-swift-apps · 39 tokens

xcode-compile-profiler

Profile Swift and mixed-language compile bottlenecks from timing summaries, frontend diagnostics, type-check warnings, CompileSwiftSources, and SwiftEmitModule; recommend changes only.

Xopoko/build-swift-apps · 40 tokens

swiftui-view-architect

Refactor oversized SwiftUI view files into stable, dedicated subviews with MV-first data flow, explicit dependencies, extracted actions, and correct Observation usage.

Xopoko/build-swift-apps · 36 tokens

bootstrap-ios

Bootstrap agents for iOS, iPadOS, macOS, Swift, SwiftUI, SwiftData/Core Data, Swift Testing, Xcode build/test/debug, Simulator, App Intents, or XcodeBuildMCP work. Use before building, fixing, refactoring, QAing, or setting up Apple-platform repos, and when asked to load/install Ray's iOS skills or bootstrap iOS.

RayFernando1337/rayfernando-skills · 84 tokens