One-click install
npx skills add https://github.com/Probably-Group/Dev-AID --skill applescript-probably-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: applescript
Source: https://github.com/Probably-Group/Dev-AID/tree/main/.dev-aid/skills/expert/applescript
Command: npx skills add https://github.com/Probably-Group/Dev-AID --skill applescript-probably-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you automate macOS applications and system workflows while preventing common security issues like command injection and unsafe file/path handling.

Core Features & Use Cases

  • Secure JXA/AppleScript generation: Produces AppleScript or JXA code for macOS app control, Finder operations, dialogs, and workflow automation.
  • Shell command and input hardening: Enforces safe argument handling (e.g., quoted forms) and blocks unsafe patterns (e.g., admin escalation when unnecessary).
  • Operational safety checks: Encourages validation of application availability, protected paths, selected items, and dialog input before performing actions.

Quick Start

Generate a secure JXA script to list the currently selected Finder items and return their validated paths, without deleting or modifying anything.

Frequently Asked Questions about applescript

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

FAQPage Schema
How do I prevent command injection when running shell scripts from AppleScript?

To prevent command injection in AppleScript, you must enforce security guardrails like using quoted forms for shell arguments and validating all untrusted input before execution. This ensures safe argument handling and blocks unsafe patterns during macOS automation.

What's the best way to automate Finder workflows and handle selected items safely?

The best way to automate Finder workflows safely is to generate AppleScript or JXA code that validates selected items and file paths before performing actions. This operational safety check prevents unsafe file handling and ensures robust macOS workflow automation.

Can I use JXA instead of AppleScript for macOS app control and system scripting?

Yes, you can use JXA (JavaScript for Automation) as an alternative to AppleScript for macOS app control. Generating JXA scripts allows you to manage Finder operations, dialogs, and system scripting while maintaining the same security hardening and compatibility constraints.

How do I validate file paths and check application availability before running macOS automation scripts?

Validating file paths and checking application availability requires enforcing operational safety checks within your automation scripts. You should validate protected paths, confirm app access, and verify dialog input before executing any Finder workflow actions or system commands.

Does macOS automation with AppleScript require admin escalation for routine workflow tasks?

No, macOS automation with AppleScript does not require admin escalation for routine workflow tasks. Secure AppleScript generation blocks unnecessary admin escalation and enforces safe argument handling, allowing you to automate applications without compromising system security.

Why does my AppleScript fail when handling untrusted input from dialogs?

AppleScript fails or becomes unsafe with untrusted dialog input when script injection prevention and input escaping are not applied. You must enforce security guardrails like quoted-form usage and validate dialog input before passing it to shell commands or workflow actions.