ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

AppleScript

Write and run safe AppleScript automation on macOS with dictionary discovery, robust quoting, and deterministic read-first workflows.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/ivangdavila/applescript
Or

Setup

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 osascript available.
  • 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.

TopicFile
Setup behavior and onboardingsetup.md
Memory structurememory-template.md
App dictionary workflowapp-dictionary-workflow.md
Script design patternsscript-patterns.md
Destructive-operation guardrailssafety-checklist.md
Debug and recovery stepstroubleshooting.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.md before 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.md for 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.md before 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.md to provide next-step fixes instead of generic retries.

Common Traps

Metadata

Stars2190
Views0
Updated2026-03-07
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-ivangdavila-applescript": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.