applescript-open-app

A macOS app-control skill that opens, activates, or quits an application by name using built-in system commands.

In plain words
What is it for?
It is for opening apps such as Xcode or Safari, starting a new app instance when requested, and quitting running apps.
Why use it?
It provides a simple way to control desktop apps from the terminal, including a fallback when the faster launch method does not work.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ivancampos/agents/applescript-open-app
Any agent
npx skills add IvanCampos/agents --skill applescript-open-app
Clone the repo
git clone --depth 1 https://github.com/IvanCampos/agents

Made for: Claude Code, Codex.

Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 499 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00061 $0.00499
Opus 5 $0.00030 $0.00249
Sonnet 5 $0.00012 $0.00100
Haiku 4.5 $0.00006 $0.00050

Measured 3d ago against content hash 457983985cdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

applescript-open-app scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/open_app.sh, scripts/quit_app.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/applescript-open-app/SKILL.md · 61 lines

What it actually says

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.sh for a reliable one-liner interface.
  • Prefer scripts/quit_app.sh for 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: Fast open -a launch/activate with AppleScript fallback.
  • quit_app.sh: Graceful AppleScript quit with running-state guard.
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 61 lines · 61 tokens per session scan A 457983985cdd

Subscribe to this mod's changes

applescript-open-app is a skill published in the GitHub repository IvanCampos/agents (5 stars, last pushed 6mo ago), licensed MIT. It adds 61 tokens to every session and 499 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.