{"id":"754260fe-ba9b-4223-b498-cc76f9abbe83","slug":"mac-browser","kind":"skill","name":"mac-browser","summary":"Control your running browser on macOS via AppleScript — for AI coding agents. No restarts, no special flags, full access to your existing sessions.","owner":"mchades","repoUrl":"https://github.com/mchades/mac-browser","license":"Apache-2.0","licenseTier":"permissive","trust":"community","stars":3,"match":null,"fewStars":true,"format":"skill","createdAt":"2026-04-14T04:04:29.000Z","addedAt":"2026-10-22T00:54:56.670Z","logoUrl":"https://avatars.githubusercontent.com/u/24897598?u=9ade38373da7670459de459a0a0d3a636eae2d62&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["browser-web","developer-tools"],"tags":["ai-agent","applescript","automation","browser-automation","claude-code","copilot-cli","github-copilot","llm-tools"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-27T21:23:19.248Z","sample":false,"url":"https://conduits.dev/tools/mac-browser","language":"Shell","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# mac-browser\n\n> Control your running browser on macOS via AppleScript — no restarts, no special flags, full access to your existing sessions and cookies.\n\n![mac-browser demo](demo.gif)\n\nSupports **Microsoft Edge**, **Google Chrome**, and **Safari**.\n\n## Why\n\nOther browser automation tools (Playwright, CDP) require launching a dedicated browser instance. `mac-browser` talks directly to your already-running browser via AppleScript, meaning:\n\n- Private GitHub repos, Google Docs, internal dashboards — all accessible without re-login\n- No browser restarts or extra configuration\n- Works with any site you're already authenticated with\n\n## Install as an AI Agent Skill\n\nDrop this folder into your AI agent's skills directory and it will automatically be available when the agent needs to read web content from your browser.\n\n```bash\n# Claude Code\ngit clone https://github.com/mchades/mac-browser ~/.claude/skills/mac-browser\n\n# GitHub Copilot CLI\ngit clone https://github.com/mchades/mac-browser ~/.copilot/skills/mac-browser\n```\n\n## Prerequisites\n\n- macOS only\n- A supported browser must be running (Edge, Chrome, or Safari)\n- Enable **Allow JavaScript from Apple Events** in your browser:\n  - **Edge / Chrome**: View → Developer → Allow JavaScript from Apple Events\n  - **Safari**: Develop → Allow JavaScript from Apple Events  \n    *(If Develop menu is hidden: Safari Settings → Advanced → Show Develop menu in menu bar)*\n\n## How it works\n\nAppleScript provides a scripting interface to macOS applications. Both Chromium-based browsers (Edge, Chrome) and Safari expose their tabs and JavaScript execution through this interface.\n\n- **Edge / Chrome**: requires setting the target tab as the \"active tab\" in its window before calling `execute javascript`. The original active tab is restored after execution. The browser window itself never comes to the front.\n- **Safari**: supports `do JavaScript ... in tab N of window M` directly — no active-tab switch needed.\n\n## Scripts Reference\n\n> These scripts are invoked automatically by the AI agent. You don't need to call them manually.\n\n| Script | Description |\n|--------|-------------|\n| `list-tabs.sh` | List all open tabs across all running browsers |\n| `find-tab.sh <pattern>` | Find a tab by URL pattern |\n| `get-text.sh <pattern> [max-chars]` | Get page text from a matching tab |\n| `eval-js.sh <pattern> <js>` | Execute JavaScript in a matching tab |\n| `navigate.sh <url>` | Open a URL in a new tab |\n| `screenshot.sh [path]` | Take a screenshot of the browser window |\n\nOverride the browser with `MAC_BROWSER=chrome|safari|edge` before any script.\n\n## License\n\nApache 2.0\n"}