Repository Public Research preview
1# safari-applescript23An Agent Skill for driving Safari on macOS through AppleScript: navigation, reading, forms,4uploads, downloads with the page's own session, screenshots.56It exists for the jobs a headless browser cannot do — sites where the user is already signed in —7and it treats that access with care: its tool works in a dedicated window, refuses to type into8password fields without explicit confirmation, can be confined to a list of domains, and never9reads cookies or stored passwords.1011## Contents1213| Path | Purpose |14|---|---|15| `SKILL.md` | Safety rules, the working loop, what is easy to get wrong, limits |16| `references/how-it-works.md` | Why each technique is needed (pending navigations, framework inputs, results, dialogs) |17| `references/applescript-recipes.md` | The nine recipes with a typical sequence |18| `scripts/safari.mjs` | Command-line tool, JSON output, state kept between invocations |19| `scripts/recipes/*.applescript` | Standalone `osascript` programs |20| `scripts/lib/` | The engine (shared with the `safari-mcp` server) |2122No dependencies beyond Node.js 20+ and macOS's own `osascript`, `screencapture` and `sips`.2324## Install2526```bash27skills install @spboucher/safari-applescript --client claude-code # or codex, cursor, generic-agent-skills28```2930## Tested3132On Safari 27.0 / macOS 27.0: every recipe and the whole command-line flow run against a local33fixture site (forms with framework-style inputs, shadow DOM, same-origin iframes, late content,34dialogs, cookie-protected downloads, uploads), and the test asserts that the user's own windows35are unchanged afterwards. Not tested on older Safari or macOS versions.3637## Limits3839macOS and Safari only. Cross-origin iframes, private windows, Reader, in-tab PDFs and browser40settings are out of reach. Synthetic events are not real input. See `SKILL.md`.41