← 返回 Skills 市场
ivangdavila

AppleScript

作者 Iván · GitHub ↗ · v1.0.0
darwin ✓ 安全检测通过
534
总下载
1
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install applescript
功能描述
Write and run safe AppleScript automation on macOS with dictionary discovery, robust quoting, and deterministic read-first workflows.
使用说明 (SKILL.md)

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.

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.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

  • Guessing app dictionary terms -> script compiles but fails at runtime.
  • Injecting unescaped quotes in user values -> syntax errors or wrong command targets.
  • Writing without pre-read on duplicate item names -> wrong object modified.
  • Running UI automation too early after launching an app -> intermittent failures.
  • Treating all errors as permission issues -> repeated failures without progress.

Security & Privacy

Data that stays local:

  • AppleScript snippets, runtime notes, and troubleshooting memory in ~/applescript/.
  • Command output needed only for requested tasks.

Data that may leave your machine:

  • None by default. This skill focuses on local macOS automation.

This skill does NOT:

  • Read unrelated authentication values.
  • Send automation data to third-party APIs.
  • Execute destructive app actions without explicit confirmation.

Related Skills

Install with clawhub install \x3Cslug> if user confirms:

  • macos - macOS command and system operation patterns.
  • automate - General automation workflow design and reliability strategy.
  • bash - Shell scripting helpers for wrapping and testing commands.
  • notes - Knowledge capture and structured note workflows.
  • files - Safe file read and write workflows with clear boundaries.

Feedback

  • If useful: clawhub star applescript
  • Stay updated: clawhub sync
安全使用建议
This skill appears coherent and low-risk, but review these before installing or running: 1) Confirm you are on macOS and that osascript is the intended execution path; 2) Do not grant blanket permission to create or modify files—allow writes only after the agent explains what it will store in ~/applescript/; 3) Be cautious with destructive actions: follow the two-step confirmation the skill requires and verify read-back results; 4) Expect macOS Automation/privacy prompts for target apps—grant them only to apps you trust; 5) Because the skill is instruction-only and the source is 'unknown', prefer manual review of any first-run scripts the agent proposes and do not enable automatic activation for broad scenarios. If you want higher assurance, ask the maintainer for a repository or code audit before enabling persistent memory.
功能分析
Type: OpenClaw Skill Name: applescript Version: 1.0.0 The OpenClaw AppleScript skill is designed with a strong emphasis on safety, user control, and preventing common vulnerabilities. Multiple files (SKILL.md, script-patterns.md) contain explicit instructions for the AI agent to 'Never concatenate raw user text into AppleScript command strings,' 'Use safe quoting patterns,' and 'Reject unsafe input,' directly mitigating prompt-injection leading to command injection. Furthermore, the skill repeatedly instructs the agent to obtain explicit user confirmation before any destructive or write operations (SKILL.md, setup.md, safety-checklist.md) and explicitly states it will not exfiltrate data or read unrelated authentication values. There is no evidence of malicious intent, data exfiltration, persistence, or unauthorized remote control.
能力评估
Purpose & Capability
Name and description match the declared requirements: OS restriction is darwin, required binary is osascript, and the skill's workflows focus on AppleScript dictionary discovery and safe execution. There are no unrelated binaries, environment variables, or unusual config paths requested.
Instruction Scope
SKILL.md and the included docs instruct the agent to inspect app dictionaries, construct bounded AppleScript probes, run osascript, and store/read notes under ~/applescript/. The instructions emphasize read-before-write, explicit confirmation for destructive actions, and do not direct data to external endpoints or ask for unrelated system secrets.
Install Mechanism
There is no install spec (instruction-only skill), so nothing is downloaded or written to disk by an installer. This is the lowest-risk install model.
Credentials
The skill declares no required environment variables or credentials and only uses a local config/memory path. Persistent storage is limited to ~/applescript/ which is proportional to the stated purpose.
Persistence & Privilege
The skill persists memory and notes in ~/applescript/ by design. always is false (not force-included). SKILL.md requires explicit user confirmation before creating or modifying local files, which mitigates risk—users should still review what gets stored.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install applescript
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /applescript 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release with safety-first AppleScript execution rules and reusable automation patterns.
元数据
Slug applescript
版本 1.0.0
许可证
累计安装 4
当前安装数 4
历史版本数 1
常见问题

AppleScript 是什么?

Write and run safe AppleScript automation on macOS with dictionary discovery, robust quoting, and deterministic read-first workflows. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 534 次。

如何安装 AppleScript?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install applescript」即可一键安装,无需额外配置。

AppleScript 是免费的吗?

是的,AppleScript 完全免费(开源免费),可自由下载、安装和使用。

AppleScript 支持哪些平台?

AppleScript 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin)。

谁开发了 AppleScript?

由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.0。

💬 留言讨论