applescript

applescript is a skill for Claude Code, Codex from malue-ai/dazee-small. It costs 29 tokens per session (849 once invoked), scanned A, original, MIT.

A macOS automation tool that runs AppleScript or JavaScript for Automation (JXA) to control apps, system settings, and on-screen actions.

In plain words
What is it for?
Controlling apps such as Finder, Safari, and Mail, showing dialogs, choosing files, and reading or changing settings such as volume or Wi-Fi.
Why use it?
It lets an agent carry out tasks across macOS without requiring every action to be performed manually.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Controlling apps such as Finder, Safari, and Mail, showing dialogs, choosing files, and reading or changing settings such as volume or Wi-Fi.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/malue-ai/dazee-small/applescript
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.

Any agent
npx skills add malue-ai/dazee-small --skill applescript
Clone the repo
git clone --depth 1 https://github.com/malue-ai/dazee-small

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for applescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/malue-ai/dazee-small/applescript/github.svg)](https://agentmods.dev/skills/malue-ai/dazee-small/applescript)
Your own site
<a href="https://agentmods.dev/skills/malue-ai/dazee-small/applescript"><img src="https://agentmods.dev/badge/skills/malue-ai/dazee-small/applescript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for applescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/malue-ai/dazee-small/applescript"><img src="https://agentmods.dev/badge/skills/malue-ai/dazee-small/applescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 849 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00029 $0.00849
Opus 5.5 $0.00012 $0.00340
Sonnet 5.5 $0.00006 $0.00170
Haiku 4.5 $0.00003 $0.00085

Measured 1mo ago against content hash db15eff815dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

applescript 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 1mo ago.

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.

instances/xiaodazi/skills/applescript/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AppleScript 执行

通过 osascript 执行 AppleScript / JXA 脚本,控制 macOS 应用和系统。

使用场景

  • 需要控制 macOS 原生应用(Finder, Safari, Mail 等)
  • 需要弹窗对话框询问用户
  • 需要操作系统设置(音量、亮度、Wi-Fi 等)
  • 其他 Skill 内部调用

AppleScript 常用命令

应用控制

# 打开应用
osascript -e 'tell application "Safari" to activate'

# 关闭应用
osascript -e 'tell application "Safari" to quit'

# 获取当前最前方应用
osascript -e 'tell application "System Events" to get name of first application process whose frontmost is true'

对话框

# 显示消息
osascript -e 'display dialog "操作完成!" with title "小搭子" buttons {"好的"} default button "好的"'

# 选择列表
osascript -e 'choose from list {"选项A", "选项B", "选项C"} with title "请选择" with prompt "你想要哪个?"'

# 选择文件
osascript -e 'choose file with prompt "选择一个文件"'

# 选择文件夹
osascript -e 'choose folder with prompt "选择一个文件夹"'

系统信息

# 获取当前 Wi-Fi 名称
osascript -e 'do shell script "networksetup -getairportnetwork en0 | cut -d: -f2 | xargs"'

# 获取系统音量
osascript -e 'output volume of (get volume settings)'

# 设置音量
osascript -e 'set volume output volume 50'

# 获取电池百分比
osascript -e 'do shell script "pmset -g batt | grep -o \"[0-9]\\+%\""'

# 获取屏幕亮度
osascript -e 'tell application "System Events" to get value of value indicator 1 of slider 1 of group 1 of window 1 of application process "System Preferences"'

Finder 操作

# 获取当前 Finder 窗口路径
osascript -e 'tell application "Finder" to get POSIX path of (target of front Finder window as alias)'

# 在 Finder 中显示文件
osascript -e 'tell application "Finder" to reveal POSIX file "/path/to/file"'

# 获取选中的文件
osascript -e 'tell application "Finder" to get POSIX path of (selection as alias)'

JXA(JavaScript for Automation)

# JXA 替代 AppleScript
osascript -l JavaScript -e '
  const app = Application.currentApplication();
  app.includeStandardAdditions = true;
  app.displayDialog("Hello from JXA!");
'

# JXA 获取 Safari 标签页
osascript -l JavaScript -e '
  const safari = Application("Safari");
  const tabs = safari.windows[0].tabs();
  tabs.map(t => t.url()).join("\n");
'

Read the full file on GitHub · 110 lines

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. 1mo ago First seen · 110 lines · 29 tokens per session scan A db15eff815dc

Subscribe to this mod's changes

applescript is a skill published in the GitHub repository malue-ai/dazee-small (36 stars, last pushed 7mo ago), licensed MIT. It adds 29 tokens to every session and 849 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards…

vercel/next.js · 123 tokens