script-kit-menu-bar

Read macOS menu hierarchies and execute menu actions via Accessibility APIs.

28|6|Updated Dec 27, 2025
One-click install
npx skills add https://github.com/johnlindquist/script-kit-next --skill script-kit-menu-bar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: script-kit-menu-bar
Source: https://github.com/johnlindquist/script-kit-next/tree/main/.opencode/skill/script-kit-menu-bar
Command: npx skills add https://github.com/johnlindquist/script-kit-next --skill script-kit-menu-bar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a robust system for interacting with macOS application menu bars programmatically, enabling automation of tasks that are typically performed by clicking menu items.

Core Features & Use Cases

  • Read Menu Hierarchies: Access and parse the menu structure of any macOS application using Accessibility APIs.
  • Execute Menu Actions: Trigger specific menu items, including those with keyboard shortcuts, to automate application functions.
  • Cache Menu Data: Store menu structures in a SQLite database for faster retrieval and improved performance.
  • Use Case: Automatically select "Save As..." from a target application's "File" menu, or script the process of creating a new document with specific settings.

Quick Start

Use the script-kit-menu-bar skill to execute the menu action 'New Window' for the application 'com.apple.Safari'.

Frequently Asked Questions about script-kit-menu-bar

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate macOS menu bar actions programmatically?

Yes, you can trigger macOS menu items with keyboard shortcuts by using Accessibility APIs to execute menu actions. This Skill handles keyboard shortcuts and modifier flags to automate functions accessible via the application menu bar.

Does macOS menu bar automation work with any application's menu structure?

macOS menu bar automation reads any application's menu structure using Accessibility APIs and caches the hierarchy in a SQLite database. This allows the system to parse and interact with application features accessible via menus.

What is the best way to cache macOS menu hierarchies for faster automation?

Caching macOS menu hierarchies in a SQLite database provides faster retrieval of menu structures during automation. This approach stores parsed Accessibility API data to improve performance when executing repeated menu actions.

Can I use Accessibility APIs to script a Save As action from the File menu?

Accessibility APIs can script a Save As action by reading the application's menu hierarchy and executing the targeted menu item. This allows programmatic control over application features accessible via the File menu.

Why use SQLite for macOS menu bar scripting instead of reading menus live every time?

SQLite caches macOS menu structures to avoid the performance overhead of reading them live every time. Storing the hierarchy in a database enables faster retrieval and improves overall automation efficiency.