Applescript open app
Open, launch, activate, or quit macOS apps by name using AppleScript or osascript. Use when the user asks to open/launch/activate/quit an app ("open Xcode", "quit Discord"), or when AppleScript-based app control is required.From its SKILL.md
npx -y skills add IvanCampos/agents --skill applescript-open-appAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 6 commands, including `scripts/open_app.sh "<App Name>"` and 5 more.
SKILL.md
2.0 KB, 439 tokens by cl100k_base, as published. Nobody here has run it
AppleScript Open App
Overview
Use a performance-first launch path for opening apps (open -a) with AppleScript fallback for compatibility, and AppleScript for graceful quits.
Quick Start
- Prefer
scripts/open_app.shfor a reliable one-liner interface. - Prefer
scripts/quit_app.shfor quitting an app. - Pass the app name exactly as it appears in Finder (for example, "Xcode", "Safari", "Final Cut Pro").
scripts/open_app.sh "Safari"
scripts/quit_app.sh "Discord"
Tasks
Open an app by name
- Run
scripts/open_app.sh "<App Name>". - The script uses fast LaunchServices activation first, then falls back to AppleScript activation only when needed.
- If the app is not installed, surface the AppleScript error and ask for the correct name.
Open a new instance (only when asked)
- Use
open -na "<App Name>"only if the user explicitly requests a new instance. - Otherwise use AppleScript activation.
Quit an app by name
- Run
scripts/quit_app.sh "<App Name>". - The script checks whether the app is running before sending
quit, avoiding slow error-path exits for already-closed apps. - If the app is not installed, surface the AppleScript error and ask for the correct name.
Handle ambiguous names
- If multiple apps share a name, ask for the exact display name or bundle id.
- If a bundle id is provided, use AppleScript with
application id.
osascript -e 'tell application id "com.apple.Safari" to activate'
AppleScript snippet
osascript -e 'tell application "Safari" to activate'
osascript -e 'tell application "Safari" to quit'
Resources
scripts/
open_app.sh: Fastopen -alaunch/activate with AppleScript fallback.quit_app.sh: Graceful AppleScript quit with running-state guard.
What ships with it: 3 files
1.1 KB alongside SKILL.md, 2 of them executable
agents/
- openai.yaml200 B
scripts/
- open_app.shruns575 B
- quit_app.shruns394 B