applescript-open-app
Skill5 starsChanged 9 months agoMITView on GitHub
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.
In this repository13 other files it gives its agents.
- apple-music-playerSkill
- apple-notesSkill
- confettiSkill
- ffmpeg-video-editor-h265Skill
- githubSkill
- git-searchSkill
- launchd-non-apple-jobsSkill
- mailapp-send-emailSkill
- open-meteo-weatherSkill
- opml-readerSkill
- playwright-cliSkill
- saySkill
- screen-recorderSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use a performance-first launch path for opening apps (open -a) with AppleScript fallback for compatibility, and AppleScript for graceful …
- Very specific: line 12
Prefer scripts/open_app.sh for a reliable one-liner interface.
- Very specific: line 13
Prefer scripts/quit_app.sh for quitting an app.
- Distinctive: line 28
If the app is not installed, surface the AppleScript error and ask for the correct name.
- Very specific: line 31
Use open -na "<App Name>" only if the user explicitly requests a new instance.
- Distinctive: line 40
If multiple apps share a name, ask for the exact display name or bundle id.
- Very specific: line 41
If a bundle id is provided, use AppleScript with application id.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

