Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

macos-automationmacOS 自动化

Agent Skill

macos-automation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,199

周安装

136

GitHub Stars

4

下载量

1,121
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:macos-automation(macOS 自动化)
来源仓库:https://github.com/alphaonedev/openclaw-graph
仓库路径:skills/macos-automation
安装命令:
npx skills add https://github.com/alphaonedev/openclaw-graph --skill macos-automation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill macos-automation

简介

macos-automation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 适用于研究检索类任务,可结合来源仓库和原始 README 核验具体用法。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和是否触发联网或文件读写。
  • 建议在使用前检查维护状态和实际功能,避免依赖未经验证的自动化行为。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

macos-automation

Purpose

This skill automates tasks on macOS using tools like AppleScript, JXA, Shortcuts, Automator, osascript, System Events, and the accessibility API, enabling script-based control of apps and system functions.

When to Use

  • Automate repetitive workflows, such as file management or app interactions.
  • Integrate with macOS apps for custom behaviors, like triggering actions via keyboard shortcuts.
  • Script complex sequences involving multiple apps, e.g., when Shortcuts alone isn't sufficient.
  • Handle accessibility tasks, like UI element manipulation, when apps don't expose direct APIs.
  • Use for rapid prototyping of automations in environments like shell scripts or IDEs.

Key Capabilities

  • Execute AppleScript via osascript for app control, e.g., manipulating Finder or Safari.
  • Run JXA (JavaScript for Automation) to interact with macOS APIs, supporting modern JavaScript syntax.
  • Create and invoke Shortcuts programmatically for quick actions, like sharing files.
  • Use Automator workflows as scripts, convertible to applications or services.
  • Leverage System Events for UI automation, including keyboard/mouse simulation via accessibility API.
  • Access macOS-specific APIs like NSAppleScript for embedding in Objective-C/Swift code.

Usage Patterns

  • Run scripts from the command line using osascript; for example, pipe AppleScript code directly.
  • Embed JXA in Node.js environments by loading the JXA module and executing via Application('Finder').activate().
  • Chain Shortcuts with other tools by exporting as URLs and invoking via open command.
  • Use Automator to build workflows, then save as.applescript files for osascript execution.
  • For accessibility, ensure "Accessibility" is enabled in System Preferences > Security & Privacy, then use System Events to target UI elements like tell application "System Events" to click button "OK" of window "Main".
  • Always check for required permissions, such as Full Disk Access, before running scripts that access files.

Common Commands/API

  • osascript CLI: Use osascript -e 'tell application "Finder" to make new folder at desktop' to create a folder; handle errors by checking the exit code.
  • JXA Example: In a JavaScript file, use const app = Application('Safari'); app.activate(); app.documents[0].url = 'https://example.com'; to open and navigate a URL.
  • Shortcuts Integration: Run a shortcut via shortcuts run "My Shortcut" -i '{"input": "text"}'; pass inputs as JSON for parameterized execution.
  • Automator API: Convert workflows to AppleScript with tell application "Automator" to run workflow "path/to/workflow".
  • System Events API: For UI automation, use osascript -e 'tell application "System Events" to keystroke "a" using {command down}' to simulate Command+A.
  • Config Formats: Store scripts in plain text files (.applescript) and invoke with osascript path/to/script.applescript; for JXA, use ES6 modules in.js files.

Integration Notes

  • Integrate with other tools by wrapping osascript calls in shell scripts; e.g., use $ export APPLESCRIPT_PATH='/path/to/script' and run via osascript $APPLESCRIPT_PATH.
  • For JXA, require the OSA module in Node.js: npm install osa and use const OSA = require('osa'); OSA.runAppleScript('...').
  • If accessibility features are needed, set the env var $ACCESSIBILITY_ENABLED=1 after granting permissions in System Preferences.
  • Auth/keys: For scripts accessing protected resources, use env vars like $osascript_API_KEY (though rare); more commonly, handle macOS permissions via tccutil CLI, e.g., tccutil reset AppleEvents com.example.app to reset access.
  • Embed in larger apps by compiling AppleScript into bundles or using JXA in Electron apps for cross-tool integration.

Error Handling

  • Check osascript exit codes: If a script fails, capture with osascript -e 'script' 2>&1 and parse stderr for messages like "Execution error:...".
  • In JXA, wrap code in try-catch: try {Application('Finder').activate();} catch (e) {console.error(e.message);} to handle app not found errors.
  • For Shortcuts, verify with shortcuts run "Name" --wait-for-result and check output for failures.
  • Use Automator's built-in logging by enabling in workflow settings, then review logs via Console app.
  • General pattern: Always run scripts with elevated privileges if needed, e.g., via sudo osascript -e '...', and handle permission errors by prompting users to adjust settings.

Concrete Usage Examples

  1. Automate App Launch and Action: Use osascript to open Safari and load a page: osascript -e 'tell application "Safari" to open location "https://example.com"' followed by 'tell application "Safari" to activate'. This is useful for daily workflows; extend by adding error checks.
  2. UI Automation with Shortcuts: Create a Shortcut to resize windows, then invoke via CLI: shortcuts run "Resize Window" -i '{"app": "Finder", "width": 800}'. Combine with JXA for dynamic inputs, e.g., in a script: Application('Shortcuts').run('Resize Window', {input: JSON.stringify({app: 'Finder'})}).

Graph Relationships

  • Related to: macos cluster (direct parent), applescript skill (sub-skill for scripting), shortcuts skill (integrated tool), automation cluster (broader category).
  • Dependencies: Requires macos-os (base system), interacts with accessibility-api skill for UI tasks.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.22%
按下载量换算395

Claude

30.8%
按下载量换算345

Cursor

19.78%
按下载量换算222

Gemini CLI

8.15%
按下载量换算91

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/alphaonedev/openclaw-graph --skill macos-automation 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills