mac-use

Automate macOS tasks with AppleScript and JXA via osascript.

3|Updated Jul 30, 2024
One-click install
npx skills add https://github.com/nounder/dotfiles --skill mac-use-nounder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mac-use
Source: https://github.com/nounder/dotfiles/tree/main/claude/skills/mac-use
Command: npx skills add https://github.com/nounder/dotfiles --skill mac-use-nounder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

macOS automation tasks can be tedious and error-prone when done manually; this Skill provides ready-to-use patterns and examples to script macOS apps, UI elements, and system features using AppleScript and JavaScript for Automation (JXA).

Core Features & Use Cases

  • AppleScript & JXA guidance: execute commands via osascript to control apps such as Music, Finder, Notes, Safari, and more.
  • UI scripting patterns: obtain app state, interact with UI elements, and automate repetitive workflows on macOS.
  • Real-world scenarios: retrieve properties, manipulate windows, automate file operations, and sequence multi-step tasks across apps.

Quick Start

Run a JavaScript for Automation (JXA) script to automate a macOS app or UI task.

Frequently Asked Questions about mac-use

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

FAQPage Schema
How do I automate macOS apps using AppleScript and JXA?

Automate macOS apps by executing AppleScript or JavaScript for Automation (JXA) commands via osascript to interact with applications like Finder, Music, and Safari, retrieving properties, manipulating windows, and automating file operations.

Can I use JXA to script UI elements and query System Events on macOS?

Yes, JXA can query System Events to obtain UI state and automate repetitive workflows, allowing you to interact with UI elements, manipulate windows, and sequence multi-step tasks across macOS applications.

What's the best way to control Finder and Music with osascript?

The best way to control Finder and Music is by applying ready-to-use scripting patterns via osascript, enabling you to retrieve app properties, manipulate windows, and execute file operations safely using standard additions.

Does macOS automation with JXA require any special dependencies?

No dependencies are required to automate macOS with JXA, as the Skill provides ready-to-use patterns and documented examples to script apps, UI elements, and system features directly using built-in osascript standard additions.

Why does my macOS automation script fail when accessing app properties?

Accessing app properties via macOS automation requires safe scripting practices and proper use of standard additions; ensure your JXA or AppleScript commands correctly target the application's UI elements and System Events state.

When should I use AppleScript versus JavaScript for Automation for macOS automation?

Use AppleScript or JXA for macOS automation based on your scripting preference; both interact with apps, UI elements, and system features via osascript to retrieve properties, manipulate Finder, control Music, and query System Events.