AppleScript
Write and run safe AppleScript automation on macOS with dictionary discovery, robust quoting, and deterministic read-first workflows.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ivangdavila/applescriptSetup
On first use, follow setup.md to configure activation and safety preferences.
Setup review is read-only.
Any local file creation or modification requires explicit user confirmation.
When to Use
User needs AppleScript automation on macOS for app control, data extraction, or scripted UI actions.
Agent handles script design, safe execution with osascript, output parsing, and troubleshooting.
Requirements
- macOS with
osascriptavailable. - Target app installed and scriptable when app automation is requested.
- Explicit user confirmation before destructive operations.
Architecture
Memory lives in ~/applescript/. See memory-template.md for structure.
~/applescript/
├── memory.md # Preferences, safe defaults, and last working patterns
├── snippets.md # Reusable script snippets
├── failures.md # Error signatures and known fixes
└── app-notes.md # Per-app dictionary and behavior notes
Quick Reference
Use these files only when the current request needs deeper detail.
| Topic | File |
|---|---|
| Setup behavior and onboarding | setup.md |
| Memory structure | memory-template.md |
| App dictionary workflow | app-dictionary-workflow.md |
| Script design patterns | script-patterns.md |
| Destructive-operation guardrails | safety-checklist.md |
| Debug and recovery steps | troubleshooting.md |
Data Storage
All local skill data stays in ~/applescript/.
Before creating or changing local files, explain the write and ask for confirmation.
Core Rules
1. Choose Operation Scope Before Writing Any Script
- Classify request as read-only, reversible write, or destructive write.
- If scope is unclear, ask one disambiguation question before execution.
2. Discover App Vocabulary Before Automation
- Use dictionary inspection workflow from
app-dictionary-workflow.mdbefore guessing object names. - Do not invent app classes, properties, or commands.
3. Escape Dynamic Input Deterministically
- Never concatenate raw user text into AppleScript command strings.
- Use safe quoting patterns from
script-patterns.mdfor every variable.
4. Keep Scripts Bounded and Observable
- Prefer short scripts with explicit targets and explicit output values.
- Return concise structured output so results can be validated quickly.
5. Read Before Write, Verify After Write
- For updates and creates, run a pre-read to confirm target identity.
- Run a read-back check after writes and report the final state.
6. Require Two-Step Confirmation for Destructive Actions
- Apply
safety-checklist.mdbefore delete, bulk edit, or irreversible app actions. - If confirmation is missing, stop and ask explicitly.
7. Fail Loudly With Actionable Recovery
- On error, capture exact failing command and error text.
- Use
troubleshooting.mdto provide next-step fixes instead of generic retries.
Common Traps
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ivangdavila-applescript": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Animations
Create performant web animations with proper accessibility and timing.
Arduino
Develop Arduino projects avoiding common wiring, power, and code pitfalls.
Bulgarian
Write Bulgarian that sounds human. Not formal, not robotic, not AI-generated.
Arabic
Write Arabic that sounds human. Not formal, not robotic, not AI-generated.
Assistant
Manage tasks, communications, and scheduling with proactive and organized support.