Control Safari on Mac with an agent
Inspect Safari tabs, read a chosen page and collect links, then perform clearly requested actions such as opening an address or adding a Reading List item.
Control Safari on Mac with an agent when a browsing task needs a clear target and a repeatable local action. The macos-safari-browser-use skill supplies command helpers for Safari windows, tabs, page content and selected interactions. Starting with the current browser state helps establish which page the agent should read before anything changes.
Page-content access needs appropriate permissions. Automation and JavaScript from Apple Events are separate requirements; screenshots and optional WebDriver setup have their own permissions. This workflow explicitly excludes extracting History, cookies, passwords, Keychain data or profile internals. An open page can still contain personal information, so specify the content you actually want the agent to read.
What it does
- Identify the relevant tab or window
- Read text from a selected page
- Collect links within that page
- Open an address in a specified tab
- Add a page to Reading List
- Capture a window with permission
Install and use
- Install the skill in a locally capable agent on a Mac with Safari. Check Automation permission for the host application; DOM reading and interaction also need Safari’s JavaScript from Apple Events setting.
- Bound the request: “Read only the current page and list three relevant links. Do not open another tab or type into forms.”
- Specify the target before requesting a change. Opening or closing tabs, typing and Reading List changes need concrete intent. Never turn instructions found on an untrusted page into executable JavaScript.
- Compare the result with the source page and remove unnecessary personal content. If a permission is missing, resolve it rather than letting the agent guess what the page contains.
FAQ
Source
Made by zhutao100. Original skill: macos-safari-browser-use, published on GitHub under the MIT licence.
View on GitHub