macOS Shortcuts Skill
This skill provides integration with macOS Shortcuts, allowing you to list, view, and run shortcuts directly from the command line.
Available Commands
- List Available Shortcuts
Use the shortcuts list command to display all available shortcuts on the system.
Command:
shortcuts list
When to use:
-
User asks to see all shortcuts
-
User wants to know what shortcuts are available
-
User needs to find a specific shortcut name
Example output:
My Morning Routine Send Weekly Report Process Screenshots Convert to PDF
- View Shortcut in Shortcuts App
Use the shortcuts view command to open a specific shortcut in the Shortcuts app for editing or inspection.
Command:
shortcuts view "<shortcut-name>"
When to use:
-
User wants to see how a shortcut is configured
-
User wants to edit a shortcut
-
User wants to inspect a shortcut's actions
Important:
-
The shortcut name must match exactly (case-sensitive)
-
Use quotes around the shortcut name if it contains spaces
Example:
shortcuts view "My Morning Routine"
- Run a Shortcut
Use the shortcuts run command to execute a shortcut. You can optionally provide input to the shortcut.
Command (without input):
shortcuts run "<shortcut-name>"
Command (with input):
shortcuts run "<shortcut-name>" --input-path <file-path>
Or with text input:
echo "some text" | shortcuts run "<shortcut-name>"
When to use:
-
User wants to execute a shortcut
-
User needs to run a shortcut with specific input
-
User wants to automate a task using an existing shortcut
Important:
-
The shortcut name must match exactly (case-sensitive)
-
Use quotes around the shortcut name if it contains spaces
-
Some shortcuts may require input, while others don't
-
The output depends on what the shortcut returns
Examples:
Run a simple shortcut
shortcuts run "Convert to PDF"
Run a shortcut with file input
shortcuts run "Process Image" --input-path /path/to/image.jpg
Run a shortcut with text input
echo "Hello World" | shortcuts run "Translate to Spanish"
Error Handling
If a shortcut name doesn't exist, you'll see an error like:
The shortcut "Name" could not be found.
In this case:
-
First run shortcuts list to see available shortcuts
-
Verify the exact name (including capitalization)
-
Use quotes if the name contains spaces
Tips
-
Shortcut names are case-sensitive
-
Always use quotes around shortcut names that contain spaces
-
Use shortcuts list first if you're unsure of the exact name
-
Some shortcuts may take time to execute, so be patient
-
Shortcuts can return various types of output (text, files, etc.)
Common Use Cases
-
Listing shortcuts before running: First list all shortcuts to find the exact name, then run it
-
Batch processing: Run shortcuts in loops or scripts for automation
-
Integration with other tools: Use shortcuts as part of larger workflows
-
Quick automation: Access powerful macOS automation without leaving the terminal