claude-for-safari
Control the user's real Safari browser on macOS using AppleScript and screencapture. This skill should be used when the user asks to interact with Safari, browse websites, read web pages, automate browser tasks, take screenshots of web content, or when any task would benefit from seeing or interacting with what's in their browser. Triggers on keywords like "safari", "browser", "web page", "open tab", "screenshot the page", "read this site", "browse", "click on", "fill in the form".
pinned to #dc2f449updated last month
Ask your AI client: “install skills/claude-for-safari”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install skills/claude-for-safarimetahub onboarded this repo on the author's behalf.
If you own github.com/SDLLL/claude-for-safari on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
40
Last commit
last month
Latest release
published
- #ai-agent
- #applescript
- #browser-automation
- #browser-control
- #claude-code
- #claude-code-skill
- #claude-skill
- #macos
- #mcp-tool
- #safari
- #safari-extension
- #web-scraping
About this skill
Pulled from SKILL.md at publish time.
Operate the user's real Safari browser on macOS via AppleScript (`osascript`) and `screencapture`. This provides full access to the user's actual browser session — including login state, cookies, and open tabs — without any extensions or additional software.
Evaluation report
WarningsAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.dc2f449· last month
Kind-specific
31Skill: SKILL.md present
found at SKILL.md · frontmatter source: SKILL.md
Skill: body content present
1,728 words · 12,223 chars · 17 sections · 22 code blocks
Skill: triggers declaredwarn
No `trigger` phrases in SKILL.md frontmatter
Add `trigger:` lines so Claude knows when to activate this skill — e.g. `when building MCP servers` or `for diagram creation`.
Skill: allowed-tools scope
no allowed-tools restriction (Claude may use anything)
Release history
1- releasecurrentdc2f449warnlast month
Contents
Claude for Safari
<strong>Give your AI Agent the power to control Safari</strong>
Website · Quick Start · Features · FAQ
English | 中文
Why This?
You want your AI Agent to help with browser tasks — then you discover:
- 🔒 Playwright → Separate browser instance, hijacks your session
- 🧩 Claude for Chrome → Requires Chrome extension, doesn't work with Safari
- 📝 Copy & paste → Manually feeding page content to AI every time
You just want AI to use your Safari, as if you were doing it yourself.
Claude for Safari makes it one command:
npx skills add SDLLL/claude-for-safari
After installing, tell Claude "check what's open in my Safari" — it reads and controls your real browser directly.
If this saves you time, give it a ⭐ — it helps other developers discover the project!
Quick Start
Run this in your terminal:
npx skills add SDLLL/claude-for-safari
Then launch Claude Code:
claude
Say "show me what tabs are open in Safari". The agent will guide you through permission setup automatically.
Compatible with any AI Agent that supports Skills: Claude Code, Cursor, Windsurf, etc.
First-Time Setup
The agent auto-detects and guides you, but you can configure ahead of time:
- System Settings > Privacy & Security > Automation → Allow terminal to control Safari
- Safari > Settings > Advanced → Enable "Show features for web developers"
- Safari > Develop menu → Check "Allow JavaScript from Apple Events"
- (Optional) System Settings > Privacy & Security > Screen Recording → Allow terminal (enables background screenshots)
Features
Zero install. Pure macOS native capabilities. One Skill covers all browser operations:
| Capability | What the Agent Does | How |
|---|---|---|
| List tabs | List all windows and tabs with title & URL | AppleScript |
| Read pages | Extract text, structured data, simplified DOM | AppleScript + JavaScript |
| Execute JS | Run arbitrary JavaScript in page context | AppleScript do JavaScript |
| Screenshot | Capture Safari window — AI can "see" the page | screencapture |
| Navigate | Open URLs, new tabs, new windows | AppleScript |
| Click | Click elements (React/Vue/Angular compatible) | JavaScript dispatchEvent |
| Type | Fill forms, simulate keyboard input | JavaScript + System Events |
| Scroll | Scroll up/down, scroll to element | JavaScript scrollBy/scrollTo |
| Switch tabs | Switch by index or URL keyword | AppleScript |
| Wait for load | Wait until page is fully loaded | JavaScript readyState |
Screenshot Modes
| Mode | Permission Required | Window Switch | Best For |
|---|---|---|---|
| Background | Screen Recording | No switch | Recommended, seamless |
| Foreground | None | Brief (~0.3s) | Default, auto-switches back |
How It Works
Claude Code ──osascript──► Safari (reads/controls your real browser)
│
└──screencapture──► screenshot ──► Claude sees the page
No extensions. No proxy servers. No extra processes.
Everything runs through macOS native AppleScript and screencapture. Websites see a real user — no automation fingerprints.
FAQ
<strong>Do I need to install anything?</strong>
No. This Skill relies entirely on macOS built-in AppleScript and screencapture. Just grant a few system permissions on first use.
<strong>Does it support Chrome / Firefox / Arc?</strong>
Safari only. For other browsers, use Playwright MCP or Chrome ACP. Safari is the only macOS browser with full AppleScript automation support.
<strong>Is it safe? Will AI do random things?</strong>
Claude Code's permission system asks for your confirmation before every sensitive action. You can approve individually or in bulk. All operations are visible in your terminal.
<strong>The window flickers when taking screenshots?</strong>
Without Screen Recording permission, Safari briefly activates (~0.3s) then switches back. Grant Screen Recording permission for fully background screenshots with zero window switching.
<strong>Which AI Agents are compatible?</strong>
Any agent supporting Claude Code Skills: Claude Code, Cursor, Windsurf, etc.
License
Reviews
No reviews yet. Be the first.
Related
Frontend Slides
Create beautiful slides on the web using Claude's frontend skills
Guizang Ppt Skill
AI-agent Skill for generating polished HTML slide decks: editorial magazine and Swiss layouts, image prompts, social covers, and a WebGL/low-power presentation runtime.
Browser Use
🌐 Make websites accessible for AI agents. Automate tasks online with ease.
mh install skills/claude-for-safari