safari-control

Solid

Use Safari directly on macOS when work must happen in the user's real Safari session instead of a separate automation browser. Best for reading the current tab, inspecting the live session layout, operating Safari menu bar or native toolbar controls, reading page text and structure, running page JavaScript, waiting for page conditions, exporting page artifacts, and performing lightweight DOM interactions in the active Safari tab. If Safari JavaScript from Apple Events is disabled, guide the user to enable it or fall back to desktop-control for visual interaction.

Web & Frontend 3,964 stars 1088 forks Updated 2 months ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Safari Control Use this skill when the task must happen in **Safari itself**: - The user is already logged in there - Safari extensions, cookies, or profiles matter - You need the current tab, tab list, page URL, or page text - A headless browser would not reflect the real session Do **not** force Safari to behave like Playwright. Prefer Safari's session access and DOM helpers first, Safari native UI automation second, and `desktop-control` only for pointer-heavy UI. ## Core Tool Run commands from the `safari-control` skill directory so the relative `scripts/` path resolves correctly. ```bash swift scripts/safari_control.swift <command> ``` ## Recommended Flow Use this exact flow unless the task clearly starts in one specific layer: 1. Check environment and active page: ```bash swift scripts/safari_control.swift doctor swift scripts/safari_control.swift current --json ``` `doctor` is the branch point: - `safari_js=false`: do not use DOM commands until the user enables JavaScript from Apple Events. - `accessibility=false`: do not use native Safari chrome commands. - `screenshot_background=false`: use `screenshot --mode foreground` when you need an image. - If Safari is missing required permissions or features, tell the user before proceeding. In particular, check whether Safari allows Automation, JavaScript in the Smart Search field, and JavaScript from Apple Events. Enabling these unlocks more functionality, but also increases risk because automation and scripte...

Details

Author
openclaw
Repository
openclaw/skills
Created
5 months ago
Last Updated
2 months ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category