
Safari Browser Automation CLI
Lets an agent drive your real macOS Safari from the command line, including logged-in sessions.
- Repository
- HKUDS/CLI-Anything
- Stars
- 58,084
- Licence
- Apache-2.0
- Files
- 1 file
What it does
This skill teaches an AI agent to control the Safari browser on a Mac through a command-line tool. It wraps the safari-mcp server, so the agent can open pages, click, fill forms, take snapshots and screenshots, read cookies and storage, capture network activity, and save pages as PDF. Because it uses the real Safari app, existing logins can be kept.
Great for
- Developers whose AI agent cannot speak MCP directly and needs a bash-callable browser tool
- Engineers scripting Safari checks or repetitive web tasks from the terminal or CI on macOS
- People debugging browser automation interactively from Terminal
Skip it if
- Windows or Linux users, since the underlying safari-mcp server is macOS-only
- Anyone who wants to automate sites with accounts they do not control, because the tool can read cookies, storage and fill passwords into forms
- Users who prefer a faster setup; each call starts a new subprocess, so MCP-native agents such as Claude Code are recommended to use safari-mcp directly
Try asking
- “Open example.com in Safari, take a page snapshot and summarise the main headings”
- “Fill in the login form on my staging site using the test account and tell me if it succeeds”
- “Save the current Safari page as a PDF to /tmp/report.pdf”
- “Capture network requests while loading a page and list the slowest ones”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.
cli-anything-safari.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip cli-anything-safari.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip cli-anything-safari.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Prefer the snapshot command over screenshots, and use the refs it returns immediately because they expire on the next snapshot
- Use a dedicated Safari profile or test accounts, and review any form fill or cookie action before letting the agent run it
- Run tools describe for a tool before calling it, since argument names such as --script and --direction differ from what you might guess
What's inside
- SKILL.md
Redistributed unmodified from HKUDS/CLI-Anything under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.