Command Palette

Search for a command to run...

Назад к скиллам
скилл № 29252

Safari Browser Control

Control Safari on macOS with AppleScript, safaridriver, screenshots, tab navigation, and real-browser read, click, and type workflows.

БесплатноБез исполняемых скриптов
clawicот clawic★ 23 звезды на GitHub

Установить Safari Browser Control в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

When to Use

User needs the agent to control the real Safari browser on macOS, not a generic headless browser. Use this when the task depends on the user's actual Safari session, open tabs, cookies, login state, AppleScript automation, safaridriver, or Safari-only rendering.

Choose this skill when the next step is to read a page, open or switch tabs, run JavaScript in Safari, click or type through AppleScript, capture Safari screenshots, or launch an isolated Safari WebDriver session. If the real requirement is generic browser automation after that, hand off to playwright.

Architecture

Memory lives in ~/Clawic/data/safari/. If ~/Clawic/data/safari/ does not exist, run setup.md. See memory-template.md for structure and starter files.

~/Clawic/data/safari/
|-- memory.md       # Activation defaults, preferred control mode, and guardrails
|-- permissions.md  # Automation, Develop menu, and screenshot preflight state
|-- sessions.md     # Real-session vs WebDriver session notes and target tabs
|-- snippets.md     # Known-good AppleScript and shell patterns worth reusing
|-- recipes.md      # High-value task recipes such as read, click, fill, capture
`-- incidents.md    # Permission failures, blocked JS, and repeat breakages

Quick Reference

Load only the smallest file needed for the current blocker.

Topic File
Setup guide setup.md
Memory template memory-template.md
Permissions and preflight checks preflight-and-permissions.md
AppleScript control and real-session commands applescript-control.md
safaridriver, WebDriver, and BiDi usage webdriver-and-bidi.md
Screenshot feedback loop and visual verification screenshot-and-visual-loop.md
Failure patterns and recovery order troubleshooting.md

Requirements

  • macOS with Safari installed and osascript, safaridriver, and screencapture available.
  • Explicit approval before enabling Safari remote automation, enabling JavaScript-from-automation prompts, granting Apple Events or Screen Recording access, or controlling the daily browsing profile.
  • Treat the user's open tabs, cookies, login state, clipboard, downloads, and any visible page content as sensitive session data.

If direct Safari access is unavailable, stay in planning mode and prepare commands or scripts instead of pretending the browser is controllable.

Control Modes

This skill covers two distinct control surfaces:

  • AppleScript mode for the user's real Safari session: current tabs, real cookies, logged-in pages, JavaScript execution, and screenshots of what the user actually has open.
  • WebDriver mode for isolated automation: safaridriver, standard WebDriver clients, and Safari-specific validation without touching the user's daily tabs unless they approve it.

Do not blur the two. Real-session control and isolated automation have different risk, visibility, and verification rules.

Data Storage

Keep only durable Safari operating context in ~/Clawic/data/safari/:

  • approved control mode defaults and whether daily-session control is allowed
  • permission state for Apple Events, Screen Recording, Develop menu, and remote automation
  • known-good snippets, task recipes, and incidents worth reusing
  • recurring no-go actions such as "never control banking tabs" or "never type blindly"

Core Rules

1. Choose the Control Surface Before Sending Any Command

  • Decide first whether the task needs the real Safari session or an isolated WebDriver session.
  • Use AppleScript mode when the user needs their actual logged-in browser state.
  • Use safaridriver mode when the task should avoid their daily tabs or needs cleaner automation boundaries.

2. Run a Preflight Before Touching the Browser

  • Verify Safari is installed, the expected permissions are present, and the target window or session exists.
  • For AppleScript, confirm Safari responds to a simple read command before trying clicks or typing.
  • For WebDriver, confirm safaridriver --enable has been run and the local driver starts cleanly.

3. Read and Verify Before You Click or Type

  • Start with title, URL, DOM text, or screenshot checks so the target surface is explicit.
  • After every navigation or action, re-read or re-screenshot the page before assuming success.
  • A shell command returning zero is not proof that Safari is showing the expected state.

4. Treat the Real Safari Session as High-Trust State

  • The real Safari window may contain logged-in accounts, active drafts, and sensitive tabs.
  • Ask before activating Safari, switching windows, typing, clicking, copying page data, or capturing screenshots that may reveal personal content.
  • Prefer a dedicated Safari profile or an isolated WebDriver session for risky or repetitive automation.

5. Use AppleScript for Real State, WebDriver for Clean State

  • osascript can inspect and control the user's live Safari windows and tabs.
  • safaridriver gives
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • _meta.json
  • applescript-control.md
  • memory-template.md
  • preflight-and-permissions.md
  • screenshot-and-visual-loop.md
  • setup.md
  • troubleshooting.md
  • webdriver-and-bidi.md

FAQ

Что делает скилл Safari Browser Control?

Control Safari on macOS with AppleScript, safaridriver, screenshots, tab navigation, and real-browser read, click, and type workflows.

Как установить скилл Safari Browser Control?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Safari Browser Control запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Safari Browser Control с