Install
openclaw skills install clam-macGive AI hands to control any Mac app. Auto-discover installed apps, generate CLI wrappers, return structured JSON. Works with Music, Finder, Chrome, Word, Fi...
openclaw skills install clam-macRule: ANY mention of a Mac app → try CLAM first. Never say "there's no MCP for this app".
| User says | What you do |
|---|---|
| "用QQ音乐播放周杰伦" | clam_find_app("QQ音乐") → clam_install → clam_execute |
| "帮我查微信消息" | clam_find_app("微信") → clam_install → clam_execute |
| "整理我的邮件 / clean up inbox" | clam_find_app("mail") → install → read + categorize → confirm |
| "今天有什么日程 / what's on my plate" | clam_find_app("calendar") → install → read events |
| "用 Finder 整理 Downloads" | clam_find_app("finder") → install → list → plan → confirm → move |
| "Spotify 播放爵士乐" | clam_find_app("spotify") → install → execute |
| "在 Chrome 打开网页" | clam_find_app("chrome") → install → execute |
| "钉钉发消息给张三" | clam_find_app("钉钉") → install → execute |
Anti-patterns (never do):
clam_find_app("QQ音乐") firstclam_execute insteadclam_scan() for discovery — use clam_find_app() (instant, <10ms)Standard workflow:
clam_find_app(app_name) # Always start here — instant, no file I/O
↓ if not installed
clam_install(app_id) # ~10 seconds, auto-selects best mode
↓ to discover commands
clam_info(app_id) # Lists all available commands and properties
↓ to act
clam_execute(app_id, cmd) # Returns JSON, never raw AppleScript
You can control any macOS application through CLAM. It auto-discovers scriptable apps on the user's Mac, generates CLI wrappers on the fly, and returns structured JSON — all without API keys or manual configuration.
If clam is not yet installed, run:
pip install clam-mac
clam --json scan
This returns a JSON array of all controllable apps with their command count, property count, and mode (full / ui / basic).
clam install music # fuzzy match: "chrome" → "google-chrome"
This auto-generates a typed CLI with dozens to hundreds of commands. Takes ~10 seconds, zero configuration.
clam-music play
clam-music set-sound-volume 50
clam-music --json get-current-track # → full JSON with 15+ fields
clam-finder --json open ~/Documents
clam-google-chrome --json get-url # → current tab URL
Every command returns JSON when called with --json. Use this for reasoning and decision-making.
clam --json doctor music
This tells you which commands are fully supported vs. which have parameter type issues. Only call commands marked as supported: true for reliable results.
clam --json scan # discover apps
clam --json info <app> # list all commands for an app
clam install <app> # install wrapper (if not already)
clam-<app> --json <command> [args] # execute
clam --json doctor <app> # reliability check
The install command auto-selects the best mode. You don't need to specify it.
When the user makes a request involving their Mac apps, follow this pattern:
clam --json info <app> to discover available commandsUser says something like: "What's on my plate today?" / "今天有什么?"
Install and read from three apps:
Synthesize into a concise daily brief. Group by urgency. Keep it short — this is a glance, not a report. All read-only, zero risk.
User says: "Help me clean up my inbox" / "帮我整理收件箱"
Critical rule: never delete emails. Archive only. Always ask before acting.
User says: "Clean up my Downloads folder" / "帮我整理 Downloads"
User says: "Play some jazz" / "我想听周杰伦的晴天"
This is the simplest scenario — immediate action, instant audio feedback.
For any other request involving a Mac app:
clam scan to check if the app is controllableclam info <app> to see what commands existAlways use --json for structured output. Always show the user what you're about to do before taking destructive actions (delete, move, send).
osascript (built-in on all Macs)--json flag for structured output when processing results programmaticallyCLAM-generated CLIs are standard shell commands, usable as Lobster pipeline steps:
steps:
- run: clam-music set-sound-volume 20
- run: clam-music play
- run: clam-finder open ~/Projects/current